org.exolab.castor.types
Class TimePeriod

java.lang.Object
  extended byorg.exolab.castor.types.RecurringDurationBase
      extended byorg.exolab.castor.types.RecurringDuration
          extended byorg.exolab.castor.types.TimePeriod
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Century, Month, Year

public class TimePeriod
extends RecurringDuration

Describe an XML schema TimePeriod.

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

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

Constructor Summary
TimePeriod()
           
TimePeriod(java.lang.String duration)
          returns a TimePeriod with the duration facet set up
 
Method Summary
 void setFields(java.lang.String str)
          parse a string to set the fields of a TimePeriod
 void setPeriod(TimeDuration period)
          set the period facet for this recurringDuration
 
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, getDuration, getHour, getMilli, getMinute, getPeriod, getSeconds, getZoneHour, getZoneMinute, isGreater, isNegative, isUTC, isZoneNegative, setDuration, setDuration, setHour, setMinute, setNegative, setPeriod, setSecond, setUTC, setZone, setZoneNegative
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimePeriod

public TimePeriod()

TimePeriod

public TimePeriod(java.lang.String duration)
returns a TimePeriod with the duration facet set up

Parameters:
duration - the String value of the duration facet
Method Detail

setFields

public void setFields(java.lang.String str)
               throws java.text.ParseException
parse a string to set the fields of a TimePeriod

Parameters:
str - the string to parse
Throws:
java.text.ParseException

setPeriod

public void setPeriod(TimeDuration period)
               throws OperationNotSupportedException
Description copied from class: RecurringDurationBase
set the period facet for this recurringDuration

Overrides:
setPeriod in class RecurringDurationBase
Parameters:
period - the period to set
Throws:
OperationNotSupportedException - this exception is thrown when changing the value of the period facet is not allowed


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