Class NodeTableNative

java.lang.Object
org.apache.jena.tdb1.store.nodetable.NodeTableNative
All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, NodeTable

public class NodeTableNative extends Object implements NodeTable
A concrete NodeTable based on native storage (string file and an index)
  • Constructor Details

    • NodeTableNative

      public NodeTableNative(Index nodeToId, ObjectFile objectFile)
  • Method Details

    • getNodeForNodeId

      public org.apache.jena.graph.Node getNodeForNodeId(NodeId id)
      Get the Node for this NodeId, or null if none
      Specified by:
      getNodeForNodeId in interface NodeTable
    • getNodeIdForNode

      public NodeId getNodeIdForNode(org.apache.jena.graph.Node node)
      Find the NodeId for a node, or return NodeId.NodeDoesNotExist
      Specified by:
      getNodeIdForNode in interface NodeTable
    • getAllocateNodeId

      public NodeId getAllocateNodeId(org.apache.jena.graph.Node node)
      Find the NodeId for a node, allocating a new NodeId if the Node does not yet have a NodeId
      Specified by:
      getAllocateNodeId in interface NodeTable
    • containsNode

      public boolean containsNode(org.apache.jena.graph.Node node)
      Description copied from interface: NodeTable
      Test whether the node table contains an entry for node
      Specified by:
      containsNode in interface NodeTable
    • containsNodeId

      public boolean containsNodeId(NodeId nodeId)
      Description copied from interface: NodeTable
      Test whether the node table contains an entry for node
      Specified by:
      containsNodeId in interface NodeTable
    • close

      public void close()
      Specified by:
      close in interface org.apache.jena.atlas.lib.Closeable
    • allocOffset

      public NodeId allocOffset()
      Description copied from interface: NodeTable
      The offset needed to predicate allocation difference between persistent tables - internal function
      Specified by:
      allocOffset in interface NodeTable
    • all

      public Iterator<org.apache.jena.atlas.lib.Pair<NodeId,org.apache.jena.graph.Node>> all()
      Description copied from interface: NodeTable
      Iterate over all nodes (not necessarily fast). Does not include inlined NodeIds
      Specified by:
      all in interface NodeTable
    • sync

      public void sync()
      Specified by:
      sync in interface org.apache.jena.atlas.lib.Sync
    • getObjects

      public ObjectFile getObjects()
    • getIndex

      public Index getIndex()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: NodeTable
      Anything there?
      Specified by:
      isEmpty in interface NodeTable
    • wrapped

      public NodeTable wrapped()
      Description copied from interface: NodeTable
      Return a NodeTable if this instance wraps another, else return null
      Specified by:
      wrapped in interface NodeTable