org.deri.iris.terms.concrete
Class Time

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

public class Time
extends Object
implements ITime

Simple implementation of ITime.


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.
 double getDecimalSecond()
          Return the complete floating point representation of the seconds components.
 int getHour()
          Returns the hour of the day.
 int getMillisecond()
          Returns the milliseconds of the second.
 int getMinute()
          Returns the minute of the hour.
 int getSecond()
          Returns the seconds of the minute.
 TimeZone getTimeZone()
          Returns the Timezone.
protected static int getTimeZoneHour(TimeZone tz)
           
protected static int getTimeZoneMinute(TimeZone tz)
           
 XMLGregorianCalendar 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

compareTo

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

equals

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

getHour

public int getHour()
Description copied from interface: ITime
Returns the hour of the day.

Specified by:
getHour in interface ITime
Returns:
the hours (zero-based)

getMinute

public int getMinute()
Description copied from interface: ITime
Returns the minute of the hour.

Specified by:
getMinute in interface ITime
Returns:
the minutes

getSecond

public int getSecond()
Description copied from interface: ITime
Returns the seconds of the minute.

Specified by:
getSecond in interface ITime
Returns:
the seconds

getMillisecond

public int getMillisecond()
Description copied from interface: ITime
Returns the milliseconds of the second.

Specified by:
getMillisecond in interface ITime
Returns:
the milliseconds

getDecimalSecond

public double getDecimalSecond()
Description copied from interface: ITime
Return the complete floating point representation of the seconds components.

Specified by:
getDecimalSecond in interface ITime
Returns:
Decimal seconds

getTimeZone

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

Specified by:
getTimeZone in interface ITime
Returns:
the timezone

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getTimeZoneHour

protected static int getTimeZoneHour(TimeZone tz)

getTimeZoneMinute

protected static int getTimeZoneMinute(TimeZone tz)

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.

getValue

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

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

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.