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-wayTripleTable
using 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 void
abort()
Abort a transaction - finish the transaction and undo any changes (if a "write" transaction)void
add(Triple t)
Add a tuple to the tablevoid
begin(ReadWrite rw)
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(Triple t)
Remove a tuple from the tablevoid
end()
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: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<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 java.util.stream.Stream<Triple> find(Node s, Node p, 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(Triple t)
Description copied from interface:TupleTable
Add a tuple to the table- Specified by:
add
in interfaceTupleTable<Triple>
- Parameters:
t
- the tuple to add
-
delete
public void delete(Triple t)
Description copied from interface:TupleTable
Remove a tuple from the table- Specified by:
delete
in interfaceTupleTable<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 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<Triple>
-
-