org.deri.iris.terms.concrete
Class XMLLiteral

java.lang.Object
  extended by org.deri.iris.terms.concrete.XMLLiteral
All Implemented Interfaces:
Comparable<ITerm>, IXMLLiteral, IConcreteTerm, ITerm

public class XMLLiteral
extends Object
implements IXMLLiteral

Implementation of the rdf:XMLLiteral data-type.

Author:
gigi

Method Summary
 int compareTo(ITerm thatObject)
           
 boolean equals(Object thatObject)
           
 URI getDatatypeIRI()
          Returns the fully qualified identifier for the data type corresponding to this term.
 String getLang()
          Returns the language identifier for this XML element, or null if not language identifier is defined.
 String getString()
          Returns the represented XML element content as a string.
 String[] getValue()
          Returns a vale of the term.
 int hashCode()
           
 boolean isGround()
          Checks whether the term is ground (a term with no variables).
 String toCanonicalString()
          Returns a canonical string representation of this term.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

getDatatypeIRI

public URI getDatatypeIRI()
Description copied from interface: IConcreteTerm
Returns the fully qualified identifier for the data type corresponding to this term. For instance, a terms representing a double data type should return the URI "http://www.w3.org/2001/XMLSchema#double".

Specified by:
getDatatypeIRI in interface IConcreteTerm
Returns:
The fully qualified identifier for the data type corresponding to this term.

getString

public String getString()
Description copied from interface: IXMLLiteral
Returns the represented XML element content as a string.

Specified by:
getString in interface IXMLLiteral
Returns:
The represented XML element content as a string.

getLang

public String getLang()
Description copied from interface: IXMLLiteral
Returns the language identifier for this XML element, or null if not language identifier is defined. This string directly corresponds to the xml:lang attribute.

Specified by:
getLang in interface IXMLLiteral
Returns:
The language identifier for this XML element, or null if not language identifier is defined.

getValue

public String[] getValue()
Description copied from interface: ITerm
Returns a vale of the term.

Specified by:
getValue in interface IXMLLiteral
Specified by:
getValue in interface ITerm
Returns:
The term value.

isGround

public boolean isGround()
Description copied from interface: ITerm
Checks whether the term is ground (a term with no variables).

Specified by:
isGround in interface ITerm
Returns:
true if the term is ground, otherwise false.

equals

public boolean equals(Object thatObject)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(ITerm thatObject)
Specified by:
compareTo in interface Comparable<ITerm>

toCanonicalString

public String toCanonicalString()
Description copied from interface: IConcreteTerm
Returns a canonical string representation of this term.

Specified by:
toCanonicalString in interface IConcreteTerm
Returns:
A canonical string representation of this term.