Class JsonLdBlankNodeImpl
- All Implemented Interfaces:
BlankNode, BlankNodeOrIRI, RDFTerm, JsonLdBlankNode, JsonLdTerm
-
Field Summary
FieldsFields inherited from class JsonLdTermImpl
node -
Constructor Summary
ConstructorsConstructorDescriptionJsonLdBlankNodeImpl(com.github.jsonldjava.core.RDFDataset.Node node, String blankNodePrefix) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck it this RDFTerm is equal to another RDFTerm.inthashCode()Calculate a hash code for this RDFTerm.Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.toString()Return a reference for uniquely identifying the blank node.Methods inherited from class JsonLdTermImpl
asJsonLdNodeMethods inherited from interface JsonLdTerm
asJsonLdNode
-
Field Details
-
blankNodePrefix
-
-
Constructor Details
-
JsonLdBlankNodeImpl
JsonLdBlankNodeImpl(com.github.jsonldjava.core.RDFDataset.Node node, String blankNodePrefix)
-
-
Method Details
-
ntriplesString
Description copied from interface:RDFTermReturn the term serialised as specified by the RDF-1.1 N-Triples Canonical form.- Specified by:
ntriplesStringin interfaceRDFTerm- Returns:
- The term serialised as RDF-1.1 N-Triples.
- See Also:
-
uniqueReference
Description copied from interface:BlankNodeReturn a reference for uniquely identifying the blank node.The reference string MUST universally and uniquely identify this blank node. That is, different blank nodes created separately in different JVMs or from different
RDFinstances MUST NOT have the same reference string.The
BlankNode.uniqueReference()of twoBlankNodeinstances MUST be equal if and only if the two blank nodes are equal according toBlankNode.equals(Object).Clients should not assume any particular structure of the reference string, however it is recommended that the reference string contain a UUID-derived string, e.g. as returned from
UUID.toString().IMPORTANT: This is not a blank node identifier nor a serialization/syntax label, and there are no guarantees that it is a valid identifier in any concrete RDF syntax. For an N-Triples compatible identifier, use
RDFTerm.ntriplesString().- Specified by:
uniqueReferencein interfaceBlankNode- Returns:
- A universally unique reference to identify this
BlankNode
-
equals
Description copied from interface:RDFTermCheck it this RDFTerm is equal to another RDFTerm.If this object is an
IRI, equality is checked usingIRI.equals(Object), or if this object is aBlankNode, equality is checked usingBlankNode.equals(Object), or if this object is aLiteral, equality is checked usingLiteral.equals(Object).Implementations MUST also override
RDFTerm.hashCode()so that two equal Literals produce the same hash code. -
hashCode
public int hashCode()Description copied from interface:RDFTermCalculate a hash code for this RDFTerm.As an
RDFTermis immutable, this method will always return the same hashCode over the lifetime of this object.This method MUST be implemented in conjunction with
RDFTerm.equals(Object)so that two equal RDFTerm produce the same hash code. -
toString
- Overrides:
toStringin classJsonLdTermImpl
-