Interface QuadLike<G extends RDFTerm>
- All Superinterfaces:
TripleLike
- All Known Subinterfaces:
JsonLdQuad
,JsonLdQuadLike<G>
,Quad
,RDF4JQuad
- All Known Implementing Classes:
JsonLdQuadImpl
,JsonLdQuadLikeImpl
,JsonLdTripleImpl
,QuadImpl
,QuadImpl
Quad
.
A QuadLike statement has at least a TripleLike.getSubject()
,
TripleLike.getPredicate()
, TripleLike.getObject()
and getGraphName()
,
but unlike a Quad
does not have a formalised
Quad.equals(Object)
or Quad.hashCode()
semantics and is not
required to be immutable or thread-safe. This interface can
also be used for generalised quads (e.g. a BlankNode
as
predicate).
Implementations should specialise which specific RDFTerm
types they
return by overriding TripleLike.getSubject()
, TripleLike.getPredicate()
,
TripleLike.getObject()
and getGraphName()
.
- Since:
- 0.3.0-incubating
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThe graph name (graph label) of this statement, if present.Methods inherited from interface org.apache.commons.rdf.api.TripleLike
getObject, getPredicate, getSubject
-
Method Details
-
getGraphName
The graph name (graph label) of this statement, if present.If
Optional.isPresent()
, then theOptional.get()
indicate the graph name of this statement. If the graph name is not present,e.g. the value isOptional.empty()
, it indicates that this Quad is in the default graph.- Returns:
- If
Optional.isPresent()
, the graph name of this quad, otherwiseOptional.empty()
, indicating the default graph. The graph name is typically anIRI
orBlankNode
.
-