java.lang.Object
org.apache.jena.sparql.core.mem.TriTable
- All Implemented Interfaces:
TransactionalComponent,TripleTable,TupleTable<org.apache.jena.graph.Triple>
A three-way
TripleTable using all of the available forms in TripleTableForm.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)voidadd(org.apache.jena.graph.Triple t) Add a tuple to the tablevoidStart 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(org.apache.jena.graph.Triple t) Remove a tuple from the tablevoidend()Finish the transaction - if a write transaction and commit() has not been called, then abortStream<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.
-
Constructor Details
-
TriTable
public TriTable()
-
-
Method Details
-
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<org.apache.jena.graph.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 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: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(org.apache.jena.graph.Triple t) Description copied from interface:TupleTableAdd a tuple to the table- Specified by:
addin interfaceTupleTable<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:TupleTableRemove a tuple from the table- Specified by:
deletein interfaceTupleTable<org.apache.jena.graph.Triple>- Parameters:
t- the tuple to remove
-
begin
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<org.apache.jena.graph.Triple>
-