org.deri.iris.api.terms.concrete
Interface IDuration

All Superinterfaces:
Comparable<ITerm>, IConcreteTerm, ITerm
All Known Subinterfaces:
IDayTimeDuration, IYearMonthDuration
All Known Implementing Classes:
DayTimeDuration, Duration, YearMonthDuration

public interface IDuration
extends IConcreteTerm

This is a interface to represent durations from seconds up to years.

Remark: IRIS supports datatypes according to the standard specification for primitive XML Schema datatypes.


Method Summary
 int getDay()
          Returns the days
 double getDecimalSecond()
          Return the complete floating point representation of the seconds components.
 int getHour()
          Returns the hours
 int getMillisecond()
          Returns the milliseconds.
 int getMinute()
          returns the minutes
 int getMonth()
          Returns the months
 int getSecond()
          Returns the seconds
 Duration getValue()
          Return the wrapped type.
 int getYear()
          Returns the years.
 boolean isPositive()
          Returns true if this is a positive duration, false otherwise.
 
Methods inherited from interface org.deri.iris.api.terms.IConcreteTerm
getDatatypeIRI, toCanonicalString
 
Methods inherited from interface org.deri.iris.api.terms.ITerm
isGround
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getValue

Duration getValue()
Return the wrapped type.

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

isPositive

boolean isPositive()
Returns true if this is a positive duration, false otherwise. Also returns true if this is a duration of length 0.

Returns:
true if this is a positive duration, false otherwise.

getYear

int getYear()
Returns the years.

Returns:
the years

getMonth

int getMonth()
Returns the months

Returns:
the months

getDay

int getDay()
Returns the days

Returns:
the days

getHour

int getHour()
Returns the hours

Returns:
the hours

getMinute

int getMinute()
returns the minutes

Returns:
the minutes

getSecond

int getSecond()
Returns the seconds

Returns:
the seconds

getMillisecond

int getMillisecond()
Returns the milliseconds.

Returns:
the milliseconds

getDecimalSecond

double getDecimalSecond()
Return the complete floating point representation of the seconds components.

Returns:
Decimal seconds