Package org.apache.jena.sparql.core.mem
Class PMapTripleTable
- java.lang.Object
-
- org.apache.jena.sparql.core.mem.OrderedTupleTable<TupleType,ConsumerType>
-
- org.apache.jena.sparql.core.mem.PMapTupleTable<FourTupleMap.ThreeTupleMap,Triple,org.apache.jena.atlas.lib.tuple.TConsumer3<Node>>
-
- org.apache.jena.sparql.core.mem.PMapTripleTable
-
- All Implemented Interfaces:
TransactionalComponent
,TripleTable
,TupleTable<Triple>
public class PMapTripleTable extends PMapTupleTable<FourTupleMap.ThreeTupleMap,Triple,org.apache.jena.atlas.lib.tuple.TConsumer3<Node>> implements TripleTable
ATripleTable
employing persistent maps to index triples in one particular slot order (e.g. SPO, OSP or POS).
-
-
Constructor Summary
Constructors Constructor Description PMapTripleTable(java.lang.String order)
PMapTripleTable(java.lang.String canonical, java.lang.String order)
PMapTripleTable(java.lang.String tableName, org.apache.jena.atlas.lib.tuple.TupleMap order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Triple t)
Add a tuple to the tablevoid
delete(Triple t)
Remove a tuple from the tablejava.util.stream.Stream<Triple>
find(Node s, Node p, 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 Detail
-
PMapTripleTable
public PMapTripleTable(java.lang.String order)
- Parameters:
order
- an internal order for this table
-
PMapTripleTable
public PMapTripleTable(java.lang.String canonical, java.lang.String order)
- Parameters:
canonical
- the canonical order outside this tableorder
- the internal order for this table
-
PMapTripleTable
public PMapTripleTable(java.lang.String tableName, org.apache.jena.atlas.lib.tuple.TupleMap order)
- Parameters:
tableName
- a name for this tableorder
- the order of elements in this table
-
-
Method Detail
-
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
-
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
-
-