Class JsonLdUnionGraphImpl
- java.lang.Object
-
- org.apache.commons.rdf.jsonldjava.AbstractJsonLdGraphLike<Triple>
-
- org.apache.commons.rdf.jsonldjava.JsonLdUnionGraphImpl
-
- All Implemented Interfaces:
java.lang.AutoCloseable,Graph,GraphLike<Triple>,JsonLdGraphLike<Triple>,JsonLdUnionGraph
class JsonLdUnionGraphImpl extends AbstractJsonLdGraphLike<Triple> implements JsonLdUnionGraph
-
-
Field Summary
-
Fields inherited from class org.apache.commons.rdf.jsonldjava.AbstractJsonLdGraphLike
bnodePrefix, factory, rdfDataSet
-
-
Constructor Summary
Constructors Constructor Description JsonLdUnionGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet)JsonLdUnionGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet, java.lang.String bnodePrefix)JsonLdUnionGraphImpl(java.lang.String bnodePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)Adds a triple to the graph, possibly mapping any of the components to those supported by this Graph.(package private) JsonLdTripleasTripleOrQuad(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad)booleancontains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)Checks if graph contains a pattern of triples.voidremove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)Removes a concrete pattern of triples from the graph.voidremove(Triple t)Add a statement.longsize()Number of statements.java.util.stream.Stream<? extends Triple>stream()Return a Stream of contained statements.java.util.stream.Stream<JsonLdTriple>stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)Gets all triples contained by the graph matched with the pattern.-
Methods inherited from class org.apache.commons.rdf.jsonldjava.AbstractJsonLdGraphLike
add, add, clear, close, contains, contains, filteredGraphs, getRdfDataSet, graphNameAsJsonLdString, quadFilter, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.rdf.api.Graph
add, clear, close, contains, getTriples, getTriples, iterate, iterate
-
Methods inherited from interface org.apache.commons.rdf.jsonldjava.JsonLdGraphLike
getRdfDataSet
-
-
-
-
Constructor Detail
-
JsonLdUnionGraphImpl
JsonLdUnionGraphImpl(java.lang.String bnodePrefix)
-
JsonLdUnionGraphImpl
JsonLdUnionGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet)
-
JsonLdUnionGraphImpl
JsonLdUnionGraphImpl(com.github.jsonldjava.core.RDFDataset rdfDataSet, java.lang.String bnodePrefix)
-
-
Method Detail
-
add
public void add(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
Description copied from interface:GraphAdds a triple to the graph, possibly mapping any of the components to those supported by this Graph.
-
contains
public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
Description copied from interface:GraphChecks if graph contains a pattern of triples.
-
remove
public void remove(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
Description copied from interface:GraphRemoves a concrete pattern of triples from the graph.
-
stream
public java.util.stream.Stream<JsonLdTriple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm object)
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.
-
stream
public java.util.stream.Stream<? extends Triple> stream()
Description copied from interface:GraphLikeReturn a Stream of contained statements.- Specified by:
streamin interfaceGraph- Specified by:
streamin interfaceGraphLike<Triple>- Overrides:
streamin classAbstractJsonLdGraphLike<Triple>- Returns:
- A
StreamofTripleLikestatements.
-
asTripleOrQuad
JsonLdTriple asTripleOrQuad(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad)
Description copied from class:AbstractJsonLdGraphLike- Specified by:
asTripleOrQuadin classAbstractJsonLdGraphLike<Triple>- Parameters:
jsonldQuad- jsonld quad to convert- Returns:
- converted
TripleLike - See Also:
JsonLdRDF.asTriple(Quad),JsonLdRDF.asQuad(Quad)
-
-