com.jmex.xml.types
Class SchemaCalendarBase

java.lang.Object
  extended by com.jmex.xml.types.SchemaCalendarBase
All Implemented Interfaces:
SchemaType, SchemaTypeCalendar, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
SchemaDate, SchemaDateTime, SchemaDuration, SchemaTime

public abstract class SchemaCalendarBase
extends java.lang.Object
implements SchemaTypeCalendar

See Also:
Serialized Form

Nested Class Summary
(package private)  class SchemaCalendarBase.ParseContext
           
(package private)  class SchemaCalendarBase.RefInt
           
 
Field Summary
protected  int DateTimePart_Date
           
protected  int DateTimePart_Day
           
protected  int DateTimePart_Month
           
protected  int DateTimePart_Time
           
protected  int DateTimePart_Year
           
protected  int day
           
protected  int hasTZ
           
protected  int hour
           
protected  boolean isempty
           
protected  int minute
           
protected  int month
           
(package private) static int[] monthStart
           
(package private) static int[] monthStartLeap
           
protected  int offsetTZ
           
protected  double partsecond
           
protected  int second
           
static int TZ_MISSING
           
static int TZ_OFFSET
           
static int TZ_UTC
           
protected  int year
           
 
Fields inherited from interface com.jmex.xml.types.SchemaTypeCalendar
CALENDAR_VALUE_DATE, CALENDAR_VALUE_DATETIME, CALENDAR_VALUE_DURATION, CALENDAR_VALUE_TIME, CALENDAR_VALUE_UNDEFINED
 
Constructor Summary
SchemaCalendarBase()
           
 
Method Summary
 boolean booleanValue()
           
 int compareTo(java.lang.Object obj)
           
 int compareTo(SchemaCalendarBase obj)
           
 SchemaDuration durationValue()
           
 boolean equals(java.lang.Object obj)
           
 double getApproximatedTotal()
           
 java.util.Date getDate()
           
 long getTimeValue()
           
 int hashCode()
           
 boolean isEmpty()
           
 boolean isNull()
           
 int length()
           
protected  void parseDate(java.lang.String newvalue)
           
protected  boolean parseDateTime(java.lang.String s, int part)
           
protected  void parseTime(java.lang.String newvalue)
           
 void setDateFromTimeValue(long tv)
           
 void setEmpty()
           
protected  void setInternalValues(int newyear, int newmonth, int newday, int newhour, int newminute, int newsecond, double newpartsecond, int newhasTZ, int newoffsetTZ)
           
 void setNull()
           
 void setTimeFromTimeValue(long tv)
           
 java.lang.String toDateString()
           
 java.lang.String toTimeString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jmex.xml.types.SchemaTypeCalendar
calendarType, dateTimeValue, dateValue, timeValue
 
Methods inherited from interface com.jmex.xml.types.SchemaType
parse, toString
 

Field Detail

TZ_MISSING

public static final int TZ_MISSING
See Also:
Constant Field Values

TZ_UTC

public static final int TZ_UTC
See Also:
Constant Field Values

TZ_OFFSET

public static final int TZ_OFFSET
See Also:
Constant Field Values

year

protected int year

month

protected int month

day

protected int day

hour

protected int hour

minute

protected int minute

second

protected int second

partsecond

protected double partsecond

hasTZ

protected int hasTZ

offsetTZ

protected int offsetTZ

isempty

protected boolean isempty

DateTimePart_Year

protected final int DateTimePart_Year
See Also:
Constant Field Values

DateTimePart_Month

protected final int DateTimePart_Month
See Also:
Constant Field Values

DateTimePart_Day

protected final int DateTimePart_Day
See Also:
Constant Field Values

DateTimePart_Date

protected final int DateTimePart_Date
See Also:
Constant Field Values

DateTimePart_Time

protected final int DateTimePart_Time
See Also:
Constant Field Values

monthStart

static int[] monthStart

monthStartLeap

static int[] monthStartLeap
Constructor Detail

SchemaCalendarBase

public SchemaCalendarBase()
Method Detail

setNull

public void setNull()
Specified by:
setNull in interface SchemaType

setEmpty

public void setEmpty()
Specified by:
setEmpty in interface SchemaType

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toDateString

public java.lang.String toDateString()

toTimeString

public java.lang.String toTimeString()

length

public int length()
Specified by:
length in interface SchemaType

booleanValue

public boolean booleanValue()
Specified by:
booleanValue in interface SchemaType

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface SchemaType

isNull

public boolean isNull()
Specified by:
isNull in interface SchemaType

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

compareTo

public int compareTo(SchemaCalendarBase obj)

parseDate

protected void parseDate(java.lang.String newvalue)
                  throws StringParseException
Throws:
StringParseException

parseTime

protected void parseTime(java.lang.String newvalue)
                  throws StringParseException
Throws:
StringParseException

parseDateTime

protected boolean parseDateTime(java.lang.String s,
                                int part)

getApproximatedTotal

public double getApproximatedTotal()

getTimeValue

public long getTimeValue()

setTimeFromTimeValue

public void setTimeFromTimeValue(long tv)

setDateFromTimeValue

public void setDateFromTimeValue(long tv)

getDate

public java.util.Date getDate()

setInternalValues

protected void setInternalValues(int newyear,
                                 int newmonth,
                                 int newday,
                                 int newhour,
                                 int newminute,
                                 int newsecond,
                                 double newpartsecond,
                                 int newhasTZ,
                                 int newoffsetTZ)

durationValue

public SchemaDuration durationValue()
Specified by:
durationValue in interface SchemaTypeCalendar