com.xml_project.morganaxdm
Class XS_Calendar

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
All Implemented Interfaces:
XS_AnyType, java.lang.Iterable<XdmItem>
Direct Known Subclasses:
XS_Date, XS_DateTime, XS_gDay, XS_gMonth, XS_gMonthDay, XS_gYear, XS_gYearMonth, XS_Time

public abstract class XS_Calendar
extends XS_AnyAtomicType

Abstract base class for all calendar types.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.xml_project.morganaxdm.XS_AnyAtomicType
XS_AnyAtomicType.ValueComparers
 
Field Summary
protected static byte[] DaysInMonth
           
static int NoTimeZone
          This is the abstract super class for Date- and Time-Classes
protected static XS_Date.Date StandardDate
           
 
Fields inherited from class com.xml_project.morganaxdm.XS_AnyAtomicType
TypeName
 
Constructor Summary
XS_Calendar()
           
 
Method Summary
protected static void checkDigits(java.lang.String lex)
           
 void clearTimezone()
           
 int compareValues(XS_AnySimpleType val, com.xml_project.morganaxquery.configuration.Collation collation, XS_dayTimeDuration implicitTimezone)
           
 int getComponent(char component)
           
 java.lang.String getMicrosecondsAsString()
           
 int getTimezone()
           
protected  XS_Duration.Duration getTimezoneAsDuration()
           
 XS_dayTimeDuration getTimezoneAsXS_dayTimeDuration()
           
protected  java.lang.String getTimezoneXMLValue()
           
 boolean hasTimezone()
           
protected static java.lang.String make2Digits(int value)
           
protected static java.lang.String make4Digits(int value)
           
abstract  XS_DateTime makeToXS_DateTime()
           
protected  void parseTimezone(java.lang.String lexical)
          Parses lexical representation of timezone and sets the timezone
protected  void setTimezone(int minutes)
           
 void setTimezone(XS_dayTimeDuration dur)
           
protected  java.lang.String[] splitTimezoneFromTime(java.lang.String lexical)
          Splits the given lexical representation in two parts: A trailing part and a timezone part.
 
Methods inherited from class com.xml_project.morganaxdm.XS_AnyAtomicType
compareValue, getRestrictionBase, isOrdered, 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, getStringValue, getValue, 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
 
Methods inherited from interface com.xml_project.morganaxdm.XS_AnyType
getTypeName
 

Field Detail

NoTimeZone

public static final int NoTimeZone
This is the abstract super class for Date- and Time-Classes

See Also:
Constant Field Values

DaysInMonth

protected static final byte[] DaysInMonth

StandardDate

protected static final XS_Date.Date StandardDate
Constructor Detail

XS_Calendar

public XS_Calendar()
Method Detail

compareValues

public final int compareValues(XS_AnySimpleType val,
                               com.xml_project.morganaxquery.configuration.Collation collation,
                               XS_dayTimeDuration implicitTimezone)
                        throws XPathException
Specified by:
compareValues in class XS_AnySimpleType
Throws:
XPathException

makeToXS_DateTime

public abstract XS_DateTime makeToXS_DateTime()

setTimezone

public void setTimezone(XS_dayTimeDuration dur)

setTimezone

protected void setTimezone(int minutes)

clearTimezone

public void clearTimezone()

getTimezone

public int getTimezone()

getTimezoneAsDuration

protected XS_Duration.Duration getTimezoneAsDuration()

getTimezoneAsXS_dayTimeDuration

public XS_dayTimeDuration getTimezoneAsXS_dayTimeDuration()

hasTimezone

public boolean hasTimezone()

getComponent

public final int getComponent(char component)
                       throws XPathException
Throws:
XPathException

getMicrosecondsAsString

public java.lang.String getMicrosecondsAsString()
                                         throws XPathException
Throws:
XPathException

parseTimezone

protected void parseTimezone(java.lang.String lexical)
                      throws java.lang.IllegalArgumentException
Parses lexical representation of timezone and sets the timezone

Parameters:
lexical -
Throws:
java.lang.IllegalArgumentException

getTimezoneXMLValue

protected java.lang.String getTimezoneXMLValue()

make2Digits

protected static java.lang.String make2Digits(int value)

make4Digits

protected static java.lang.String make4Digits(int value)

splitTimezoneFromTime

protected java.lang.String[] splitTimezoneFromTime(java.lang.String lexical)
Splits the given lexical representation in two parts: A trailing part and a timezone part. If there is no timezone part, the second part will be null.

Parameters:
lexical -
Returns:
a string representation of the timezone

checkDigits

protected static void checkDigits(java.lang.String lex)
                           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException