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 TypeMethodDescriptionvoid
abort()
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 tablevoid
Start either a READ or WRITE transactionvoid
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
(org.apache.jena.graph.Triple t) Remove a tuple from the tablevoid
end()
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:TransactionalComponent
Commit a transaction - finish the transaction and make any changes permanent (if a "write" transaction)- Specified by:
commit
in interfaceTransactionalComponent
-
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 interfaceTransactionalComponent
- Specified by:
abort
in interfaceTupleTable<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 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:TripleTable
Search the table using a pattern of slots.Node.ANY
ornull
will work as a wildcard.- Specified by:
find
in interfaceTripleTable
- Parameters:
s
- the subject node of the patternp
- the predicate node of the patterno
- 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 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:TupleTable
Remove a tuple from the table- Specified by:
delete
in interfaceTupleTable<org.apache.jena.graph.Triple>
- Parameters:
t
- the tuple to remove
-
begin
Description copied from interface:TransactionalComponent
Start either a READ or WRITE transaction- Specified by:
begin
in interfaceTransactionalComponent
-
clear
public void clear()Description copied from interface:TupleTable
Clear all tuples from this table.- Specified by:
clear
in interfaceTripleTable
- Specified by:
clear
in interfaceTupleTable<org.apache.jena.graph.Triple>
-