Class W3CRDFSyntax.FormatIRI

java.lang.Object
org.apache.commons.rdf.api.W3CRDFSyntax.FormatIRI
All Implemented Interfaces:
BlankNodeOrIRI, IRI, RDFTerm
Enclosing class:
W3CRDFSyntax

private static final class W3CRDFSyntax.FormatIRI extends Object implements IRI
IRI representing a W3C RDF format.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static String
     
    private final String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    FormatIRI(String format)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • BASE

      private static String BASE
    • format

      private final String format
  • Constructor Details

    • FormatIRI

      private FormatIRI(String format)
  • Method Details

    • getIRIString

      public String 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 interface IRI
      Returns:
      The IRI encoded as a native Unicode String.
    • ntriplesString

      public String 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 interface RDFTerm
      Returns:
      The term serialised as RDF-1.1 N-Triples.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Description copied from interface: IRI
      Calculate a hash code for this IRI.

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

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

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