Public Member Functions | Protected Member Functions

org.exolab.castor.types.RecurringDurationBase Class Reference

Inheritance diagram for org.exolab.castor.types.RecurringDurationBase:
org.exolab.castor.types.RecurringDuration org.exolab.castor.types.TimeInstant org.exolab.castor.types.TimePeriod org.exolab.castor.types.Century org.exolab.castor.types.Month org.exolab.castor.types.Year

List of all members.

Public Member Functions

void setPeriod (TimeDuration period) throws OperationNotSupportedException
void setPeriod (String period) throws OperationNotSupportedException
void setDuration (TimeDuration duration) throws OperationNotSupportedException
void setDuration (String duration) 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 setValues (short[] values) throws OperationNotSupportedException
void setNegative ()
void setZoneNegative () throws OperationNotSupportedException
void setUTC ()
TimeDuration getPeriod ()
TimeDuration getDuration ()
short getHour ()
short getMinute ()
short getSeconds ()
short getMilli ()
short getZoneHour ()
short getZoneMinute ()
short[] getValues ()
boolean isUTC ()
boolean isNegative ()
boolean isZoneNegative ()
boolean equals (Object object)
boolean equal (RecurringDurationBase reccD) throws ValidationException
boolean isGreater (RecurringDurationBase reccD) throws ValidationException

Protected Member Functions

 RecurringDurationBase ()
 RecurringDurationBase (TimeDuration duration, TimeDuration period)
 RecurringDurationBase (String duration, String period) throws IllegalArgumentException
 RecurringDurationBase (String duration, String period, short[] values) throws OperationNotSupportedException

Detailed Description

The base class for recurring Duration types.

This base class contains all the time fields (including the time zone ones) and also the facets period and duration

The validation of the time fields is done in the set methods and follows the ISO8601 Date and Time Format

Author:
Arnaud Blandin
See also:
RecurringDuration
Time
TimeInstant
TimePeriod

Constructor & Destructor Documentation

org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase (  )  [protected]
org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase ( TimeDuration  duration,
TimeDuration  period 
) [protected]

returns a recurringDurationBase with the facets duration and period set up

Parameters:
duration the TimeDuration representing the duration facet
period the TimeDuration reprensenting the period facet
Returns:
a recurringDurationBase with the facets duration and period set up

References org.exolab.castor.types.RecurringDurationBase.setDuration().

org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase ( String  duration,
String  period 
) throws IllegalArgumentException [protected]

returns a recurringDurationBase with the facets duration and period set up

Parameters:
duration the String representing the duration facet
period the String reprensenting the period facet
Returns:
a recurringDurationBase with the facets duration and period set up
Exceptions:
IllegalArgumentException this exception is thrown when the parameter strings are not corresponding to valid TimeDuration

References org.exolab.castor.types.RecurringDurationBase.setDuration().

org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase ( String  duration,
String  period,
short[]  values 
) throws OperationNotSupportedException [protected]

returns a recurringDurationBase with the facets duration and period set up but also the fields

Parameters:
duration the String representing the duration facet
period the String reprensenting the period facet
values an array of shorts which contains the values of the fields
Returns:
a recurringDurationBase with the facets duration and period set up
Exceptions:
IllegalArgumentException this exception is thrown when the values array is not of length 6.
See also:
setValues

References org.exolab.castor.types.RecurringDurationBase.setValues().


Member Function Documentation

boolean org.exolab.castor.types.RecurringDurationBase.equals ( Object  object  ) 
boolean org.exolab.castor.types.RecurringDurationBase.isGreater ( RecurringDurationBase  reccD  )  throws ValidationException

Returns true if the present instance of RecurringDurationBase is greater than the parameter

Note : the order relation follows the W3C XML Schema draft i.e rd1 < rd2 iff rd2-rd1>0

Parameters:
reccD the recurring duration base to compare with the present instance
Returns:
true if the present instance is the greatest, false if not

