Public Member Functions | |
Time () | |
Time (short[] values) | |
Time (long l) | |
Time (String time) throws ParseException | |
void | setValues (short[] values) |
short[] | getValues () |
Date | toDate () |
String | toString () |
short | getCentury () |
short | getYear () |
short | getMonth () |
short | getDay () |
void | setCentury (short century) |
void | getYear (short year) |
void | getMonth (short month) |
void | getDay (short day) |
Static Public Member Functions | |
static Object | parse (String str) throws ParseException |
static Time | parseTime (String str) throws ParseException |
Describes an XML schema Time.
The format is defined by W3C XML Schema Recommendation and ISO8601 i.e (-)hh:mm:ss.sss(Z|(+|-)hh:mm)
Currently deep support of milli seconds is not implemented. This implementation only support up to 3 figures for milli-seconds.
org.exolab.castor.types.Time.Time | ( | ) |
Referenced by org.exolab.castor.types.Time.parseTime().
org.exolab.castor.types.Time.Time | ( | short[] | values | ) |
Constructs a XML Schema Time instance given all the values of the different fields. By default a Time is not UTC and is local.
values | an array of shorts that represent the different fields of Time. |
References org.exolab.castor.types.Time.setValues().
org.exolab.castor.types.Time.Time | ( | long | l | ) |
Constructs a XML Schema Time instance given a long representing the time in milliseconds. By default a Time is not UTC and is local.
the | long value that represents the time instance. |
References org.exolab.castor.types.DateTimeBase.setHour(), org.exolab.castor.types.DateTimeBase.setMinute(), and org.exolab.castor.types.DateTimeBase.setSecond().
org.exolab.castor.types.Time.Time | ( | String | time | ) | throws ParseException |
short org.exolab.castor.types.Time.getCentury | ( | ) |
Reimplemented from org.exolab.castor.types.DateTimeBase.
short org.exolab.castor.types.Time.getDay | ( | ) |
Reimplemented from org.exolab.castor.types.DateTimeBase.
void org.exolab.castor.types.Time.getDay | ( | short | day | ) |
short org.exolab.castor.types.Time.getMonth | ( | ) |
Reimplemented from org.exolab.castor.types.DateTimeBase.
void org.exolab.castor.types.Time.getMonth | ( | short | month | ) |
short [] org.exolab.castor.types.Time.getValues | ( | ) | [virtual] |
returns an array of short with all the fields that describe this time type.
Note:the time zone is not included.
Implements org.exolab.castor.types.DateTimeBase.
References org.exolab.castor.types.DateTimeBase.getHour(), org.exolab.castor.types.DateTimeBase.getMilli(), org.exolab.castor.types.DateTimeBase.getMinute(), and org.exolab.castor.types.DateTimeBase.getSeconds().
short org.exolab.castor.types.Time.getYear | ( | ) |
Reimplemented from org.exolab.castor.types.DateTimeBase.
void org.exolab.castor.types.Time.getYear | ( | short | year | ) |
static Object org.exolab.castor.types.Time.parse | ( | String | str | ) | throws ParseException [static] |
parses a String and converts it into a java.lang.Object
str | the string to parse |
ParseException | a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class) |
References org.exolab.castor.types.Time.parseTime().
static Time org.exolab.castor.types.Time.parseTime | ( | String | str | ) | throws ParseException [static] |
parses a String and converts it into a Time.
str | the string to parse |
ParseException | a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class) |
References org.exolab.castor.types.Time.Time().
Referenced by org.exolab.castor.types.Time.parse().
void org.exolab.castor.types.Time.setCentury | ( | short | century | ) |
set the century field
century | the value to set up |
Reimplemented from org.exolab.castor.types.DateTimeBase.
void org.exolab.castor.types.Time.setValues | ( | short[] | values | ) | [virtual] |
Sets all the fields by reading the values in an array.
if a Time Zone is specificied it has to be set by using setZone.
values | an array of shorts with the values the array is supposed to be of length 4 and ordered like that:
|
Implements org.exolab.castor.types.DateTimeBase.
References org.exolab.castor.types.DateTimeBase.setHour(), org.exolab.castor.types.DateTimeBase.setMinute(), and org.exolab.castor.types.DateTimeBase.setSecond().
Referenced by org.exolab.castor.types.Time.Time().
Date org.exolab.castor.types.Time.toDate | ( | ) | [virtual] |
converts this Time into a local java Date.
Implements org.exolab.castor.types.DateTimeBase.
References org.exolab.castor.types.DateTimeBase.getZoneHour(), org.exolab.castor.types.DateTimeBase.getZoneMinute(), org.exolab.castor.types.DateTimeBase.isUTC(), org.exolab.castor.types.DateTimeBase.isZoneNegative(), org.exolab.castor.types.Date.parse(), and org.exolab.castor.types.Time.toString().
String org.exolab.castor.types.Time.toString | ( | ) |
convert this Time to a string The format is defined by W3C XML Schema Recommendation and ISO8601 i.e (-)hh:mm:ss.sss(Z|(+|-)hh:mm)
References org.exolab.castor.types.DateTimeBase.getHour(), org.exolab.castor.types.DateTimeBase.getMilli(), org.exolab.castor.types.DateTimeBase.getMinute(), org.exolab.castor.types.DateTimeBase.getSeconds(), org.exolab.castor.types.DateTimeBase.getZoneHour(), org.exolab.castor.types.DateTimeBase.getZoneMinute(), org.exolab.castor.types.DateTimeBase.isNegative(), org.exolab.castor.types.DateTimeBase.isUTC(), and org.exolab.castor.types.DateTimeBase.isZoneNegative().
Referenced by org.exolab.castor.types.TimeDescriptor.TimeFieldHandler.getValue(), org.exolab.castor.types.Time.toDate(), and org.exolab.castor.builder.types.XSTime.validationCode().