java.lang.Object
net.fortuna.ical4j.model.Content
net.fortuna.ical4j.model.Component
net.fortuna.ical4j.model.component.CalendarComponent
net.fortuna.ical4j.model.component.VTimeZone
- All Implemented Interfaces:
Serializable,Comparable<Component>,ComponentContainer<Observance>,ComponentListAccessor<Observance>,FluentComponent,PropertyContainer,PropertyListAccessor,Prototype<Component>,TimeZonePropertyAccessor
public class VTimeZone
extends CalendarComponent
implements ComponentContainer<Observance>, TimeZonePropertyAccessor
$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:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.fortuna.ical4j.model.component.CalendarComponent
EMPTY_VALIDATORFields inherited from class net.fortuna.ical4j.model.Component
AVAILABLE, BEGIN, components, END, EXPERIMENTAL_PREFIX, PARTICIPANT, properties, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VLOCATION, VRESOURCE, VTIMEZONE, VTODO, VVENUEFields inherited from interface net.fortuna.ical4j.model.PropertyContainer
ADD_IF_NOT_PRESENT -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptioncopy()Create a (deep) copy of this component.booleanfinal ObservanceReturns the latest applicable timezone observance for the specified date.static ObservancegetApplicableObservance(Temporal date, List<Observance> observances) Returns the latest applicable timezone observance for the specified date.final List<Observance>inthashCode()protected ComponentFactory<VTimeZone>Returns a new component factory used to create deep copies.voidsetComponentList(ComponentList<Observance> components) validate(boolean recurse) Perform validation on a component.Performs method-specific ITIP validation.Methods inherited from class net.fortuna.ical4j.model.component.CalendarComponent
validateAdd, validateCancel, validateCounter, validateDeclineCounter, validatePublish, validateRefresh, validateReply, validateRequestMethods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, compareTo, getFluentTarget, getName, getProperties, getPropertyList, getUid, getValue, setPropertyList, toString, validate, validatePropertiesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fortuna.ical4j.model.ComponentContainer
add, remove, replace, withMethods inherited from interface net.fortuna.ical4j.model.ComponentListAccessor
getComponent, getComponentsMethods inherited from interface net.fortuna.ical4j.model.FluentComponent
withPropertyMethods inherited from interface net.fortuna.ical4j.model.PropertyContainer
add, addAll, remove, removeAll, removeIf, replace, setPropertyList, withMethods inherited from interface net.fortuna.ical4j.model.PropertyListAccessor
getProperties, getProperty, getProperty, getPropertyList, getRequiredProperty, getRequiredPropertyMethods inherited from interface net.fortuna.ical4j.model.TimeZonePropertyAccessor
getLastModified, getStartDate, getTimeZoneId, getTimeZoneOffsetFrom, getTimeZoneOffsetTo, getTimeZoneUrl
-
Constructor Details
-
VTimeZone
public VTimeZone()Default constructor. -
VTimeZone
Constructs a new instance containing the specified properties.- Parameters:
properties- a list of properties
-
VTimeZone
Constructs a new vtimezone component with no properties and the specified list of type components.- Parameters:
observances- a list of type components
-
VTimeZone
Constructor.- Parameters:
properties- a list of propertiesobservances- a list of timezone types
-
-
Method Details
-
validate
Perform validation on a component.- Specified by:
validatein classComponent- Parameters:
recurse- indicates whether to validate the component's properties- Throws:
ValidationException- where the component is not in a valid state
-
validate
Description copied from class:CalendarComponentPerforms method-specific ITIP validation.- Overrides:
validatein classCalendarComponent- Parameters:
method- the applicable method- Throws:
ValidationException- where the component does not comply with RFC2446
-
getObservances
- Returns:
- Returns the types.
-
getComponentList
- Specified by:
getComponentListin interfaceComponentListAccessor<Observance>- Returns:
- Returns the underlying component list.
-
setComponentList
- Specified by:
setComponentListin interfaceComponentContainer<Observance>
-
getApplicableObservance
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
-
getApplicableObservance
Returns the latest applicable timezone observance for the specified date.- Parameters:
date- the latest possible date for a timezone observance onsetobservances- a list of observances to choose from- Returns:
- the latest applicable timezone observance for the specified date or null if there are no applicable observances
-
copy
Description copied from class:ComponentCreate a (deep) copy of this component. -
equals
-
hashCode
public int hashCode() -
newFactory
Description copied from class:ComponentReturns a new component factory used to create deep copies.- Specified by:
newFactoryin classComponent- Returns:
- a component factory instance
-