org.deri.iris.terms.concrete
Class PlainLiteral

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

public class PlainLiteral
extends Object
implements IPlainLiteral

A term representing a rdf:PlainLiteral, former known as rdf:text.


Method Summary
 int compareTo(ITerm o)
           
 boolean equals(Object o)
           
 URI getDatatypeIRI()
          Returns the fully qualified identifier for the data type corresponding to this term.
 String getLang()
          Returns the language tag, e.g.
 String getString()
          Returns the string, e.g.
 String[] getValue()
          Returns a string array where the first element is the text string and the second element is the language tag.
 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

getValue

public String[] getValue()
Returns a string array where the first element is the text string and the second element is the language tag.

Specified by:
getValue in interface IPlainLiteral
Specified by:
getValue in interface ITerm
Returns:
The wrapped type.

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.

compareTo

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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getString

public String getString()
Description copied from interface: IPlainLiteral
Returns the string, e.g. "Padre de familia", if this text represents "Padre de familia@es".

Specified by:
getString in interface IPlainLiteral
Returns:
The text.

getLang

public String getLang()
Description copied from interface: IPlainLiteral
Returns the language tag, e.g. "es", if this text represents "Padre de familia@es".

Specified by:
getLang in interface IPlainLiteral
Returns:
The language tag.

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.

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.