Class VTimeZone
- java.lang.Object
-
- net.fortuna.ical4j.model.Component
-
- net.fortuna.ical4j.model.component.CalendarComponent
-
- net.fortuna.ical4j.model.component.VTimeZone
-
- All Implemented Interfaces:
Serializable
,ComponentContainer<Observance>
,PropertyContainer
public class VTimeZone extends CalendarComponent implements ComponentContainer<Observance>
$Id$ [Apr 5, 2004] Defines an iCalendar VTIMEZONE component.4.6.5 Time Zone Component Component Name: VTIMEZONE Purpose: Provide a grouping of component properties that defines a time zone. Formal Definition: A "VTIMEZONE" calendar component is defined by the following notation: timezonec = "BEGIN" ":" "VTIMEZONE" CRLF 2*( ; 'tzid' is required, but MUST NOT occur more ; than once tzid / ; 'last-mod' and 'tzurl' are optional, but MUST NOT occur more than once last-mod / tzurl / ; one of 'standardc' or 'daylightc' MUST occur ..; and each MAY occur more than once. standardc / daylightc / ; the following is optional, ; and MAY occur more than once x-prop ) "END" ":" "VTIMEZONE" CRLF standardc = "BEGIN" ":" "STANDARD" CRLF tzprop "END" ":" "STANDARD" CRLF daylightc = "BEGIN" ":" "DAYLIGHT" CRLF tzprop "END" ":" "DAYLIGHT" CRLF tzprop = 3*( ; the following are each REQUIRED, ; but MUST NOT occur more than once dtstart / tzoffsetto / tzoffsetfrom / ; the following are optional, ; and MAY occur more than once comment / rdate / rrule / tzname / x-prop )
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VTimeZone.Factory
-
Field Summary
-
Fields inherited from class net.fortuna.ical4j.model.component.CalendarComponent
EMPTY_VALIDATOR
-
Fields inherited from class net.fortuna.ical4j.model.Component
AVAILABLE, BEGIN, components, END, EXPERIMENTAL_PREFIX, PARTICIPANT, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VLOCATION, VRESOURCE, VTIMEZONE, VTODO, VVENUE
-
-
Constructor Summary
Constructors Constructor Description VTimeZone()
Default constructor.VTimeZone(ComponentList<Observance> observances)
Constructs a new vtimezone component with no properties and the specified list of type components.VTimeZone(PropertyList properties)
Constructs a new instance containing the specified properties.VTimeZone(PropertyList properties, ComponentList<Observance> observances)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object arg0)
Observance
getApplicableObservance(Date date)
Returns the latest applicable timezone observance for the specified date.ComponentList<Observance>
getComponents()
LastModified
getLastModified()
ComponentList<Observance>
getObservances()
TzId
getTimeZoneId()
TzUrl
getTimeZoneUrl()
protected Validator
getValidator(Method method)
int
hashCode()
void
validate(boolean recurse)
Perform validation on a component.-
Methods inherited from class net.fortuna.ical4j.model.component.CalendarComponent
validate, validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequest
-
Methods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, copy, getName, getProperties, getRequiredProperty, toString, validate, validateProperties
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.fortuna.ical4j.model.ComponentContainer
getComponent, getComponents
-
Methods inherited from interface net.fortuna.ical4j.model.PropertyContainer
getProperties, getProperty
-
-
-
-
Constructor Detail
-
VTimeZone
public VTimeZone()
Default constructor.
-
VTimeZone
public VTimeZone(PropertyList properties)
Constructs a new instance containing the specified properties.- Parameters:
properties
- a list of properties
-
VTimeZone
public VTimeZone(ComponentList<Observance> observances)
Constructs a new vtimezone component with no properties and the specified list of type components.- Parameters:
observances
- a list of type components
-
VTimeZone
public VTimeZone(PropertyList properties, ComponentList<Observance> observances)
Constructor.- Parameters:
properties
- a list of propertiesobservances
- a list of timezone types
-
-
Method Detail
-
validate
public final void validate(boolean recurse) throws ValidationException
Perform validation on a component.- Specified by:
validate
in classComponent
- Parameters:
recurse
- indicates whether to validate the component's properties- Throws:
ValidationException
- where the component is not in a valid state
-
getValidator
protected Validator getValidator(Method method)
- Specified by:
getValidator
in classCalendarComponent
- Parameters:
method
- a method to validate on- Returns:
- a validator for the specified method or null if the method is not supported
-
getObservances
public final ComponentList<Observance> getObservances()
- Returns:
- Returns the types.
-
getComponents
public ComponentList<Observance> getComponents()
- Specified by:
getComponents
in interfaceComponentContainer<Observance>
-
getApplicableObservance
public final Observance getApplicableObservance(Date date)
Returns the latest applicable timezone observance for the specified date.- Parameters:
date
- the latest possible date for a timezone observance onset- Returns:
- the latest applicable timezone observance for the specified date or null if there are no applicable observances
-
getTimeZoneId
public final TzId getTimeZoneId()
- Returns:
- the mandatory timezone identifier property
-
getLastModified
public final LastModified getLastModified()
- Returns:
- the optional last-modified property
-
getTimeZoneUrl
public final TzUrl getTimeZoneUrl()
- Returns:
- the optional timezone url property
-
-