Public Member Functions | |
Year () | |
void | setMonth (short month) throws OperationNotSupportedException |
void | setDay (short day) throws OperationNotSupportedException |
void | setHour (short hour) throws OperationNotSupportedException |
void | setMinute (short minute) throws OperationNotSupportedException |
void | setSecond (short second, short millsecond) throws OperationNotSupportedException |
void | setZone (short hour, short minute) throws OperationNotSupportedException |
void | setZoneNegative () throws OperationNotSupportedException |
String | toString () |
java.util.Date | toDate () throws ParseException |
Static Public Member Functions | |
static Object | parse (String str) throws ParseException |
static Year | parseYear (String str) throws ParseException |
Describe an XML schema Year
The date type is derived from time period by setting up the facet :
org.exolab.castor.types.Year.Year | ( | ) |
References org.exolab.castor.types.Year.setZone(), and org.exolab.castor.types.Year.setZoneNegative().
Referenced by org.exolab.castor.types.Year.parseYear().
static Object org.exolab.castor.types.Year.parse | ( | String | str | ) | throws ParseException [static] |
parse a String and convert 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) |
Reimplemented from org.exolab.castor.types.RecurringDuration.
References org.exolab.castor.types.Year.parseYear().
static Year org.exolab.castor.types.Year.parseYear | ( | String | str | ) | throws ParseException [static] |
parse a String and convert it into a Year
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.RecurringDurationBase.isNegative(), org.exolab.castor.types.RecurringDuration.setCentury(), org.exolab.castor.types.RecurringDurationBase.setNegative(), org.exolab.castor.types.RecurringDuration.setYear(), and org.exolab.castor.types.Year.Year().
Referenced by org.exolab.castor.types.Year.parse().
void org.exolab.castor.types.Year.setDay | ( | short | day | ) | throws OperationNotSupportedException |
set the Day Field
day | the value to set up Note a validation is done on the day field |
Reimplemented from org.exolab.castor.types.RecurringDuration.
void org.exolab.castor.types.Year.setHour | ( | short | hour | ) | throws OperationNotSupportedException |
set the hour field for this recurringDuration
hour | the hour to set |
OperationNotSupportedException | this exception is thrown when changing the value of the hour field is not allowed |
Reimplemented from org.exolab.castor.types.RecurringDurationBase.
void org.exolab.castor.types.Year.setMinute | ( | short | minute | ) | throws OperationNotSupportedException |
set the minute field for this recurringDuration
minute | the minute to set |
OperationNotSupportedException | this exception is thrown when changing the value of the minute field is not allowed |
Reimplemented from org.exolab.castor.types.RecurringDurationBase.
void org.exolab.castor.types.Year.setMonth | ( | short | month | ) | throws OperationNotSupportedException |
month | the value to set up Note 1<month<12 |
Reimplemented from org.exolab.castor.types.RecurringDuration.
void org.exolab.castor.types.Year.setSecond | ( | short | second, | |
short | millsecond | |||
) | throws OperationNotSupportedException |
set the second field for this recurringDuration
second | the second to set | |
millsecond | the millisecond to set |
OperationNotSupportedException | this exception is thrown when changing the value of the second field is not allowed |
Reimplemented from org.exolab.castor.types.RecurringDurationBase.
void org.exolab.castor.types.Year.setZone | ( | short | hour, | |
short | minute | |||
) | throws OperationNotSupportedException |
set the time zone fields for this recurringDuration
hour | the time zone hour to set | |
minute | the time zone minute to set |
OperationNotSupportedException | this exception is thrown when changing the value of the time zone fields is not allowed |
Reimplemented from org.exolab.castor.types.RecurringDurationBase.
Referenced by org.exolab.castor.types.Year.Year().
void org.exolab.castor.types.Year.setZoneNegative | ( | ) | throws OperationNotSupportedException |
set the time zone negative field to true
OperationNotSupportedException | this exception is thrown when changing the time zone fields is not allowed |
Reimplemented from org.exolab.castor.types.RecurringDurationBase.
Referenced by org.exolab.castor.types.Year.Year().
java.util.Date org.exolab.castor.types.Year.toDate | ( | ) | throws ParseException |
convert this recurringDuration into a local Date
Note : Be aware a the 'local' property of the date i.e toDate()
will de the conversion between a UTC date and your computer date format. For instance if you have set up your computer time zone on the Pacific Day Time the conversion of 2000-10-20T00:00:00.000
into a java.util.Date
will return Thu Oct 19 17:00:00 PDT 2000
ParseException |
Reimplemented from org.exolab.castor.types.RecurringDuration.
References org.exolab.castor.types.Date.Date(), org.exolab.castor.types.RecurringDurationBase.getZoneHour(), org.exolab.castor.types.RecurringDurationBase.getZoneMinute(), org.exolab.castor.types.RecurringDurationBase.isUTC(), org.exolab.castor.types.RecurringDurationBase.isZoneNegative(), and org.exolab.castor.types.Year.toString().
String org.exolab.castor.types.Year.toString | ( | ) |
convert this Year to a string The format is defined by W3C XML Schema draft and ISO8601 i.e (+|-)CCYY
Reimplemented from org.exolab.castor.types.RecurringDuration.
References org.exolab.castor.types.RecurringDuration.getCentury(), org.exolab.castor.types.RecurringDuration.getYear(), and org.exolab.castor.types.RecurringDurationBase.isNegative().
Referenced by org.exolab.castor.types.YearDescriptor.YearFieldHandler.getValue(), and org.exolab.castor.types.Year.toDate().