Class TupleIndexBase

java.lang.Object
org.apache.jena.tdb1.store.tupletable.TupleIndexBase
All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, TupleIndex
Direct Known Subclasses:
TupleIndexRecord

public abstract class TupleIndexBase extends Object implements TupleIndex
  • Method Summary

    Modifier and Type
    Method
    Description
    final 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
    final 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
    final 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.
    final ColumnMap
     
    final String
    Get a convenient display string based on the details of the column map - do not rely on the format
    final String
    Get a convenient display string for the index - do not rely on the format
    final int
    Length of tuple supported
     
    final 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, wait, wait, wait

    Methods inherited from interface org.apache.jena.atlas.lib.Closeable

    close

    Methods inherited from interface org.apache.jena.atlas.lib.Sync

    sync

    Methods inherited from interface org.apache.jena.tdb1.store.tupletable.TupleIndex

    all, clear, isEmpty, size
  • Method Details

    • add

      public final 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
      Specified by:
      add in interface TupleIndex
    • delete

      public final 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
      Specified by:
      delete in interface TupleIndex
    • find

      public final 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. Input pattern in natural order, not index order.
      Specified by:
      find in interface TupleIndex
    • weight

      public final 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
    • getMappingStr

      public final 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
    • getName

      public final 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
    • getTupleLength

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

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

      public String toString()
      Overrides:
      toString in class Object