org.idoox.wasp.serialization.xsdbuiltin
Class DateTimeBase

java.lang.Object
  extended byorg.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Date, DateTime, GDay, GMonth, GMonthDay, GYear, GYearMonth, Time

public class DateTimeBase
extends java.lang.Object
implements java.io.Serializable

base class for xsd date-time types.

See Also:
Serialized Form
Component:
Core

Field Summary
protected  boolean isNegative
          defines whether this object has negative values
protected  TimeZone timeZone
          timezone value of this object
 
Constructor Summary
protected DateTimeBase()
          An empty constructor.
protected DateTimeBase(TimeZone timeZone)
          Constructor.
 
Method Summary
 TimeZone getTimeZone()
          Returns timeZone member of this object.
 boolean hasNegativeValue()
          Returns true if this Object has negative values.
protected  int inputMonth(int month)
          Gets month from set methods.
protected  int outputMonth(int month)
          Gives month to get methods.
protected  void setDefaultTimeZone()
          Sets TimeZone of this object to default (local) time zone.
protected  void setParams(TimeZone timeZone)
          Initializes parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeZone

protected TimeZone timeZone
timezone value of this object


isNegative

protected boolean isNegative
defines whether this object has negative values

Constructor Detail

DateTimeBase

protected DateTimeBase()
An empty constructor.


DateTimeBase

protected DateTimeBase(TimeZone timeZone)
Constructor. Initializes parameters.

Parameters:
timeZone - to set. It might be null.
Method Detail

getTimeZone

public TimeZone getTimeZone()
Returns timeZone member of this object.

Returns:
timeZone member of this object.

hasNegativeValue

public boolean hasNegativeValue()
Returns true if this Object has negative values.

Returns:
true if this Object has negative values.

setParams

protected void setParams(TimeZone timeZone)
Initializes parameters.

Parameters:
timeZone - to set. It might be null.

inputMonth

protected int inputMonth(int month)
Gets month from set methods. Internal representation of month is in the interval (1-12). Set methods use common java date representation (0-11).

Parameters:
month - input value of month in interval (0-11).
Returns:
internal representation of month(1-12)

outputMonth

protected int outputMonth(int month)
Gives month to get methods. Internal representation of month is in the interval (1-12). Get methods return common java date representation (0-11).

Parameters:
month - month value in interval (1-12)
Returns:
month value in interval (0-11)

setDefaultTimeZone

protected void setDefaultTimeZone()
Sets TimeZone of this object to default (local) time zone.