Class JsonLdGraphImpl
java.lang.Object
org.apache.commons.rdf.jsonldjava.AbstractJsonLdGraphLike<Triple>
org.apache.commons.rdf.jsonldjava.JsonLdGraphImpl
- All Implemented Interfaces:
AutoCloseable, Graph, GraphLike<Triple>, JsonLdGraph, JsonLdGraphLike<Triple>
-
Field Summary
FieldsFields inherited from class AbstractJsonLdGraphLike
bnodePrefix, factory, rdfDataSet -
Constructor Summary
ConstructorsConstructorDescriptionJsonLdGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet) JsonLdGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet, Optional<BlankNodeOrIRI> graphName, String bnodePrefix) JsonLdGraphImpl(String bnodePrefix) -
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.voidAdd a statement.(package private) JsonLdTripleasTripleOrQuad(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad) voidclear()Remove all statements.booleancontains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Checks if graph contains a pattern of triples.booleanCheck if statement is contained.voidremove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Removes a concrete pattern of triples from the graph.voidAdd a statement.longsize()Number of statements.stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) Gets all triples contained by the graph matched with the pattern.Methods inherited from class AbstractJsonLdGraphLike
add, close, contains, filteredGraphs, getRdfDataSet, graphNameAsJsonLdString, quadFilter, remove, streamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Graph
close, getTriples, getTriples, iterate, iterate, streamMethods inherited from interface JsonLdGraphLike
getRdfDataSet
-
Field Details
-
graphName
-
-
Constructor Details
-
JsonLdGraphImpl
JsonLdGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet) -
JsonLdGraphImpl
JsonLdGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet, Optional<BlankNodeOrIRI> graphName, String bnodePrefix) -
JsonLdGraphImpl
JsonLdGraphImpl(String bnodePrefix)
-
-
Method Details
-
clear
-
add
-
add
Description copied from interface:GraphAdds a triple to the graph, possibly mapping any of the components to those supported by this Graph. -
contains
Description copied from interface:GraphChecks if graph contains a pattern of triples. -
contains
Description copied from interface:GraphLikeCheck if statement is contained.- Specified by:
containsin interfaceGraph- Specified by:
containsin interfaceGraphLike<Triple>- Overrides:
containsin classAbstractJsonLdGraphLike<Triple>- Parameters:
t- TheTripleLikestatement to check- Returns:
- True if the statement is contained
-
remove
Description copied from interface:GraphRemoves a concrete pattern of triples from the graph. -
remove
-
size
-
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. -
asTripleOrQuad
Description copied from class:AbstractJsonLdGraphLike- Specified by:
asTripleOrQuadin classAbstractJsonLdGraphLike<Triple>- Parameters:
jsonldQuad- jsonld quad to convert- Returns:
- converted
TripleLike - See Also:
-