Package org.apache.commons.rdf.api
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 java.lang.Object implements IRI
IRI representing a W3C RDF format.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateFormatIRI(java.lang.String format)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Check it this IRI is equal to another IRI.java.lang.StringgetIRIString()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.java.lang.StringntriplesString()Return the term serialised as specified by the RDF-1.1 N-Triples Canonical form.java.lang.StringtoString()
-
-
-
Method Detail
-
getIRIString
public java.lang.String 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
public java.lang.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:
- RDF-1.1 N-Triples Canonical form
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
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.
-
-