org.exolab.castor.types

Class Year

Implemented Interfaces:
java.io.Serializable

public class Year
extends TimePeriod

Describe an XML schema Year

The date type is derived from time period by setting up the facet :

Version:
$Revision: 1.1.1.1 $
Author:
Arnaud Blandin
See Also:
Serialized Form

Constructor Summary

Year()

Method Summary

static Object
parse(String str)
parse a String and convert it into a java.lang.Object
static Year
parseYear(String str)
parse a String and convert it into a Year
void
setDay(short day)
void
setHour(short hour)
void
setMinute(short minute)
void
setMonth(short month)
void
setSecond(short second, short millsecond)
void
setZone(short hour, short minute)
void
setZoneNegative()
java.util.Date
toDate()
String
toString()
convert this Year to a string The format is defined by W3C XML Schema draft and ISO8601 i.e (+|-)CCYY

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, parse, parseRecurringDuration, setCentury, setDay, setMonth, setValues, setYear, toDate, toString

Methods inherited from class org.exolab.castor.types.RecurringDurationBase

equal, equals, getDuration, getHour, getMilli, getMinute, getPeriod, getSeconds, getValues, getZoneHour, getZoneMinute, isGreater, isNegative, isUTC, isZoneNegative, setDuration, setDuration, setHour, setMinute, setNegative, setPeriod, setPeriod, setSecond, setUTC, setValues, setZone, setZoneNegative

Constructor Details

Year

public Year()

Method Details

parse

public static Object parse(String str)
            throws ParseException
parse a String and convert it into a java.lang.Object
Overrides:
parse in interface RecurringDuration
Parameters:
str - the string to parse
Returns:
the java.lang.Object represented by the string

parseYear

public static Year parseYear(String str)
            throws ParseException
parse a String and convert it into a Year
Parameters:
str - the string to parse
Returns:
the Year represented by the string

setDay

public void setDay(short day)
            throws OperationNotSupportedException
Overrides:
setDay in interface RecurringDuration

setHour

public void setHour(short hour)
            throws OperationNotSupportedException
Overrides:
setHour in interface RecurringDurationBase

setMinute

public void setMinute(short minute)
            throws OperationNotSupportedException
Overrides:
setMinute in interface RecurringDurationBase

setMonth

public void setMonth(short month)
            throws OperationNotSupportedException
Overrides:
setMonth in interface RecurringDuration

setSecond

public void setSecond(short second,
                      short millsecond)
            throws OperationNotSupportedException
Overrides:
setSecond in interface RecurringDurationBase

setZone

public void setZone(short hour,
                    short minute)
            throws OperationNotSupportedException
Overrides:
setZone in interface RecurringDurationBase

setZoneNegative

public void setZoneNegative()
            throws OperationNotSupportedException
Overrides:
setZoneNegative in interface RecurringDurationBase

toDate

public java.util.Date toDate()
            throws ParseException
Overrides:
toDate in interface RecurringDuration

toString

public String toString()
convert this Year to a string The format is defined by W3C XML Schema draft and ISO8601 i.e (+|-)CCYY
Overrides:
toString in interface RecurringDuration
Returns:
a string representing this Month

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com