de.fraunhofer.ipsi.xpathDatatypes
Class XS_DateTime

java.lang.Object
  extended by de.fraunhofer.ipsi.xpathDatatypes.XS_AnySimpleType
      extended by de.fraunhofer.ipsi.xpathDatatypes.XDT_AnyAtomicType
          extended by de.fraunhofer.ipsi.xpathDatatypes.XS_DateTime
All Implemented Interfaces:
java.lang.Comparable

public class XS_DateTime
extends XDT_AnyAtomicType
implements java.lang.Comparable


Field Summary
static XS_DateTime REFERENCE_DATETIME
           
 
Constructor Summary
XS_DateTime(java.lang.String s)
          Constructor
XS_DateTime(XS_Date date)
          Constructor
XS_DateTime(XS_Date date, XS_Time time)
           
XS_DateTime(XS_GDay gd)
           
XS_DateTime(XS_GMonth gm)
           
XS_DateTime(XS_GMonthDay gmd)
           
XS_DateTime(XS_GYear gy)
           
XS_DateTime(XS_GYearMonth gym)
           
XS_DateTime(XS_Time time)
           
 
Method Summary
 XS_DateTime add(XDT_DayTimeDuration dayTimeDuration)
          Method add
 XS_DateTime add(XDT_YearMonthDuration yearMonthDuration)
          Method add
<T extends XDT_AnyAtomicType>
T
castas(java.lang.Class<T> type)
          Method castas
 int compareTo(java.lang.Object o)
          Method dateTimeLessThan
static XS_DateTime currentDateTime()
          Method currentDateTime
 XS_Integer getDay()
          Method getDayF
 XDT_DayTimeDuration getDayTimeDuration(XS_DateTime dateTime)
          Method getDayTimeDuration
 XS_Integer getHours()
          Method getHoursF
 XS_Integer getMinutes()
          Method getMinutes
 XS_Integer getMonth()
          Method getMonth
 XS_Decimal getSeconds()
          Method getSeconds
 XS_Integer getYear()
          Method getYear
 XDT_YearMonthDuration getYearMonthDuration(XS_DateTime dateTime)
          Method getYearMonthDuration
 XS_DateTime secondsToDateTime(double seconds, boolean positive)
          Method secondsToDateTime
 XS_DateTime subtract(XDT_DayTimeDuration dayTimeDuration)
          Method subtract
 XS_DateTime subtract(XDT_YearMonthDuration yearMonthDuration)
          Method subtract
 java.lang.String toString()
          Method toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REFERENCE_DATETIME

public static final XS_DateTime REFERENCE_DATETIME
Constructor Detail

XS_DateTime

public XS_DateTime(java.lang.String s)
Constructor

Parameters:
dateTime - a XS_String

XS_DateTime

public XS_DateTime(XS_Date date)
Constructor

Parameters:
date - a XS_Date

XS_DateTime

public XS_DateTime(XS_Time time)

XS_DateTime

public XS_DateTime(XS_GYearMonth gym)

XS_DateTime

public XS_DateTime(XS_GYear gy)

XS_DateTime

public XS_DateTime(XS_GMonthDay gmd)

XS_DateTime

public XS_DateTime(XS_GMonth gm)

XS_DateTime

public XS_DateTime(XS_GDay gd)

XS_DateTime

public XS_DateTime(XS_Date date,
                   XS_Time time)
Method Detail

toString

public java.lang.String toString()
Method toString

Overrides:
toString in class java.lang.Object
Returns:
a String

currentDateTime

public static XS_DateTime currentDateTime()
Method currentDateTime

Returns:
XS_dateTime

castas

public <T extends XDT_AnyAtomicType> T castas(java.lang.Class<T> type)
                                   throws java.lang.ClassCastException,
                                          XPathDTException
Method castas

Overrides:
castas in class XDT_AnyAtomicType
Parameters:
type - a BuiltinSimpleType
Returns:
a XS_AnySimpleType
Throws:
CastError
java.lang.ClassCastException
XPathDTException

compareTo

public int compareTo(java.lang.Object o)
Method dateTimeLessThan

Specified by:
compareTo in interface java.lang.Comparable
Returns:
XS_Boolean

getYear

public XS_Integer getYear()
Method getYear

Returns:
XS_Integer

getMonth

public XS_Integer getMonth()
Method getMonth

Returns:
XS_Integer

getDay

public XS_Integer getDay()
Method getDayF

Returns:
XS_Integer

getHours

public XS_Integer getHours()
Method getHoursF

Returns:
@XS_Integer

getMinutes

public XS_Integer getMinutes()
Method getMinutes

Returns:
@XS_Integer

getSeconds

public XS_Decimal getSeconds()
Method getSeconds

Returns:
@XS_Integer

secondsToDateTime

public XS_DateTime secondsToDateTime(double seconds,
                                     boolean positive)
Method secondsToDateTime

Parameters:
double -
Returns:
XS_DateTime

getDayTimeDuration

public XDT_DayTimeDuration getDayTimeDuration(XS_DateTime dateTime)
Method getDayTimeDuration

Parameters:
type - XS_DateTime
Returns:
XS_DayTimeDuration

getYearMonthDuration

public XDT_YearMonthDuration getYearMonthDuration(XS_DateTime dateTime)
Method getYearMonthDuration

Parameters:
type - XS_DateTime
Returns:
XS_DayTimeDuration

add

public XS_DateTime add(XDT_DayTimeDuration dayTimeDuration)
Method add

Returns:
XS_DateTime

subtract

public XS_DateTime subtract(XDT_DayTimeDuration dayTimeDuration)
Method subtract

Returns:
XS_DateTime

add

public XS_DateTime add(XDT_YearMonthDuration yearMonthDuration)
Method add

Returns:
XS_DateTime

subtract

public XS_DateTime subtract(XDT_YearMonthDuration yearMonthDuration)
Method subtract

Returns:
XS_DateTime