org.deri.iris.terms.concrete
Class DateTerm

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

public class DateTerm
extends Object
implements IDateTerm

Simple implementation of the IDateTerm.

$Id$

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

Method Summary
 int compareTo(ITerm o)
           
 boolean equals(Object obj)
           
 URI getDatatypeIRI()
          Returns the fully qualified identifier for the data type corresponding to this term.
 int getDay()
          Returns the day of the month.
 int getMonth()
          Returns the month of the year.
 TimeZone getTimeZone()
          Returns the Timezone
 XMLGregorianCalendar getValue()
          Return the wrapped type.
 int getYear()
          Returns the year.
 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

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

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>

getMonth

public int getMonth()
Description copied from interface: IDateTerm
Returns the month of the year.

Specified by:
getMonth in interface IDateTerm
Returns:
the month.

getYear

public int getYear()
Description copied from interface: IDateTerm
Returns the year.

Specified by:
getYear in interface IDateTerm
Returns:
the year.

getDay

public int getDay()
Description copied from interface: IDateTerm
Returns the day of the month.

Specified by:
getDay in interface IDateTerm
Returns:
the day

getValue

public XMLGregorianCalendar getValue()
Description copied from interface: IDateTerm
Return the wrapped type.

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

getTimeZone

public TimeZone getTimeZone()
Description copied from interface: IDateTerm
Returns the Timezone

Specified by:
getTimeZone in interface IDateTerm
Returns:
the timezone

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.