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
final class JsonLdIRIImpl extends JsonLdTermImpl implements JsonLdIRI
-
-
Field Summary
-
Fields inherited from class org.apache.commons.rdf.jsonldjava.JsonLdTermImpl
node
-
-
Constructor Summary
Constructors Constructor Description JsonLdIRIImpl(com.github.jsonldjava.core.RDFDataset.Node node)JsonLdIRIImpl(java.lang.String iri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Check it this RDFTerm is equal to another RDFTerm.java.lang.StringgetIRIString()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.java.lang.StringntriplesString()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
-
-
-
-
Method Detail
-
ntriplesString
public java.lang.String 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:
- RDF-1.1 N-Triples Canonical form
-
getIRIString
public java.lang.String 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.- Specified by:
hashCodein interfaceIRI- Specified by:
hashCodein interfaceRDFTerm- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code value for this RDFTerm.
- See Also:
IRI.hashCode(),Literal.hashCode(),BlankNode.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
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.- Specified by:
equalsin interfaceIRI- Specified by:
equalsin interfaceRDFTerm- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- Another object- Returns:
- true if other is a RDFTerm and is equal to this
- See Also:
IRI.equals(Object),BlankNode.equals(Object),Literal.equals(Object)
-
-