|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiweekly.component.ICalComponent
biweekly.component.VTimezone
public class VTimezone
Defines a timezone's UTC offsets throughout the year.
Examples:
VTimezone timezone = new VTimezone("Eastern Standard Time"); StandardTime standard = new StandardTime(); DateTimeComponents componentsStandard = new DateTimeComponents(1998, 10, 25, 2, 0, 0, false); standard.setDateStart(componentsStandard); standard.setTimezoneOffsetFrom(-4, 0); standard.setTimezoneOffsetTo(-5, 0); timezone.addStandardTime(standard); DaylightSavingsTime daylight = new DaylightSavingsTime(); DateTimeComponents componentsDaylight = new DateTimeComponents(1999, 4, 4, 2, 0, 0, false); daylight.setDateStart(componentsDaylight); daylight.setTimezoneOffsetFrom(-5, 0); daylight.setTimezoneOffsetTo(-4, 0); timezone.addDaylightSavingsTime(daylight);
Field Summary |
---|
Fields inherited from class biweekly.component.ICalComponent |
---|
components, properties |
Constructor Summary | |
---|---|
VTimezone(String identifier)
Creates a new timezone component. |
Method Summary | |
---|---|
void |
addDaylightSavingsTime(DaylightSavingsTime daylightSavingsTime)
Adds a "daylight savings" observance time range. |
void |
addStandardTime(StandardTime standardTime)
Adds a "standard" observance time range. |
List<DaylightSavingsTime> |
getDaylightSavingsTime()
Gets the timezone's "daylight savings" observance time ranges. |
LastModified |
getLastModified()
Gets the date-time that the timezone data was last changed. |
List<StandardTime> |
getStandardTimes()
Gets the timezone's "standard" observance time ranges. |
TimezoneId |
getTimezoneId()
Gets the ID for this timezone. |
TimezoneUrl |
getTimezoneUrl()
Gets the timezone URL, which points to an iCalendar object that contains further information on the timezone. |
LastModified |
setLastModified(Date lastModified)
Sets the date-time that the timezone data was last changed. |
void |
setLastModified(LastModified lastModified)
Sets the date-time that the timezone data was last changed. |
TimezoneId |
setTimezoneId(String timezoneId)
Sets an ID for this timezone. |
void |
setTimezoneId(TimezoneId timezoneId)
Sets an ID for this timezone. |
TimezoneUrl |
setTimezoneUrl(String url)
Sets the timezone URL, which points to an iCalendar object that contains further information on the timezone. |
void |
setTimezoneUrl(TimezoneUrl url)
Sets the timezone URL, which points to an iCalendar object that contains further information on the timezone. |
protected void |
validate(List<ICalComponent> components,
List<String> warnings)
Checks the component for data consistency problems or deviations from the spec. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VTimezone(String identifier)
identifier
- a unique identifier for this timezone (allows it to be
referenced by date-time properties that support timezones).Method Detail |
---|
public TimezoneId getTimezoneId()
public void setTimezoneId(TimezoneId timezoneId)
timezoneId
- the timezone ID or null to removepublic TimezoneId setTimezoneId(String timezoneId)
timezoneId
- the timezone ID or null to remove
public LastModified getLastModified()
public void setLastModified(LastModified lastModified)
lastModified
- the last modified date or null to removepublic LastModified setLastModified(Date lastModified)
lastModified
- the last modified date or null to remove
public TimezoneUrl getTimezoneUrl()
public void setTimezoneUrl(TimezoneUrl url)
url
- the URL or null to removepublic TimezoneUrl setTimezoneUrl(String url)
url
- the timezone URL (e.g.
"http://example.com/America-New_York.ics") or null to remove
public List<StandardTime> getStandardTimes()
public void addStandardTime(StandardTime standardTime)
standardTime
- the "standard" observance timepublic List<DaylightSavingsTime> getDaylightSavingsTime()
public void addDaylightSavingsTime(DaylightSavingsTime daylightSavingsTime)
daylightSavingsTime
- the "daylight savings" observance timeprotected void validate(List<ICalComponent> components, List<String> warnings)
ICalComponent
validate
in class ICalComponent
components
- the hierarchy of components that the component belongs
towarnings
- the list to add the warnings to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |