Class W3CRDFSyntax.FormatIRI

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String BASE  
      private java.lang.String format  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FormatIRI​(java.lang.String format)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Check it this IRI is equal to another IRI.
      java.lang.String getIRIString()
      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.
      java.lang.String ntriplesString()
      Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • BASE

        private static java.lang.String BASE
      • format

        private final java.lang.String format
    • Constructor Detail

      • FormatIRI

        private FormatIRI​(java.lang.String format)
    • Method Detail

      • getIRIString

        public java.lang.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 java.lang.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:
        RDF-1.1 N-Triples Canonical form
      • toString

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

        public boolean equals​(java.lang.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 java.lang.Object
        Parameters:
        obj - Another object
        Returns:
        true if other is an IRI and is equal to this
        See Also:
        Object.equals(Object)
      • 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 java.lang.Object
        Returns:
        a hash code value for this IRI.
        See Also:
        Object.hashCode()