Class HexTable

java.lang.Object
org.apache.jena.sparql.core.mem.HexTable
All Implemented Interfaces:
QuadTable, TransactionalComponent, TupleTable<Quad>

public class HexTable extends Object implements QuadTable
A six-way QuadTable using all of the available forms in QuadTableForm. This class binds together all of the enumerated values in enum QuadTableForm, each of which implements QuadTable, into one implementation of QuadTable that selects the most useful index form(s) for any given operation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Quad q)
    Add a tuple to the table
    void
    Start either a READ or WRITE transaction
    void
    Clear all tuples from this table.
    void
    Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)
    void
    Remove a tuple from the table
    void
    end()
    Finish the transaction - if a write transaction and commit() has not been called, then abort
    find(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Search the table using a pattern of slots.
    findInUnionGraph(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
     
    Stream<org.apache.jena.graph.Node>
    Discover the graphs named in the table

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.jena.sparql.core.mem.TupleTable

    abort
  • Constructor Details

    • HexTable

      public HexTable()
  • Method Details

    • find

      public Stream<Quad> find(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Description copied from interface: QuadTable
      Search the table using a pattern of slots. Node.ANY or null will work as a wildcard.
      Specified by:
      find in interface QuadTable
      Parameters:
      g - the graph node of the pattern
      s - the subject node of the pattern
      p - the predicate node of the pattern
      o - the object node of the pattern
      Returns:
      an Stream of matched quads
    • add

      public void add(Quad q)
      Description copied from interface: TupleTable
      Add a tuple to the table
      Specified by:
      add in interface TupleTable<Quad>
      Parameters:
      q - the tuple to add
    • delete

      public void delete(Quad q)
      Description copied from interface: TupleTable
      Remove a tuple from the table
      Specified by:
      delete in interface TupleTable<Quad>
      Parameters:
      q - the tuple to remove
    • listGraphNodes

      public Stream<org.apache.jena.graph.Node> listGraphNodes()
      Description copied from interface: QuadTable
      Discover the graphs named in the table
      Specified by:
      listGraphNodes in interface QuadTable
      Returns:
      an Stream of graph names used in this table
    • findInUnionGraph

      public Stream<Quad> findInUnionGraph(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Specified by:
      findInUnionGraph in interface QuadTable
    • begin

      public void begin(ReadWrite rw)
      Description copied from interface: TransactionalComponent
      Start either a READ or WRITE transaction
      Specified by:
      begin in interface TransactionalComponent
    • end

      public void end()
      Description copied from interface: TransactionalComponent
      Finish the transaction - if a write transaction and commit() has not been called, then abort
      Specified by:
      end in interface TransactionalComponent
    • commit

      public void commit()
      Description copied from interface: TransactionalComponent
      Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)
      Specified by:
      commit in interface TransactionalComponent
    • clear

      public void clear()
      Description copied from interface: TupleTable
      Clear all tuples from this table.
      Specified by:
      clear in interface QuadTable
      Specified by:
      clear in interface TupleTable<Quad>