net.fortuna.ical4j.model
Class Component
java.lang.Object
net.fortuna.ical4j.model.Component
- Serializable
public abstract class Component
extends java.lang.Object
implements Serializable
$Id: Component.java,v 1.29 2008/12/16 12:34:53 fortuna Exp $ [Apr 5, 2004]
Defines an iCalendar component. Subclasses of this class provide additional validation and typed values for specific
iCalendar components.
Component(String s) - Constructs a new component containing no properties.
|
Component(String s, PropertyList p) - Constructor made protected to enforce the use of
ComponentFactory for component instantiation.
|
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(Object arg0) - Uses
EqualsBuilder to test equality.
|
String | getName()
|
PropertyList | getProperties()
|
PropertyList | getProperties(String name) - Convenience method for retrieving a list of named properties.
|
Property | getProperty(String name) - Convenience method for retrieving a named property.
|
int | hashCode() - Uses
HashCodeBuilder to build hashcode.
|
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.
|
AVAILABLE
public static final String AVAILABLE
BEGIN
public static final String BEGIN
END
public static final String END
EXPERIMENTAL_PREFIX
public static final String EXPERIMENTAL_PREFIX
VALARM
public static final String VALARM
VAVAILABILITY
public static final String VAVAILABILITY
VEVENT
public static final String VEVENT
VFREEBUSY
public static final String VFREEBUSY
VJOURNAL
public static final String VJOURNAL
VTIMEZONE
public static final String VTIMEZONE
VTODO
public static final String VTODO
VVENUE
public static final String VVENUE
Component
protected Component(String s)
Constructs a new component containing no properties.
Component
protected Component(String s,
PropertyList p)
Constructor made protected to enforce the use of ComponentFactory
for component instantiation.
s
- component namep
- a list of properties
calculateRecurrenceSet
public final PeriodList calculateRecurrenceSet(Period period)
Calculates the recurrence set for this component using the specified period.
The recurrence set is derived from a combination of the event start date,
recurrence rules and dates, and exception rules and dates. Note that component
transparency and anniversary-style dates do not affect the resulting
intersection.
copy
public Component copy()
throws ParseException,
IOException,
URISyntaxException
Create a (deep) copy of this component.
equals
public boolean equals(Object arg0)
Uses EqualsBuilder
to test equality. Two components are equal if and only if their name and property lists
are equal.
getName
public final String getName()
getProperties
public final PropertyList getProperties()
getProperties
public final PropertyList getProperties(String name)
Convenience method for retrieving a list of named properties.
name
- name of properties to retrieve
- a property list containing only properties with the specified name
getProperty
public final Property getProperty(String name)
Convenience method for retrieving a named property.
name
- name of the property to retrieve
- the first matching property in the property list with the specified name
hashCode
public int hashCode()
Uses HashCodeBuilder
to build hashcode.
toString
public String toString()
java.lang.Object.toString()
validate
public final void validate()
throws ValidationException
Perform validation on a component and its properties.
validate
public abstract void validate(boolean recurse)
throws ValidationException
Perform validation on a component.
recurse
- indicates whether to validate the component's properties
validateProperties
protected final void validateProperties()
throws ValidationException
Invoke validation on the component properties in its current state.