com.xml_project.morganaxdm
Class XS_DateTime
java.lang.Object
com.xml_project.morganaxdm.XdmSequence
com.xml_project.morganaxdm.XdmItem
com.xml_project.morganaxdm.XdmValue
com.xml_project.morganaxdm.XS_AnySimpleType
com.xml_project.morganaxdm.XS_AnyAtomicType
com.xml_project.morganaxdm.XS_Calendar
com.xml_project.morganaxdm.XS_DateTime
- All Implemented Interfaces:
- XS_AnyType, java.lang.Iterable<XdmItem>
public class XS_DateTime
- extends XS_Calendar
Implementation of xs:dateTime
Field Summary |
static javax.xml.namespace.QName |
TypeName
|
Methods inherited from class com.xml_project.morganaxdm.XS_Calendar |
checkDigits, clearTimezone, compareValues, getComponent, getMicrosecondsAsString, getTimezone, getTimezoneAsDuration, getTimezoneAsXS_dayTimeDuration, getTimezoneXMLValue, hasTimezone, make2Digits, make4Digits, parseTimezone, setTimezone, setTimezone, splitTimezoneFromTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeName
public static final javax.xml.namespace.QName TypeName
XS_DateTime
protected XS_DateTime(int timezone,
XS_Date.Date aDate)
XS_DateTime
protected XS_DateTime(int timezone,
com.xml_project.morganaxdm.XS_Time.Time aTime)
XS_DateTime
public XS_DateTime(int timezone,
XS_Date.Date aDate,
com.xml_project.morganaxdm.XS_Time.Time aTime)
getTypeName
public javax.xml.namespace.QName getTypeName()
getStringValue
public java.lang.String getStringValue()
- Description copied from class:
XdmItem
- Returns the string value.
- Specified by:
getStringValue
in class XdmItem
- Returns:
- the string value.
getTime
protected com.xml_project.morganaxdm.XS_Time.Time getTime()
getDate
protected XS_Date.Date getDate()
getValue
public java.lang.Object getValue()
- Description copied from class:
XdmItem
- Returns the value itself.
- Specified by:
getValue
in class XdmItem
- Returns:
- the value.
isOrdered
public boolean isOrdered()
- Specified by:
isOrdered
in class XS_AnyAtomicType
newInstance
public static XS_DateTime newInstance(XdmValue value)
throws XPathException
- Throws:
XPathException
getRestrictionBase
public static java.lang.Class<? extends XS_AnyType> getRestrictionBase()
makeToMillis
public long makeToMillis()
makeToXS_DateTime
public XS_DateTime makeToXS_DateTime()
- Specified by:
makeToXS_DateTime
in class XS_Calendar
makeToXS_Date
public XS_Date makeToXS_Date()
makeToXS_Time
public XS_Time makeToXS_Time()
compare
protected int compare(XS_DateTime other)
throws XPathException
- Throws:
XPathException
adjustToZ
protected XS_DateTime adjustToZ()
- Transforms dateTime to corresponding dateTime at Z if timezone is present
The dateTime is not converted using implicit timezone
addDuration
protected void addDuration(XS_Duration.Duration d)
- Adds a duration to this xs:dateTime
- Parameters:
d
-
copy
public XS_DateTime copy()
addDuration
public static XS_DateTime addDuration(XS_DateTime org,
XS_Duration dur)
- Calculates a new xs:dateTime by adding duration to the existing value
- Parameters:
org
- dur
-
- Returns:
- the calculated dateTime
subDuration
public static XS_DateTime subDuration(XS_DateTime org,
XS_Duration dur)
- Calculates a new xs:dateTime by adding -duration to the existing value
- Parameters:
org
- dur
-
- Returns:
- the calculated dateTime
create
public static XS_DateTime create(long millis)
create
public static XS_DateTime create(java.util.GregorianCalendar cal)
getCurrentDateTime
public static XS_DateTime getCurrentDateTime()
diff
public static XS_dayTimeDuration diff(XS_DateTime d1,
XS_DateTime d2,
DynamicXQueryContext context)
- Calculates difference between two dateTimes as dayTimeDuration
- Parameters:
d1
- d2
-
- Returns:
- the calculated dayTimeDuration