Class Century
- java.lang.Object
-
- org.exolab.castor.types.RecurringDurationBase
-
- org.exolab.castor.types.RecurringDuration
-
- org.exolab.castor.types.TimePeriod
-
- org.exolab.castor.types.Century
-
- All Implemented Interfaces:
java.io.Serializable
public class Century extends TimePeriod
Deprecated.since Castor 1.0.6 since this type is not in any recommendation.Describe an XML schema CenturyThe date type is derived from time period by setting up the facet:
- duration to "P100Y"
Note: This datatype is not included in any recommendation. It was introduced in http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/ and was last in http://www.w3.org/TR/2000/CR-xmlschema-2-20001024/ and was removed by http://www.w3.org/TR/2001/PR-xmlschema-2-20010316/. It was not in the final approved recommendation: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/
- Version:
- $Revision: 7289 $
- Author:
- Arnaud Blandin
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Century()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Object
parse(java.lang.String str)
Deprecated.parse a String and convert it into a java.lang.Objectstatic Century
parseCentury(java.lang.String str)
Deprecated.parse a String and convert it into a Centuryvoid
setDay(short day)
Deprecated.set the Day Fieldvoid
setHour(short hour)
Deprecated.set the hour field for this recurringDurationvoid
setMinute(short minute)
Deprecated.set the minute field for this recurringDurationvoid
setMonth(short month)
Deprecated.set the Month Fieldvoid
setSecond(short second, short millsecond)
Deprecated.set the second field for this recurringDurationvoid
setYear(short year)
Deprecated.set the Year field Note: 0000 is not allowedvoid
setZone(short hour, short minute)
Deprecated.set the time zone fields for this recurringDurationvoid
setZoneNegative()
Deprecated.set the time zone negative field to truejava.util.Date
toDate()
Deprecated.convert this recurringDuration into a local Datejava.lang.String
toString()
Deprecated.convert this Year to a string The format is defined by W3C XML Schema draft and ISO8601 i.e (+|-)CC-
Methods inherited from class org.exolab.castor.types.TimePeriod
setFields, setPeriod
-
Methods inherited from class org.exolab.castor.types.RecurringDuration
equal, equals, getCentury, getDay, getMonth, getValues, getYear, isGreater, isLeap, parseRecurringDuration, setCentury, setValues
-
Methods inherited from class org.exolab.castor.types.RecurringDurationBase
equal, getDuration, getHour, getMilli, getMinute, getPeriod, getSeconds, getZoneHour, getZoneMinute, isGreater, isNegative, isUTC, isZoneNegative, setDuration, setDuration, setNegative, setPeriod, setUTC
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Deprecated.convert this Year to a string The format is defined by W3C XML Schema draft and ISO8601 i.e (+|-)CC- Overrides:
toString
in classRecurringDuration
- Returns:
- a string representing this Century
-
parse
public static java.lang.Object parse(java.lang.String str) throws java.text.ParseException
Deprecated.parse a String and convert it into a java.lang.Object- Parameters:
str
- the string to parse- Returns:
- the java.lang.Object represented by the string
- Throws:
java.text.ParseException
- a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)
-
parseCentury
public static Century parseCentury(java.lang.String str) throws java.text.ParseException
Deprecated.parse a String and convert it into a Century- Parameters:
str
- the string to parse- Returns:
- the Century represented by the string
- Throws:
java.text.ParseException
- a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class)
-
toDate
public java.util.Date toDate() throws java.text.ParseException
Deprecated.Description copied from class:RecurringDuration
convert this recurringDuration into a local DateNote : 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
- Overrides:
toDate
in classRecurringDuration
- Returns:
- a local date representing this recurringDuration
- Throws:
java.text.ParseException
-
setYear
public void setYear(short year) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDuration
set the Year field Note: 0000 is not allowed- Overrides:
setYear
in classRecurringDuration
- Parameters:
year
- year to set up- Throws:
java.lang.UnsupportedOperationException
-
setMonth
public void setMonth(short month) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDuration
set the Month Field- Overrides:
setMonth
in classRecurringDuration
- Parameters:
month
- the value to set up Note 1- Throws:
java.lang.UnsupportedOperationException
-
setDay
public void setDay(short day) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDuration
set the Day Field- Overrides:
setDay
in classRecurringDuration
- Parameters:
day
- the value to set up Note a validation is done on the day field- Throws:
java.lang.UnsupportedOperationException
-
setHour
public void setHour(short hour) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDurationBase
set the hour field for this recurringDuration- Overrides:
setHour
in classRecurringDurationBase
- Parameters:
hour
- the hour to set- Throws:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the hour field is not allowed
-
setMinute
public void setMinute(short minute) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDurationBase
set the minute field for this recurringDuration- Overrides:
setMinute
in classRecurringDurationBase
- Parameters:
minute
- the minute to set- Throws:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the minute field is not allowed
-
setSecond
public void setSecond(short second, short millsecond) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDurationBase
set the second field for this recurringDuration- Overrides:
setSecond
in classRecurringDurationBase
- Parameters:
second
- the second to setmillsecond
- the millisecond to set- Throws:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the second field is not allowed
-
setZone
public void setZone(short hour, short minute) throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDurationBase
set the time zone fields for this recurringDuration- Overrides:
setZone
in classRecurringDurationBase
- Parameters:
hour
- the time zone hour to setminute
- the time zone minute to set- Throws:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the value of the time zone fields is not allowed
-
setZoneNegative
public void setZoneNegative() throws java.lang.UnsupportedOperationException
Deprecated.Description copied from class:RecurringDurationBase
set the time zone negative field to true- Overrides:
setZoneNegative
in classRecurringDurationBase
- Throws:
java.lang.UnsupportedOperationException
- this exception is thrown when changing the time zone fields is not allowed
-
-