Interface RdfQuadSet
-
- All Known Implementing Classes:
OrderedQuadDataset,OrderedQuadSet,QuadDataset,QuadSet
public interface RdfQuadSetRepresents a collection of RDF Quad statements.An
RdfQuadSetis a set ofRdfQuadobjects, which are immutable N-Quad statements consisting of a subject, predicate, object, and an optional graph name. This interface provides methods for querying the presence of quads and streaming them.Implementations of this interface may optionally support adding or removing quads.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanadd(RdfQuad quad)AddsRdfQuadto the RDF graph.booleancontains(RdfQuad quad)Checks if the set contains the specifiedRdfQuad.default booleanremove(RdfQuad quad)RemovesRdfQuadfrom the RDF graph.java.util.stream.Stream<RdfQuad>stream()Returns aStreamof the RDF quads in this set.
-
-
-
Method Detail
-
contains
boolean contains(RdfQuad quad)
Checks if the set contains the specifiedRdfQuad.- Parameters:
quad- theRdfQuadto check- Returns:
trueif the set contains the specified quad,falseotherwise
-
stream
java.util.stream.Stream<RdfQuad> stream()
Returns aStreamof the RDF quads in this set.The stream can be used for operations such as filtering or mapping over the quads.
- Returns:
- a stream of
RdfQuadobjects in the set
-
add
default boolean add(RdfQuad quad)
AddsRdfQuadto the RDF graph.This operation is unsupported by default and will throw an
UnsupportedOperationException. Implementations that support modification of the set should override this method.- Parameters:
quad- theRdfQuadto add- Returns:
trueif the quad was successfully added (implementation dependent)- Throws:
java.lang.UnsupportedOperationException- if modification of the set is not supported
-
remove
default boolean remove(RdfQuad quad)
RemovesRdfQuadfrom the RDF graph.This operation is unsupported by default and will throw an
UnsupportedOperationException. Implementations that support removal of quads should override this method.- Parameters:
quad- theRdfQuadto remove- Returns:
trueif the quad was successfully removed (implementation dependent)- Throws:
java.lang.UnsupportedOperationException- if removal of the quad is not supported
-
-