org.deri.iris.terms
Class StringTerm

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

public class StringTerm
extends Object
implements IStringTerm

Simple implementation of the IStringTerm.

$Id$

Version:
$Revision$
Author:
Richard P??ttler (richard dot poettler at deri dot at)

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 getValue()
          Return the wrapped type.
 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()
          Simple toString() method wich only returns the holded value surrounded by "'".
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getValue

public String getValue()
Description copied from interface: IStringTerm
Return the wrapped type.

Specified by:
getValue in interface IStringTerm
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.

compareTo

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Simple toString() method wich only returns the holded value surrounded by "'".

Overrides:
toString in class Object
Returns:
the containing String

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.