java.lang.Object
org.apache.jena.sparql.core.mem.OrderedTupleTable<TupleType,ConsumerType>
org.apache.jena.sparql.core.mem.PMapTupleTable<FourTupleMap.ThreeTupleMap,org.apache.jena.graph.Triple,org.apache.jena.atlas.lib.tuple.TConsumer3<org.apache.jena.graph.Node>>
org.apache.jena.sparql.core.mem.PMapTripleTable
- All Implemented Interfaces:
TransactionalComponent
,TripleTable
,TupleTable<org.apache.jena.graph.Triple>
public class PMapTripleTable
extends PMapTupleTable<FourTupleMap.ThreeTupleMap,org.apache.jena.graph.Triple,org.apache.jena.atlas.lib.tuple.TConsumer3<org.apache.jena.graph.Node>>
implements TripleTable
A
TripleTable
employing persistent maps to index triples in one particular slot order (e.g. SPO, OSP or POS).-
Constructor Summary
ConstructorsConstructorDescriptionPMapTripleTable
(String order) PMapTripleTable
(String canonical, String order) PMapTripleTable
(String tableName, org.apache.jena.atlas.lib.tuple.TupleMap order) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.apache.jena.graph.Triple t) Add a tuple to the tablevoid
delete
(org.apache.jena.graph.Triple t) Remove a tuple from the tableStream<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 org.apache.jena.sparql.core.mem.PMapTupleTable
begin, clear, commit, end
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jena.sparql.core.mem.TransactionalComponent
begin, commit, end
Methods inherited from interface org.apache.jena.sparql.core.mem.TripleTable
clear
Methods inherited from interface org.apache.jena.sparql.core.mem.TupleTable
abort
-
Constructor Details
-
PMapTripleTable
- Parameters:
order
- an internal order for this table
-
PMapTripleTable
- Parameters:
canonical
- the canonical order outside this tableorder
- the internal order for this table
-
PMapTripleTable
- Parameters:
tableName
- a name for this tableorder
- the order of elements in this table
-
-
Method Details
-
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
-
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
-