Class HexTable

  • All Implemented Interfaces:
    QuadTable, TransactionalComponent, TupleTable<Quad>

    public class HexTable
    extends java.lang.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
      HexTable()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Quad q)
      Add a tuple to the table
      void begin​(ReadWrite rw)
      Start either a READ or WRITE transaction
      void clear()
      Clear all tuples from this table.
      void commit()
      Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)
      void delete​(Quad q)
      Remove a tuple from the table
      void end()
      Finish the transaction - if a write transaction and commit() has not been called, then abort
      java.util.stream.Stream<Quad> find​(Node g, Node s, Node p, Node o)
      Search the table using a pattern of slots.
      java.util.stream.Stream<Quad> findInUnionGraph​(Node s, Node p, Node o)  
      java.util.stream.Stream<Node> listGraphNodes()
      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 Detail

      • HexTable

        public HexTable()
    • Method Detail

      • find

        public java.util.stream.Stream<Quad> find​(Node g,
                                                  Node s,
                                                  Node p,
                                                  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 java.util.stream.Stream<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
      • 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