Class TriTable

java.lang.Object
org.apache.jena.sparql.core.mem.TriTable
All Implemented Interfaces:
TransactionalComponent, TripleTable, TupleTable<org.apache.jena.graph.Triple>

public class TriTable extends Object implements TripleTable
A three-way TripleTable using all of the available forms in TripleTableForm.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)
    void
    add(org.apache.jena.graph.Triple t)
    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
    delete(org.apache.jena.graph.Triple t)
    Remove a tuple from the table
    void
    end()
    Finish the transaction - if a write transaction and commit() has not been called, then abort
    Stream<org.apache.jena.graph.Triple>
    find(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.

    Methods inherited from class java.lang.Object

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

    • TriTable

      public TriTable()
  • Method Details

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

      public void abort()
      Description copied from interface: TransactionalComponent
      Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)
      Specified by:
      abort in interface TransactionalComponent
      Specified by:
      abort in interface TupleTable<org.apache.jena.graph.Triple>
    • 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
    • find

      public Stream<org.apache.jena.graph.Triple> find(org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Description copied from interface: TripleTable
      Search the table using a pattern of slots. Node.ANY or null will work as a wildcard.
      Specified by:
      find in interface TripleTable
      Parameters:
      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 triples
    • add

      public void add(org.apache.jena.graph.Triple t)
      Description copied from interface: TupleTable
      Add a tuple to the table
      Specified by:
      add in interface TupleTable<org.apache.jena.graph.Triple>
      Parameters:
      t - the tuple to add
    • delete

      public void delete(org.apache.jena.graph.Triple t)
      Description copied from interface: TupleTable
      Remove a tuple from the table
      Specified by:
      delete in interface TupleTable<org.apache.jena.graph.Triple>
      Parameters:
      t - the tuple to remove
    • begin

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

      public void clear()
      Description copied from interface: TupleTable
      Clear all tuples from this table.
      Specified by:
      clear in interface TripleTable
      Specified by:
      clear in interface TupleTable<org.apache.jena.graph.Triple>