org.jbind.xml.instance.data
Class AbstractDateOrTimeData

java.lang.Object
  extended byorg.jbind.xml.instance.data.AbstractData
      extended byorg.jbind.xml.instance.data.AbstractSimpleData
          extended byorg.jbind.xml.instance.data.AbstractDateOrTimeData
All Implemented Interfaces:
IAnySimpleTypeData, IAnyTypeData, ISimpleData, ITextContentProvider
Direct Known Subclasses:
DateData, DateTimeData, DurationData, GDayData, GMonthData, GMonthDayData, GYearData, GYearMonthData, TimeData

public abstract class AbstractDateOrTimeData
extends AbstractSimpleData


Nested Class Summary
protected static class AbstractDateOrTimeData.DateStruct
           
protected static class AbstractDateOrTimeData.DateTimeStruct
           
protected static class AbstractDateOrTimeData.TimeStruct
           
 
Constructor Summary
AbstractDateOrTimeData()
           
 
Method Summary
protected  AbstractDateOrTimeData.DateStruct acceptDate(java.lang.String aString)
           
protected  AbstractDateOrTimeData.DateTimeStruct acceptDateTime(java.lang.String aString)
           
protected  AbstractDateOrTimeData.TimeStruct acceptTime(java.lang.String aString, int anIndex)
           
protected  ITimeZone acceptTimeZone(java.lang.String aString, int anIndex)
           
protected  int advanceInt(java.lang.String aString, int anIndex)
           
 int advanceNumber(java.lang.String aString, int anIndex)
           
protected  void doAccept(java.lang.String aString)
          Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).
protected abstract  CompareResult doGetCompareResult(IHasOrder aDate)
           
protected  void ensureChar(java.lang.String aString, int anIndex)
           
 boolean isEqual(IHasOrder aData)
           
 boolean isGreater(IHasOrder aData)
           
 boolean isGreaterOrEqual(IHasOrder aData)
           
 boolean isLess(IHasOrder aData)
           
 boolean isLessOrEqual(IHasOrder aData)
           
protected  void parseChar(java.lang.String aString, int anIndex, char aChar)
           
protected  int parseInt(java.lang.String aString, int anIndex)
           
protected  int parseInt(java.lang.String aString, int anIndex, int aLength)
           
 int parseYear(java.lang.String aString, int anIndex)
           
 
Methods inherited from class org.jbind.xml.instance.data.AbstractSimpleData
acceptImpl_, completeSimpleStorageAssignment_, doAcceptEnds_, doAcceptStarts_, getLexicalValue_, getNormalizedValue_, getObject, getTextContent_, setLexicalValue_, setObject, setSimpleStorageObject, toString
 
Methods inherited from class org.jbind.xml.instance.data.AbstractData
accept_, addReferencedData_, createElement_, createElement_, createUncheckedAttributeData_, equals, fetchByXPath_, getAttribute_, getDataDesc_, getFixed_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, iterReferencedData_, newElementData_, numberByXPath_, removeAttributeData_, selectByXPath_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_, stringByXPath_, testByXPath_
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.data.IAnyTypeData
accept_, addReferencedData_, createElement_, createElement_, equals, getAttribute_, getDataDesc_, getImpl_, getParent_, getSubstitutionHead_, getType_, hashCode, isDefault_, isNil_, iterAttributes_, iterElements_, setAttribute_, setDataDesc_, setImpl_, setSubstitutionHead_, setType_
 
Methods inherited from interface org.jbind.xml.core.data.ISimpleData
getCanonicalForm_, getSimpleStorageObject, simpleStorageValueEquals, simpleStorageValueHashCode
 

Constructor Detail

AbstractDateOrTimeData

public AbstractDateOrTimeData()
Method Detail

doAccept

protected void doAccept(java.lang.String aString)
                 throws XmlException
Description copied from class: AbstractSimpleData
Hook method that accepts the normalized value and converts it into a corresponging internal representation (the so called simple storage object).

If an exception is raised during execution of the method then this data object may be inconsistent. It is in the responsibility of the caller either to rollback the changes or to discard this data object.

Overrides:
doAccept in class AbstractSimpleData
Parameters:
aString - (required).
Throws:
XmlException - Raised iff the string can not be converted into the internal representation.

parseInt

protected int parseInt(java.lang.String aString,
                       int anIndex,
                       int aLength)
                throws XmlException
Throws:
XmlException

parseInt

protected int parseInt(java.lang.String aString,
                       int anIndex)
                throws XmlException
Throws:
XmlException

advanceInt

protected int advanceInt(java.lang.String aString,
                         int anIndex)

ensureChar

protected void ensureChar(java.lang.String aString,
                          int anIndex)
                   throws XmlException
Throws:
XmlException

parseChar

protected void parseChar(java.lang.String aString,
                         int anIndex,
                         char aChar)
                  throws XmlException
Throws:
XmlException

acceptTimeZone

protected ITimeZone acceptTimeZone(java.lang.String aString,
                                   int anIndex)
                            throws XmlException
Throws:
XmlException

acceptTime

protected AbstractDateOrTimeData.TimeStruct acceptTime(java.lang.String aString,
                                                       int anIndex)
                                                throws XmlException
Throws:
XmlException

acceptDateTime

protected AbstractDateOrTimeData.DateTimeStruct acceptDateTime(java.lang.String aString)
                                                        throws XmlException
Throws:
XmlException

acceptDate

protected AbstractDateOrTimeData.DateStruct acceptDate(java.lang.String aString)
                                                throws XmlException
Throws:
XmlException

parseYear

public int parseYear(java.lang.String aString,
                     int anIndex)
              throws XmlException
Throws:
XmlException

advanceNumber

public int advanceNumber(java.lang.String aString,
                         int anIndex)

isEqual

public final boolean isEqual(IHasOrder aData)

isGreater

public final boolean isGreater(IHasOrder aData)

isGreaterOrEqual

public final boolean isGreaterOrEqual(IHasOrder aData)

isLess

public final boolean isLess(IHasOrder aData)

isLessOrEqual

public final boolean isLessOrEqual(IHasOrder aData)

doGetCompareResult

protected abstract CompareResult doGetCompareResult(IHasOrder aDate)