Package org.apache.jena.graph.impl
Class GraphPlain
- java.lang.Object
-
- org.apache.jena.graph.impl.WrappedGraph
-
- org.apache.jena.graph.impl.GraphPlain
-
- All Implemented Interfaces:
Graph
,GraphWithPerform
public class GraphPlain extends WrappedGraph
A version of Graph that enforces term equality even if the base graph uses value-indexing. With value-indexing, one value may have several object terms that represent it when the graph store RDF terms, and but matches by value. This only affects the object field of a triple in RDF but in "generalized RDF" literals can appear in any triple slot.
-
-
Field Summary
-
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Node s, Node p, Node o)
Answer true iff the graph contains a triple matching (s, p, o).boolean
contains(Triple t)
Answer true iff the graph contains a triple that t matches; t may be fluid.ExtendedIterator<Triple>
find(Node subj, Node pred, Node obj)
Returns an iterator over Triples matching a pattern.ExtendedIterator<Triple>
find(Triple m)
Returns an iterator over all the Triples that match the triple pattern.Capabilities
getCapabilities()
returns this Graph's capabilitiesstatic Graph
plain()
Return a graph that only has term-equality.static Graph
plain(Graph base)
Return a graph that only has term-equality and storage in thebase
graph.void
remove(Node s, Node p, Node o)
Remove all triples that match by find(s, p, o)java.lang.String
toString()
-
Methods inherited from class org.apache.jena.graph.impl.WrappedGraph
add, clear, close, delete, dependsOn, getEventManager, getPrefixMapping, getTransactionHandler, getWrapped, isClosed, isEmpty, isIsomorphicWith, performAdd, performDelete, size
-
-
-
-
Method Detail
-
plain
public static Graph plain(Graph base)
Return a graph that only has term-equality and storage in thebase
graph. Update affects the base graph.
-
plain
public static Graph plain()
Return a graph that only has term-equality.
-
getCapabilities
public Capabilities getCapabilities()
Description copied from interface:Graph
returns this Graph's capabilities- Specified by:
getCapabilities
in interfaceGraph
- Overrides:
getCapabilities
in classWrappedGraph
-
remove
public void remove(Node s, Node p, Node o)
Description copied from interface:Graph
Remove all triples that match by find(s, p, o)- Specified by:
remove
in interfaceGraph
- Overrides:
remove
in classWrappedGraph
-
contains
public boolean contains(Triple t)
Description copied from interface:Graph
Answer true iff the graph contains a triple that t matches; t may be fluid.- Specified by:
contains
in interfaceGraph
- Overrides:
contains
in classWrappedGraph
-
contains
public boolean contains(Node s, Node p, Node o)
Description copied from interface:Graph
Answer true iff the graph contains a triple matching (s, p, o). s/p/o may be concrete or fluid. Equivalent to find(s,p,o).hasNext, but an implementation is expected to optimise this in easy cases.- Specified by:
contains
in interfaceGraph
- Overrides:
contains
in classWrappedGraph
-
find
public ExtendedIterator<Triple> find(Triple m)
Description copied from interface:Graph
Returns an iterator over all the Triples that match the triple pattern.- Specified by:
find
in interfaceGraph
- Overrides:
find
in classWrappedGraph
- Parameters:
m
- a Triple encoding the pattern to look for- Returns:
- an iterator of all triples in this graph that match m
-
find
public ExtendedIterator<Triple> find(Node subj, Node pred, Node obj)
Description copied from interface:Graph
Returns an iterator over Triples matching a pattern.- Specified by:
find
in interfaceGraph
- Overrides:
find
in classWrappedGraph
- Returns:
- an iterator of triples in this graph matching the pattern.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-