Class JsonLdQuadLikeImpl<S extends RDFTerm,P extends RDFTerm,O extends RDFTerm,G extends RDFTerm>
- java.lang.Object
-
- org.apache.commons.rdf.jsonldjava.JsonLdQuadLikeImpl<S,P,O,G>
-
- All Implemented Interfaces:
QuadLike<G>
,TripleLike
,JsonLdQuadLike<G>
,JsonLdTripleLike
- Direct Known Subclasses:
JsonLdQuadImpl
,JsonLdTripleImpl
class JsonLdQuadLikeImpl<S extends RDFTerm,P extends RDFTerm,O extends RDFTerm,G extends RDFTerm> extends java.lang.Object implements JsonLdQuadLike<G>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
blankNodePrefix
private com.github.jsonldjava.core.RDFDataset.Quad
quad
private static JsonLdRDF
rdfTermFactory
-
Constructor Summary
Constructors Constructor Description JsonLdQuadLikeImpl(com.github.jsonldjava.core.RDFDataset.Quad jsonldQuad, java.lang.String blankNodePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.jsonldjava.core.RDFDataset.Quad
asJsonLdQuad()
Return the underlying JsonLDRDFDataset.Quad
java.util.Optional<G>
getGraphName()
The graph name (graph label) of this statement, if present.O
getObject()
The object of this statement.P
getPredicate()
The predicate of this statement.S
getSubject()
The subject of this statement.java.lang.String
toString()
-
-
-
Field Detail
-
rdfTermFactory
private static JsonLdRDF rdfTermFactory
-
quad
private final com.github.jsonldjava.core.RDFDataset.Quad quad
-
blankNodePrefix
private final java.lang.String blankNodePrefix
-
-
Method Detail
-
getGraphName
public java.util.Optional<G> getGraphName()
Description copied from interface:QuadLike
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.
-
getSubject
public S getSubject()
Description copied from interface:TripleLike
The subject of this statement.- Specified by:
getSubject
in interfaceTripleLike
- Returns:
- The subject, typically an
IRI
orBlankNode
.
-
getPredicate
public P getPredicate()
Description copied from interface:TripleLike
The predicate of this statement.- Specified by:
getPredicate
in interfaceTripleLike
- Returns:
- The predicate, typically an
IRI
.
-
getObject
public O getObject()
Description copied from interface:TripleLike
The object of this statement.- Specified by:
getObject
in interfaceTripleLike
- Returns:
- The object, typically an
IRI
,BlankNode
orLiteral
.
-
asJsonLdQuad
public com.github.jsonldjava.core.RDFDataset.Quad asJsonLdQuad()
Description copied from interface:JsonLdTripleLike
Return the underlying JsonLDRDFDataset.Quad
- Specified by:
asJsonLdQuad
in interfaceJsonLdTripleLike
- Returns:
- The JsonLD
RDFDataset.Quad
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-