public class Observance extends ICalComponent
DaylightSavingsTime
,
StandardTime
,
RFC 5545
p.62-71,
RFC 2445 p.60-7components, properties
Constructor and Description |
---|
Observance() |
Modifier and Type | Method and Description |
---|---|
void |
addComment(Comment comment)
Adds a comment to the timezone observance.
|
Comment |
addComment(String comment)
Adds a comment to the timezone observance.
|
void |
addExceptionDates(ExceptionDates exceptionDates)
Adds a list of exceptions to the timezone observance.
|
void |
addRecurrenceDates(RecurrenceDates recurrenceDates)
Adds a list of dates/periods that help define the recurrence rule of this
timezone observance (if one is defined).
|
TimezoneName |
addTimezoneName(String timezoneName)
Adds a traditional, non-standard name for the timezone observance.
|
void |
addTimezoneName(TimezoneName timezoneName)
Adds a traditional, non-standard name for the timezone observance.
|
List<Comment> |
getComments()
Gets the comments attached to the timezone observance.
|
DateStart |
getDateStart()
Gets the date that the timezone observance starts.
|
List<ExceptionDates> |
getExceptionDates()
Gets the list of exceptions to the timezone observance.
|
List<RecurrenceDates> |
getRecurrenceDates()
Gets the list of dates/periods that help define the recurrence rule of
this timezone observance (if one is defined).
|
RecurrenceRule |
getRecurrenceRule()
Gets how often the timezone observance repeats.
|
List<TimezoneName> |
getTimezoneNames()
Gets the traditional, non-standard names for the timezone observance.
|
TimezoneOffsetFrom |
getTimezoneOffsetFrom()
Gets the UTC offset that the timezone observance transitions from.
|
TimezoneOffsetTo |
getTimezoneOffsetTo()
Gets the UTC offset that the timezone observance transitions to.
|
void |
setDateStart(DateStart dateStart)
Sets the date that the timezone observance starts.
|
DateStart |
setDateStart(DateTimeComponents rawComponents)
Sets the date that the timezone observance starts.
|
DateStart |
setDateStart(ICalDate date)
Sets the date that the timezone observance starts.
|
RecurrenceRule |
setRecurrenceRule(Recurrence recur)
Sets how often the timezone observance repeats.
|
void |
setRecurrenceRule(RecurrenceRule recurrenceRule)
Sets how often the timezone observance repeats.
|
TimezoneOffsetFrom |
setTimezoneOffsetFrom(Integer hour,
Integer minute)
Sets the UTC offset that the timezone observance transitions from.
|
void |
setTimezoneOffsetFrom(TimezoneOffsetFrom timezoneOffsetFrom)
Sets the UTC offset that the timezone observance transitions from.
|
TimezoneOffsetFrom |
setTimezoneOffsetFrom(UtcOffset offset)
Sets the UTC offset that the timezone observance transitions from.
|
TimezoneOffsetTo |
setTimezoneOffsetTo(Integer hour,
Integer minute)
Sets the UTC offset that the timezone observance transitions to.
|
void |
setTimezoneOffsetTo(TimezoneOffsetTo timezoneOffsetTo)
Sets the UTC offset that the timezone observance transitions to.
|
TimezoneOffsetTo |
setTimezoneOffsetTo(UtcOffset offset)
Sets the UTC offset that the timezone observance transitions to.
|
protected void |
validate(List<ICalComponent> components,
ICalVersion version,
List<Warning> warnings)
Checks the component for data consistency problems or deviations from the
spec.
|
addComponent, addExperimentalComponent, addExperimentalProperty, addExperimentalProperty, addProperty, checkOptionalCardinality, checkRequiredCardinality, checkStatus, getComponent, getComponents, getComponents, getExperimentalComponent, getExperimentalComponents, getExperimentalComponents, getExperimentalProperties, getExperimentalProperties, getExperimentalProperty, getProperties, getProperties, getProperty, removeComponents, removeExperimentalComponents, removeExperimentalProperty, removeProperties, setComponent, setComponent, setExperimentalComponents, setExperimentalProperty, setExperimentalProperty, setProperty, setProperty, validate
public Observance()
public DateStart getDateStart()
public void setDateStart(DateStart dateStart)
dateStart
- the start date or null to removepublic DateStart setDateStart(ICalDate date)
date
- the start date or null to removepublic DateStart setDateStart(DateTimeComponents rawComponents)
rawComponents
- the start date or null to removepublic TimezoneOffsetTo getTimezoneOffsetTo()
public void setTimezoneOffsetTo(TimezoneOffsetTo timezoneOffsetTo)
timezoneOffsetTo
- the UTC offset or null to removepublic TimezoneOffsetTo setTimezoneOffsetTo(Integer hour, Integer minute)
hour
- the hour offset (e.g. "-5")minute
- the minute offset (e.g. "0")public TimezoneOffsetTo setTimezoneOffsetTo(UtcOffset offset)
offset
- the offsetpublic TimezoneOffsetFrom getTimezoneOffsetFrom()
public void setTimezoneOffsetFrom(TimezoneOffsetFrom timezoneOffsetFrom)
timezoneOffsetFrom
- the UTC offset or null to removepublic TimezoneOffsetFrom setTimezoneOffsetFrom(Integer hour, Integer minute)
hour
- the hour offset (e.g. "-5")minute
- the minute offset (e.g. "0")public TimezoneOffsetFrom setTimezoneOffsetFrom(UtcOffset offset)
offset
- the offsetpublic RecurrenceRule getRecurrenceRule()
public RecurrenceRule setRecurrenceRule(Recurrence recur)
recur
- the recurrence rule or null to removepublic void setRecurrenceRule(RecurrenceRule recurrenceRule)
recurrenceRule
- the recurrence rule or null to removepublic List<Comment> getComments()
public void addComment(Comment comment)
comment
- the comment to addpublic Comment addComment(String comment)
comment
- the comment to addpublic List<RecurrenceDates> getRecurrenceDates()
public void addRecurrenceDates(RecurrenceDates recurrenceDates)
recurrenceDates
- the recurrence datespublic List<TimezoneName> getTimezoneNames()
public void addTimezoneName(TimezoneName timezoneName)
timezoneName
- the timezone observance namepublic TimezoneName addTimezoneName(String timezoneName)
timezoneName
- the timezone observance name (e.g. "EST")public List<ExceptionDates> getExceptionDates()
public void addExceptionDates(ExceptionDates exceptionDates)
exceptionDates
- the list of exceptionsprotected void validate(List<ICalComponent> components, ICalVersion version, List<Warning> warnings)
ICalComponent
Checks the component for data consistency problems or deviations from the spec.
This method should be overridden by child classes that wish to provide validation logic. The default implementation of this method does nothing.
validate
in class ICalComponent
components
- the hierarchy of components that the component belongs
toversion
- the version to validate againstwarnings
- the list to add the warnings toCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.