org.exolab.castor.types

Class Century

Implemented Interfaces:
java.io.Serializable

public class Century
extends TimePeriod

Describe an XML schema Century

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

Century()

Method Summary

static Object
parse(String str)
parse a String and convert it into a java.lang.Object
static Century
parseCentury(String str)
parse a String and convert it into a Century
void
setDay(short day)
void
setHour(short hour)
set the hour field for this recurringDuration
void
setMinute(short minute)
set the minute field for this recurringDuration
void
setMonth(short month)
void
setSecond(short second, short millsecond)
set the second field for this recurringDuration
void
setYear(short year)
void
setZone(short hour, short minute)
set the time zone fields for this recurringDuration
void
setZoneNegative()
set the time zone negative field to true
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 (+|-)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, 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

Century

public Century()

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


parseCentury

public static Century parseCentury(String str)
            throws ParseException
parse a String and convert it into a Century

Parameters:
str - the string to parse

Returns:
the Century 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
set the hour field for this recurringDuration
Overrides:
setHour in interface RecurringDurationBase

Parameters:
hour - the hour to set

Throws:
OperationNotSupportedException - this exception is thrown when changing the value of the hour field is not allowed


setMinute

public void setMinute(short minute)
            throws OperationNotSupportedException
set the minute field for this recurringDuration
Overrides:
setMinute in interface RecurringDurationBase

Parameters:
minute - the minute to set

Throws:
OperationNotSupportedException - this exception is thrown when changing the value of the minute field is not allowed


setMonth

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


setSecond

public void setSecond(short second,
                      short millsecond)
            throws OperationNotSupportedException
set the second field for this recurringDuration
Overrides:
setSecond in interface RecurringDurationBase

Parameters:
second - the second to set
millsecond - the millisecond to set

Throws:
OperationNotSupportedException - this exception is thrown when changing the value of the second field is not allowed


setYear

public void setYear(short year)
            throws OperationNotSupportedException
Overrides:
setYear in interface RecurringDuration


setZone

public void setZone(short hour,
                    short minute)
            throws OperationNotSupportedException
set the time zone fields for this recurringDuration
Overrides:
setZone in interface RecurringDurationBase

Parameters:
hour - the time zone hour to set
minute - the time zone minute to set

Throws:
OperationNotSupportedException - this exception is thrown when changing the value of the time zone fields is not allowed


setZoneNegative

public void setZoneNegative()
            throws OperationNotSupportedException
set the time zone negative field to true
Overrides:
setZoneNegative in interface RecurringDurationBase

Throws:
OperationNotSupportedException - this exception is thrown when changing the time zone fields is not allowed


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 (+|-)CC
Overrides:
toString in interface RecurringDuration

Returns:
a string representing this Century


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