Class GraphImpl
- All Implemented Interfaces:
AutoCloseable, Graph, GraphLike<Triple>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Adds a triple to the graph, possibly mapping any of the components to those supported by this Graph.voidAdds a triple to the graph, possibly mapping any of the components of the Triple to those supported by this Graph.voidclear()Clears the graph, removing all triples.booleancontains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Checks if graph contains a pattern of triples.booleanChecks if graph contains triple.getTriples(Predicate<Triple> filter) private TripleinternallyMap(Triple triple) internallyMap(T object) voidremove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Removes a concrete pattern of triples from the graph.voidRemoves a concrete triple from the graph.longsize()Number of triples contained by the graph.stream()Gets all triples contained by the graph.stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Gets all triples contained by the graph matched with the pattern.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Graph
close, getTriples, getTriples, iterate, iterate
-
Field Details
-
TO_STRING_MAX
private static final int TO_STRING_MAX- See Also:
-
triples
-
factory
-
-
Constructor Details
-
GraphImpl
GraphImpl(SimpleRDF simpleRDF)
-
-
Method Details
-
add
Description copied from interface:GraphAdds a triple to the graph, possibly mapping any of the components to those supported by this Graph. -
add
Description copied from interface:GraphAdds a triple to the graph, possibly mapping any of the components of the Triple to those supported by this Graph. -
internallyMap
-
internallyMap
-
clear
-
contains
Description copied from interface:GraphChecks if graph contains a pattern of triples. -
contains
Description copied from interface:GraphChecks if graph contains triple. -
stream
Description copied from interface:GraphGets all triples contained by the graph.
The iteration does not contain any duplicate triples, as determined by the
Triple.equals(Object)method for eachTriple.The behaviour of the
Streamis not specified ifGraph.add(Triple),Graph.remove(Triple)orGraph.clear()are called on theGraphbefore it terminates.Implementations may throw
ConcurrentModificationExceptionfrom Stream methods if they detect a conflict while the Stream is active. -
stream
Description copied from interface:GraphGets all triples contained by the graph matched with the pattern.The iteration does not contain any duplicate triples, as determined by the
Triple.equals(Object)method for eachTriple.The behaviour of the
Streamis not specified ifGraph.add(Triple),Graph.remove(Triple)orGraph.clear()are called on theGraphbefore it terminates.Implementations may throw
ConcurrentModificationExceptionfrom Stream methods if they detect a conflict while the Stream is active. -
getTriples
-
remove
Description copied from interface:GraphRemoves a concrete pattern of triples from the graph. -
remove
-
size
public long size()Description copied from interface:GraphNumber of triples contained by the graph.The count of a set does not include duplicates, consistent with the
Triple.equals(Object)equals method for eachTriple. -
toString
-