Package org.apache.jena.sparql.core.mem
Class TriTable
- java.lang.Object
-
- org.apache.jena.sparql.core.mem.TriTable
-
- All Implemented Interfaces:
TransactionalComponent,TripleTable,TupleTable<Triple>
public class TriTable extends java.lang.Object implements TripleTable
A three-wayTripleTableusing all of the available forms inTripleTableForm.
-
-
Constructor Summary
Constructors Constructor Description TriTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)voidadd(Triple t)Add a tuple to the tablevoidbegin(ReadWrite rw)Start either a READ or WRITE transactionvoidclear()Clear all tuples from this table.voidcommit()Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)voiddelete(Triple t)Remove a tuple from the tablevoidend()Finish the transaction - if a write transaction and commit() has not been called, then abortjava.util.stream.Stream<Triple>find(Node s, Node p, Node o)Search the table using a pattern of slots.
-
-
-
Method Detail
-
commit
public void commit()
Description copied from interface:TransactionalComponentCommit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)- Specified by:
commitin interfaceTransactionalComponent
-
abort
public void abort()
Description copied from interface:TransactionalComponentAbort a transaction - finish the transaction and undo any changes (if a "write" transaction)- Specified by:
abortin interfaceTransactionalComponent- Specified by:
abortin interfaceTupleTable<Triple>
-
end
public void end()
Description copied from interface:TransactionalComponentFinish the transaction - if a write transaction and commit() has not been called, then abort- Specified by:
endin interfaceTransactionalComponent
-
find
public java.util.stream.Stream<Triple> find(Node s, Node p, Node o)
Description copied from interface:TripleTableSearch the table using a pattern of slots.Node.ANYornullwill work as a wildcard.- Specified by:
findin interfaceTripleTable- Parameters:
s- the subject node of the patternp- the predicate node of the patterno- the object node of the pattern- Returns:
- an
Streamof matched triples
-
add
public void add(Triple t)
Description copied from interface:TupleTableAdd a tuple to the table- Specified by:
addin interfaceTupleTable<Triple>- Parameters:
t- the tuple to add
-
delete
public void delete(Triple t)
Description copied from interface:TupleTableRemove a tuple from the table- Specified by:
deletein interfaceTupleTable<Triple>- Parameters:
t- the tuple to remove
-
begin
public void begin(ReadWrite rw)
Description copied from interface:TransactionalComponentStart either a READ or WRITE transaction- Specified by:
beginin interfaceTransactionalComponent
-
clear
public void clear()
Description copied from interface:TupleTableClear all tuples from this table.- Specified by:
clearin interfaceTripleTable- Specified by:
clearin interfaceTupleTable<Triple>
-
-