public abstract class Component
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AVAILABLE |
static java.lang.String |
BEGIN |
static java.lang.String |
END |
static java.lang.String |
EXPERIMENTAL_PREFIX |
static java.lang.String |
VALARM |
static java.lang.String |
VAVAILABILITY |
static java.lang.String |
VEVENT |
static java.lang.String |
VFREEBUSY |
static java.lang.String |
VJOURNAL |
static java.lang.String |
VTIMEZONE |
static java.lang.String |
VTODO |
static java.lang.String |
VVENUE |
| Modifier | Constructor and Description |
|---|---|
protected |
Component(java.lang.String s)
Constructs a new component containing no properties.
|
protected |
Component(java.lang.String s,
PropertyList p)
Constructor made protected to enforce the use of
ComponentFactory for component instantiation. |
| Modifier and Type | Method and Description |
|---|---|
PeriodList |
calculateRecurrenceSet(Period period)
Calculates the recurrence set for this component using the specified period.
|
Component |
copy()
Create a (deep) copy of this component.
|
boolean |
equals(java.lang.Object arg0)
Uses
EqualsBuilder to test equality. |
java.lang.String |
getName() |
PropertyList |
getProperties() |
PropertyList |
getProperties(java.lang.String name)
Convenience method for retrieving a list of named properties.
|
Property |
getProperty(java.lang.String name)
Convenience method for retrieving a named property.
|
int |
hashCode()
Uses
HashCodeBuilder to build hashcode. |
java.lang.String |
toString() |
void |
validate()
Perform validation on a component and its properties.
|
abstract void |
validate(boolean recurse)
Perform validation on a component.
|
protected void |
validateProperties()
Invoke validation on the component properties in its current state.
|
public static final java.lang.String BEGIN
public static final java.lang.String END
public static final java.lang.String VEVENT
public static final java.lang.String VTODO
public static final java.lang.String VJOURNAL
public static final java.lang.String VFREEBUSY
public static final java.lang.String VTIMEZONE
public static final java.lang.String VALARM
public static final java.lang.String VAVAILABILITY
public static final java.lang.String VVENUE
public static final java.lang.String AVAILABLE
public static final java.lang.String EXPERIMENTAL_PREFIX
protected Component(java.lang.String s)
s - a component nameprotected Component(java.lang.String s,
PropertyList p)
ComponentFactory for component instantiation.s - component namep - a list of propertiespublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public final java.lang.String getName()
public final PropertyList getProperties()
public final PropertyList getProperties(java.lang.String name)
name - name of properties to retrievepublic final Property getProperty(java.lang.String name)
name - name of the property to retrievepublic final void validate()
throws ValidationException
ValidationException - where the component is not in a valid statepublic abstract void validate(boolean recurse)
throws ValidationException
recurse - indicates whether to validate the component's propertiesValidationException - where the component is not in a valid stateprotected final void validateProperties()
throws ValidationException
ValidationException - where any of the component properties is not in a valid statepublic boolean equals(java.lang.Object arg0)
EqualsBuilder to test equality. Two components are equal if and only if their name and property lists
are equal.equals in class java.lang.Objectpublic int hashCode()
HashCodeBuilder to build hashcode.hashCode in class java.lang.Objectpublic Component copy() throws java.text.ParseException, java.io.IOException, java.net.URISyntaxException
java.text.ParseExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionpublic final PeriodList calculateRecurrenceSet(Period period)
period -