Interface TupleIndex

All Superinterfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync
All Known Implementing Classes:
TupleIndexBase, TupleIndexRecord, TupleIndexWrapper

public interface TupleIndex extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
  • 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
    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
    static Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>>
    scan(Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> iter, org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
     
    long
    Size of index (number of slots).
    int
    weight(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
    Weight a pattern - specified in normal order (not index order).

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

    close

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

    sync
  • Method Details

    • add

      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
    • delete

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

      String getName()
      Get a convenient display string for the index - do not rely on the format
    • getMappingStr

      String getMappingStr()
      Get a convenient display string based on the details of the column map - do not rely on the format
    • getColumnMap

      ColumnMap getColumnMap()
    • find

      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.
    • all

      Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> all()
      return an iterator of everything
    • weight

      int weight(org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)
      Weight a pattern - specified in normal order (not index order). Large numbers means better match.
    • getTupleLength

      int getTupleLength()
      Length of tuple supported
    • size

      long size()
      Size of index (number of slots). May be an estimate and not exact. -1 for unknown.
    • isEmpty

      boolean isEmpty()
      Answer whether empty or not
    • clear

      void clear()
      Clear the index
    • scan

      static Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> scan(Iterator<org.apache.jena.atlas.lib.tuple.Tuple<NodeId>> iter, org.apache.jena.atlas.lib.tuple.Tuple<NodeId> pattern)