References org.exolab.castor.types.TimeDuration.equals(), org.exolab.castor.types.RecurringDurationBase.equals(), org.exolab.castor.types.RecurringDurationBase.getDuration(), org.exolab.castor.types.RecurringDurationBase.getPeriod(), and org.exolab.castor.types.RecurringDurationBase.getValues().

void org.exolab.castor.types.RecurringDurationBase.setDuration ( String  duration  )  throws OperationNotSupportedException

set the duration facet for this recurringDuration

Parameters:
duration the period to set
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of the duration facet is not allowed
void org.exolab.castor.types.RecurringDurationBase.setDuration ( TimeDuration  duration  )  throws OperationNotSupportedException

set the duration facet for this recurringDuration

Parameters:
duration the period to set
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of the duration facet is not allowed

Referenced by org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase().

void org.exolab.castor.types.RecurringDurationBase.setHour ( short  hour  )  throws OperationNotSupportedException
void org.exolab.castor.types.RecurringDurationBase.setMinute ( short  minute  )  throws OperationNotSupportedException
void org.exolab.castor.types.RecurringDurationBase.setPeriod ( TimeDuration  period  )  throws OperationNotSupportedException

set the period facet for this recurringDuration

Parameters:
period the period to set
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of the period facet is not allowed

Reimplemented in org.exolab.castor.types.TimePeriod.

void org.exolab.castor.types.RecurringDurationBase.setPeriod ( String  period  )  throws OperationNotSupportedException

set the period facet for this recurringDuration

Parameters:
period the period to set
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of the period facet is not allowed
void org.exolab.castor.types.RecurringDurationBase.setSecond ( short  second,
short  millsecond 
) throws OperationNotSupportedException
void org.exolab.castor.types.RecurringDurationBase.setUTC (  ) 

set the UTC field to true

void org.exolab.castor.types.RecurringDurationBase.setValues ( short[]  values  )  throws OperationNotSupportedException

set all the fields by reading the values in an array

Parameters:
values an array of shorts with the values the array is supposed to be of length 6 and ordered like that:

  • hour
  • minute
  • second
  • millisecond
  • zoneHour
  • zoneMinute
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of a time related field is not allowed

Reimplemented in org.exolab.castor.types.RecurringDuration.

References org.exolab.castor.types.RecurringDurationBase.setHour(), org.exolab.castor.types.RecurringDurationBase.setMinute(), org.exolab.castor.types.RecurringDurationBase.setSecond(), and org.exolab.castor.types.RecurringDurationBase.setZone().

Referenced by org.exolab.castor.types.RecurringDurationBase.RecurringDurationBase().

void org.exolab.castor.types.RecurringDurationBase.setZone ( short  hour,
short  minute 
) throws OperationNotSupportedException

set the time zone fields for this recurringDuration

Parameters:
hour the time zone hour to set
minute the time zone minute to set
Exceptions:
OperationNotSupportedException this exception is thrown when changing the value of the time zone fields is not allowed

Reimplemented in org.exolab.castor.types.Century, org.exolab.castor.types.Month, and org.exolab.castor.types.Year.

Referenced by org.exolab.castor.types.RecurringDuration.parseRecurringDuration(), org.exolab.castor.types.TimePeriod.setFields(), org.exolab.castor.types.RecurringDurationDescriptor.RecurringDurationFieldHandler.setValue(), org.exolab.castor.types.RecurringDurationBase.setValues(), and org.exolab.castor.types.RecurringDuration.setValues().

void org.exolab.castor.types.RecurringDurationBase.setZoneNegative (  )  throws OperationNotSupportedException

set the time zone negative field to true

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

Reimplemented in org.exolab.castor.types.Century, org.exolab.castor.types.Month, and org.exolab.castor.types.Year.

Referenced by org.exolab.castor.types.RecurringDuration.parseRecurringDuration(), and org.exolab.castor.types.TimePeriod.setFields().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties