|
© 2003 BEA Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.bea.p13n.xml.schema.RecurringDuration
This class provides the Java binding for the XML schema type recurringDuration as specified in Section 3.2.7 of XML Schema Part 2: Datatypes.
recurringDuration represents a specific period of time that recurs with a specific frequency, starting from a specific point in time. The value space of timeInstant is the space of timeDurations that recur with a specific timeDuration from a specific timeInstant.
Example: 2001-01-18T09:00:00.0005Z with a duration
P1M and period P2D.
Values of th facets duration and
period must be specified while creating an instance of
RecurringDuration. Otherwise, this class uses defaults of "P0Y" for
both duration and period.
| Constructor Summary | |
protected |
RecurringDuration()
Constructs a new RecurringDuration instance with "P0Y" as the duration and period at the current point in time. |
protected |
RecurringDuration(TimeInstant instant,
TimeDuration duration,
TimeDuration period)
Constructs a new RecurringDuration instance with the specified duration and period and at the specified point in time. |
| Method Summary | |
Object |
clone()
Retuns a copy of this RecurringDuration. |
int |
compareTo(Object anotherObject)
Compares this RecurringDuration with another object. |
int |
compareTo(RecurringDuration anotherRecurringDuration)
Compares this RecurringDuration with another RecurringDuration. |
static RecurringDuration |
createRecurringDuration(String instant)
Returns a RecurringDuration instance at the specified point in time with a duration of "P0Y" and period of "P0Y". |
static RecurringDuration |
createRecurringDuration(String instant,
String duration,
String period)
Returns a RecurringDuration instance at the specified point in time with the given duration and period. |
static RecurringDuration |
createRecurringDuration(TimeInstant instant,
TimeDuration duration,
TimeDuration period)
Returns a RecurringDuration instance at the specified point in time with the given duration and period. |
TimeDuration |
getDuration()
Returns the duration |
TimeInstant |
getInstant()
Returns the point in time |
TimeDuration |
getPeriod()
Returns the period |
void |
setDuration(TimeDuration duration)
Sets the duration |
void |
setInstant(TimeInstant instant)
Sets the point in time |
void |
setPeriod(TimeDuration period)
Sets the period |
String |
toString()
Returns a XML schema compliant recurringDuration string expressed as the instant of this Recurringduration. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected RecurringDuration()
protected RecurringDuration(TimeInstant instant,
TimeDuration duration,
TimeDuration period)
Constructs a new RecurringDuration instance with the specified duration and period and at the specified point in time.
instant - point in timeduration - duritionperiod - period| Method Detail |
public static RecurringDuration createRecurringDuration(String instant)
throws ParseException
instant - point in time
ParseException
public static RecurringDuration createRecurringDuration(String instant,
String duration,
String period)
throws ParseException
Returns a RecurringDuration instance at the specified point in time with the given duration and period.
instant - point in timeduration - durationperiod - period
ParseException
public static RecurringDuration createRecurringDuration(TimeInstant instant,
TimeDuration duration,
TimeDuration period)
throws ParseException
Returns a RecurringDuration instance at the specified point in time with the given duration and period.
instant - point in timeduration - durationperiod - period
ParseExceptionpublic TimeInstant getInstant()
public void setInstant(TimeInstant instant)
instant - point in timepublic TimeDuration getDuration()
public void setDuration(TimeDuration duration)
duration - durationpublic TimeDuration getPeriod()
public void setPeriod(TimeDuration period)
period - periodpublic Object clone()
clone in class Objectpublic int compareTo(RecurringDuration anotherRecurringDuration)
anotherRecurringDuration - another RecurringDuration
object to be compared.
IllegalArgumentException - thrown when the argument
has a different duration and period.public int compareTo(Object anotherObject)
Compares this RecurringDuration with another object. If the other object is a RecurringDuration, this method behaves like compareTo(RecurringDuration). Otherwise, it throws a ClassCastException.
compareTo in interface ComparableIllegalArgumentException - thrown when the argument has a different duration and period.
ClassCastException - thrown if the argument is not an instance of TimeInstant.public String toString()
Returns a XML schema compliant recurringDuration string expressed as the instant of this Recurringduration.
toString in class Object
|
© 2003 BEA Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||