public class VTimeZone extends CalendarComponent
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
)
| Constructor and Description |
|---|
VTimeZone()
Default constructor.
|
VTimeZone(ComponentList 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 observances)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Component |
copy()
Overrides default copy method to add support for copying observance sub-components.
|
boolean |
equals(java.lang.Object arg0)
Uses
EqualsBuilder to test equality. |
Observance |
getApplicableObservance(Date date)
Returns the latest applicable timezone observance for the specified date.
|
LastModified |
getLastModified() |
ComponentList |
getObservances() |
TzId |
getTimeZoneId() |
TzUrl |
getTimeZoneUrl() |
int |
hashCode()
Uses
HashCodeBuilder to build hashcode. |
java.lang.String |
toString() |
void |
validate(boolean recurse)
Perform validation on a component.
|
void |
validateAdd()
Apply validation for METHOD=ADD.
|
void |
validateCancel()
Apply validation for METHOD=CANCEL.
|
void |
validateCounter()
Apply validation for METHOD=COUNTER.
|
void |
validateDeclineCounter()
Apply validation for METHOD=DECLINE-COUNTER.
|
void |
validatePublish()
Apply validation for METHOD=PUBLISH.
|
void |
validateRefresh()
Apply validation for METHOD=REFRESH.
|
void |
validateReply()
Apply validation for METHOD=REPLY.
|
void |
validateRequest()
Apply validation for METHOD=REQUEST.
|
calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, validate, validatePropertiespublic VTimeZone()
public VTimeZone(PropertyList properties)
properties - a list of propertiespublic VTimeZone(ComponentList observances)
observances - a list of type componentspublic VTimeZone(PropertyList properties, ComponentList observances)
properties - a list of propertiesobservances - a list of timezone typespublic final java.lang.String toString()
public final void validate(boolean recurse)
throws ValidationException
Componentvalidate in class Componentrecurse - indicates whether to validate the component's propertiesValidationException - where the component is not in a valid statepublic void validatePublish()
throws ValidationException
CalendarComponentvalidatePublish in class CalendarComponentValidationExceptionpublic void validateAdd()
throws ValidationException
CalendarComponentvalidateAdd in class CalendarComponentValidationExceptionpublic void validateCancel()
throws ValidationException
CalendarComponentvalidateCancel in class CalendarComponentValidationExceptionpublic void validateCounter()
throws ValidationException
CalendarComponentvalidateCounter in class CalendarComponentValidationExceptionpublic void validateDeclineCounter()
throws ValidationException
CalendarComponentvalidateDeclineCounter in class CalendarComponentValidationExceptionpublic void validateRefresh()
throws ValidationException
CalendarComponentvalidateRefresh in class CalendarComponentValidationExceptionpublic void validateReply()
throws ValidationException
CalendarComponentvalidateReply in class CalendarComponentValidationExceptionpublic void validateRequest()
throws ValidationException
CalendarComponentvalidateRequest in class CalendarComponentValidationExceptionpublic final ComponentList getObservances()
public final Observance getApplicableObservance(Date date)
date - the latest possible date for a timezone observance onsetpublic final TzId getTimeZoneId()
public final LastModified getLastModified()
public final TzUrl getTimeZoneUrl()
public boolean equals(java.lang.Object arg0)
ComponentEqualsBuilder to test equality. Two components are equal if and only if their name and property lists
are equal.public int hashCode()
ComponentHashCodeBuilder to build hashcode.public Component copy() throws java.text.ParseException, java.io.IOException, java.net.URISyntaxException
copy in class Componentjava.text.ParseExceptionjava.io.IOExceptionjava.net.URISyntaxExceptionComponent.copy()