com.xml_project.morganaxdm
Class XS_Date

java.lang.Object
  extended by com.xml_project.morganaxdm.XdmSequence
      extended by com.xml_project.morganaxdm.XdmItem
          extended by com.xml_project.morganaxdm.XdmValue
              extended by com.xml_project.morganaxdm.XS_AnySimpleType
                  extended by com.xml_project.morganaxdm.XS_AnyAtomicType
                      extended by com.xml_project.morganaxdm.XS_Calendar
                          extended by com.xml_project.morganaxdm.XS_Date
All Implemented Interfaces:
XS_AnyType, java.lang.Iterable<XdmItem>

public class XS_Date
extends XS_Calendar

Implementation of xs:date


Nested Class Summary
protected static class XS_Date.Date
          Internal implementation for xs:date
 
Nested classes/interfaces inherited from class com.xml_project.morganaxdm.XS_AnyAtomicType
XS_AnyAtomicType.ValueComparers
 
Field Summary
static javax.xml.namespace.QName TypeName
           
 
Fields inherited from class com.xml_project.morganaxdm.XS_Calendar
NoTimeZone, StandardDate
 
Constructor Summary
protected XS_Date(int timeZone, java.util.GregorianCalendar cal)
           
protected XS_Date(int timeZone, XS_Date.Date aDate)
           
protected XS_Date(java.lang.String lexical)
           
 
Method Summary
 XS_Date.Date getDate()
           
 int getDay()
           
 int getDayInWeek()
           
static int getDayInWeek(int year, int month, int day)
           
 int getDayInYear()
           
static int getDayInYear(int year, int month, int day)
           
 int getMonth()
           
static java.lang.Class<? extends XS_AnyType> getRestrictionBase()
           
 java.lang.String getStringValue()
          Returns the string value.
 javax.xml.namespace.QName getTypeName()
           
 java.lang.Object getValue()
          Returns the value itself.
 int getWeekInMonth()
           
static int getWeekInMonth(int year, int month, int day)
           
 int getWeekInYear()
           
static int getWeekInYear(int year, int month, int day)
           
 int getYear()
           
static boolean isLeapYear(int year)
           
 boolean isOrdered()
           
static XS_Date.Date lastDayOfMonth(int year, int month)
           
 XS_DateTime makeToXS_DateTime()
           
static XS_Date newInstance(XdmValue value)
           
static XS_Date.Date parseDate(java.lang.String lexical)
           
 long toJulianDays()
           
static long toJulianDays(int year, int month, int day)
           
 java.math.BigDecimal toJulianSeconds()
           
 
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 com.xml_project.morganaxdm.XS_AnyAtomicType
compareValue, makeCompareResult, test
 
Methods inherited from class com.xml_project.morganaxdm.XS_AnySimpleType
compareValues, isValue
 
Methods inherited from class com.xml_project.morganaxdm.XdmValue
atomize
 
Methods inherited from class com.xml_project.morganaxdm.XdmItem
first, get, hasValues, isEmpty, iterator, size, subSequence
 
Methods inherited from class com.xml_project.morganaxdm.XdmSequence
concat, hasCommonType, normalize, serialize, serialize, serialize, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TypeName

public static final javax.xml.namespace.QName TypeName
Constructor Detail

XS_Date

protected XS_Date(java.lang.String lexical)
           throws XPathException
Throws:
XPathException

XS_Date

protected XS_Date(int timeZone,
                  XS_Date.Date aDate)

XS_Date

protected XS_Date(int timeZone,
                  java.util.GregorianCalendar cal)
Method Detail

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.

getValue

public java.lang.Object getValue()
Description copied from class: XdmItem
Returns the value itself.

Specified by:
getValue in class XdmItem
Returns:
the value.

getDate

public XS_Date.Date getDate()

getYear

public int getYear()

getMonth

public int getMonth()

getDay

public int getDay()

getDayInWeek

public int getDayInWeek()

getDayInYear

public int getDayInYear()

getWeekInYear

public int getWeekInYear()

getWeekInMonth

public int getWeekInMonth()

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in class XS_AnyAtomicType

makeToXS_DateTime

public XS_DateTime makeToXS_DateTime()
Specified by:
makeToXS_DateTime in class XS_Calendar

toJulianDays

public long toJulianDays()

toJulianSeconds

public java.math.BigDecimal toJulianSeconds()

getWeekInMonth

public static int getWeekInMonth(int year,
                                 int month,
                                 int day)

lastDayOfMonth

public static XS_Date.Date lastDayOfMonth(int year,
                                          int month)

isLeapYear

public static boolean isLeapYear(int year)

getWeekInYear

public static int getWeekInYear(int year,
                                int month,
                                int day)

getDayInWeek

public static int getDayInWeek(int year,
                               int month,
                               int day)

getDayInYear

public static int getDayInYear(int year,
                               int month,
                               int day)

toJulianDays

public static long toJulianDays(int year,
                                int month,
                                int day)

newInstance

public static XS_Date newInstance(XdmValue value)
                           throws XPathException
Throws:
XPathException

getRestrictionBase

public static java.lang.Class<? extends XS_AnyType> getRestrictionBase()

parseDate

public static XS_Date.Date parseDate(java.lang.String lexical)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.NumberFormatException
Throws:
java.lang.IllegalArgumentException
java.lang.NumberFormatException