Class IRIImpl
java.lang.Object
org.apache.commons.rdf.simple.IRIImpl
- All Implemented Interfaces:
BlankNodeOrIRI, IRI, RDFTerm, SimpleRDF.SimpleRDFTerm
A simple implementation of IRI.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck it this IRI is equal to another IRI.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 IRI.Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.toString()
-
Field Details
-
iri
-
-
Constructor Details
-
IRIImpl
-
-
Method Details
-
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.
-
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:
-
toString
-
equals
Description copied from interface:IRICheck it this IRI is equal to another IRI.IRI equality: Two IRIs are equal if and only if they are equivalent under Simple String Comparison according to section 5.1 of [RFC3987]. Further normalization MUST NOT be performed when comparing IRIs for equality.
Two IRI instances are equal if and only if theirIRI.getIRIString()are equal. Implementations MUST also overrideIRI.hashCode()so that two equal IRIs produce the same hash code. -
hashCode
public int hashCode()Description copied from interface:IRICalculate a hash code for this IRI.The returned hash code MUST be equal to the
String.hashCode()of theIRI.getIRIString().This method MUST be implemented in conjunction with
IRI.equals(Object)so that two equal IRIs produce the same hash code.
-