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 org.apache.commons.rdf.jsonldjava.JsonLdTermImpl
node
-
Constructor Summary
ConstructorsConstructorDescriptionJsonLdIRIImpl
(com.github.jsonldjava.core.RDFDataset.Node node) JsonLdIRIImpl
(String iri) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check 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.int
hashCode()
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 org.apache.commons.rdf.jsonldjava.JsonLdTermImpl
asJsonLdNode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.rdf.jsonldjava.JsonLdTerm
asJsonLdNode
-
Constructor Details
-
JsonLdIRIImpl
JsonLdIRIImpl(com.github.jsonldjava.core.RDFDataset.Node node) -
JsonLdIRIImpl
JsonLdIRIImpl(String iri)
-
-
Method Details
-
ntriplesString
Description copied from interface:RDFTerm
Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.- Specified by:
ntriplesString
in interfaceRDFTerm
- Returns:
- The term serialised as RDF-1.1 N-Triples.
- See Also:
-
getIRIString
Description copied from interface:IRI
Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Specified by:
getIRIString
in interfaceIRI
- Returns:
- The IRI encoded as a native Unicode String.
-
hashCode
public int hashCode()Description copied from interface:RDFTerm
Calculate a hash code for this RDFTerm.As an
RDFTerm
is 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:RDFTerm
Check 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.
-