Interface IRI

All Superinterfaces:
BlankNodeOrIRI, RDFTerm
All Known Subinterfaces:
JsonLdIRI, RDF4JIRI
All Known Implementing Classes:
IRIImpl, IRIImpl, JsonLdIRIImpl, Types, W3CRDFSyntax.FormatIRI

public interface IRI extends BlankNodeOrIRI
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 Type
    Method
    Description
    boolean
    equals(Object other)
    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
    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

      boolean equals(Object other)
      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 their getIRIString() are equal. Implementations MUST also override hashCode() so that two equal IRIs produce the same hash code.
      Specified by:
      equals in interface RDFTerm
      Overrides:
      equals in class Object
      Parameters:
      other - Another object
      Returns:
      true if other is an IRI and is equal to this
      See Also:
    • hashCode

      int hashCode()
      Calculate a hash code for this IRI.

      The returned hash code MUST be equal to the String.hashCode() of the getIRIString().

      This method MUST be implemented in conjunction with equals(Object) so that two equal IRIs produce the same hash code.

      Specified by:
      hashCode in interface RDFTerm
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this IRI.
      See Also: