java.lang.Object
org.apache.jena.tdb1.store.nodetable.NodecSSE
All Implemented Interfaces:
Nodec

public class NodecSSE extends Object implements Nodec
Simple encoder/decoder for nodes that uses Turtle term string encoding.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.graph.Node
    decode(ByteBuffer bb, org.apache.jena.shared.PrefixMapping pmap)
    Decode the node from the byte buffer.
    int
    encode(org.apache.jena.graph.Node node, ByteBuffer bb, org.apache.jena.shared.PrefixMapping pmap)
    Encode the node into the byte buffer, starting at the given offset.
    int
    maxSize(org.apache.jena.graph.Node node)
    Calculate the maximum number of bytes needed for a Node.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NodecSSE

      public NodecSSE()
  • Method Details

    • maxSize

      public int maxSize(org.apache.jena.graph.Node node)
      Description copied from interface: Nodec
      Calculate the maximum number of bytes needed for a Node. This needs to be an overestimate and is used to ensure there is space in the bytebuffer passed to encode.
      Specified by:
      maxSize in interface Nodec
    • encode

      public int encode(org.apache.jena.graph.Node node, ByteBuffer bb, org.apache.jena.shared.PrefixMapping pmap)
      Description copied from interface: Nodec
      Encode the node into the byte buffer, starting at the given offset. The ByteBuffer will have position/limit around the space used on return, without a length code.
      Specified by:
      encode in interface Nodec
      Parameters:
      node - Node to encode.
      bb - ByteBuffer
      pmap - Optional prefix mapping. Can be null.
      Returns:
      Length of byte buffer used for the whole encoding.
    • decode

      public org.apache.jena.graph.Node decode(ByteBuffer bb, org.apache.jena.shared.PrefixMapping pmap)
      Description copied from interface: Nodec
      Decode the node from the byte buffer. The ByteBuffer position should be the start of the encoding (no binary length for example)
      Specified by:
      decode in interface Nodec
      Parameters:
      bb - ByteBuffer
      pmap - Optional prefix mapping. Can be null.
      Returns:
      the decoded Node.