Package org.apache.commons.rdf.api
Interface IRI
- All Superinterfaces:
BlankNodeOrIRI
,RDFTerm
- All Known Implementing Classes:
IRIImpl
,IRIImpl
,JsonLdIRIImpl
,Types
,W3CRDFSyntax.FormatIRI
An RDF-1.1 IRI,
as defined by RDF-1.1
Concepts and Abstract Syntax, a W3C Recommendation published on 25
February 2014.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check 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.int
hashCode()
Calculate a hash code for this IRI.Methods inherited from interface org.apache.commons.rdf.api.RDFTerm
ntriplesString
-
Method Details
-
getIRIString
String getIRIString()Return the IRI encoded as a native Unicode String.
The returned string must not include URL-encoding to escape non-ASCII characters.- Returns:
- The IRI encoded as a native Unicode String.
-
equals
Check 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 theirgetIRIString()
are equal. Implementations MUST also overridehashCode()
so that two equal IRIs produce the same hash code. -
hashCode
int hashCode()Calculate a hash code for this IRI.The returned hash code MUST be equal to the
String.hashCode()
of thegetIRIString()
.This method MUST be implemented in conjunction with
equals(Object)
so that two equal IRIs produce the same hash code.
-