Class TupleIndexWrapper

java.lang.Object
org.apache.jena.tdb1.store.tupletable.TupleIndexWrapper
All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, TupleIndex

public class TupleIndexWrapper extends Object implements TupleIndex
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> tuple)
    Insert a tuple - return true if it was really added, false if it was a duplicate
    Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>>
    all()
    return an iterator of everything
    void
    Clear the index
    void
     
    boolean
    delete(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> tuple)
    Delete a tuple - return true if it was deleted, false if it didn't exist
    Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>>
    find(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
    Find all matching tuples - a slot of NodeId.NodeIdAny (or null) means match any.
     
    Get a convenient display string based on the details of the column map - do not rely on the format
    Get a convenient display string for the index - do not rely on the format
    int
    Length of tuple supported
    boolean
    Answer whether empty or not
    long
    Size of index (number of slots).
    void
     
    int
    weight(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
    Weight a pattern - specified in normal order (not index order).

    Methods inherited from class java.lang.Object

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

    • TupleIndexWrapper

      public TupleIndexWrapper(TupleIndex index)
  • Method Details

    • add

      public boolean add(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> tuple)
      Description copied from interface: TupleIndex
      Insert a tuple - return true if it was really added, false if it was a duplicate
      Specified by:
      add in interface TupleIndex
    • delete

      public boolean delete(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> tuple)
      Description copied from interface: TupleIndex
      Delete a tuple - return true if it was deleted, false if it didn't exist
      Specified by:
      delete in interface TupleIndex
    • find

      public Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> find(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
      Description copied from interface: TupleIndex
      Find all matching tuples - a slot of NodeId.NodeIdAny (or null) means match any. Input pattern in natural order, not index order.
      Specified by:
      find in interface TupleIndex
    • all

      public Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> all()
      Description copied from interface: TupleIndex
      return an iterator of everything
      Specified by:
      all in interface TupleIndex
    • getTupleLength

      public int getTupleLength()
      Description copied from interface: TupleIndex
      Length of tuple supported
      Specified by:
      getTupleLength in interface TupleIndex
    • getMappingStr

      public String getMappingStr()
      Description copied from interface: TupleIndex
      Get a convenient display string based on the details of the column map - do not rely on the format
      Specified by:
      getMappingStr in interface TupleIndex
    • getColumnMap

      public ColumnMap getColumnMap()
      Specified by:
      getColumnMap in interface TupleIndex
    • getName

      public String getName()
      Description copied from interface: TupleIndex
      Get a convenient display string for the index - do not rely on the format
      Specified by:
      getName in interface TupleIndex
    • weight

      public int weight(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
      Description copied from interface: TupleIndex
      Weight a pattern - specified in normal order (not index order). Large numbers means better match.
      Specified by:
      weight in interface TupleIndex
    • size

      public long size()
      Description copied from interface: TupleIndex
      Size of index (number of slots). May be an estimate and not exact. -1 for unknown.
      Specified by:
      size in interface TupleIndex
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: TupleIndex
      Answer whether empty or not
      Specified by:
      isEmpty in interface TupleIndex
    • clear

      public void clear()
      Description copied from interface: TupleIndex
      Clear the index
      Specified by:
      clear in interface TupleIndex
    • sync

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

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