Class JsonLdIRIImpl
java.lang.Object
org.apache.commons.rdf.jsonldjava.JsonLdTermImpl
org.apache.commons.rdf.jsonldjava.JsonLdIRIImpl
- All Implemented Interfaces:
BlankNodeOrIRI, IRI, RDFTerm, JsonLdIRI, JsonLdTerm
-
Field Summary
Fields inherited from class JsonLdTermImpl
node -
Constructor Summary
ConstructorsConstructorDescriptionJsonLdIRIImpl(com.github.jsonldjava.core.RDFDataset.Node node) JsonLdIRIImpl(String iri) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck it this RDFTerm is equal to another RDFTerm.Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.inthashCode()Calculate a hash code for this RDFTerm.Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.Methods inherited from class JsonLdTermImpl
asJsonLdNode, toStringMethods inherited from interface JsonLdTerm
asJsonLdNode
-
Constructor Details
-
JsonLdIRIImpl
JsonLdIRIImpl(com.github.jsonldjava.core.RDFDataset.Node node) -
JsonLdIRIImpl
JsonLdIRIImpl(String iri)
-
-
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:
-
getIRIString
Description copied from interface:IRIReturn the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Specified by:
getIRIStringin interfaceIRI- Returns:
- The IRI encoded as a native Unicode String.
-
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. -
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.
-