|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.common.pim.model.converter.TimeZoneHelper
public class TimeZoneHelper
This class implements the time-zone conversions.
Field Summary | |
---|---|
protected java.lang.String |
id
|
Constructor Summary | |
---|---|
protected |
TimeZoneHelper()
Just creates an empty TimeZoneHelper. |
|
TimeZoneHelper(Property tz,
java.util.List<Property> daylightList)
Creates a new instance of TimeZoneHelper on the basis of the information extracted from a vCalendar (1.0) item. |
|
TimeZoneHelper(java.lang.String id,
long from,
long to)
Creates a new instance of TimeZoneHelper on the basis of a zoneinfo (Olson database) ID. |
|
TimeZoneHelper(VTimezone vTimeZone,
long from,
long to)
Creates a new instance of TimeZoneHelper on the basis of the information extracted from an iCalendar (vCalendar 2.0) item. |
Method Summary | |
---|---|
protected java.lang.String |
cacheID(java.lang.String id)
|
void |
clearCachedID()
|
protected long |
fixFrom(java.util.TimeZone tz,
int standardOffset,
long from)
|
protected int |
getBasicOffset()
|
java.util.List<Property> |
getDaylightList()
|
protected java.util.List<ICalendarTimeZoneTransition> |
getICalendarTransitions()
|
protected java.lang.String |
getName()
|
static long |
getReferenceTime()
|
protected java.util.List<TimeZoneTransition> |
getTransitions()
|
Property |
getTZ()
|
VTimezone |
getVTimezone()
|
java.util.List<Property> |
getXVCalendarProperties()
|
protected void |
processID(java.lang.String id,
long from,
long to)
Extract time-zone information from a zoneinfo (Olson database) ID and saves them in the TimeZoneHelper fields. |
protected void |
setName(java.lang.String name)
This setter is only for test purposes. |
static void |
setReferenceTime(long time)
|
java.lang.String |
toID()
Gets an Olson ID corresponding to the transitions and offsets saved. |
java.lang.String |
toID(java.lang.String suggested)
Gets an Olson ID corresponding to the information saved and a suggestion. |
java.lang.String |
toID(java.util.TimeZone suggested)
Gets an Olson ID corresponding to the information saved and a suggestion. |
protected static VTimezone |
toVTimezone(java.util.List<ICalendarTimeZoneTransition> iCalendarTransitions,
java.lang.String id,
int basicOffset)
|
protected static int |
year(long time)
|
protected static int |
year(java.lang.String time)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String id
Constructor Detail |
---|
protected TimeZoneHelper()
public TimeZoneHelper(Property tz, java.util.List<Property> daylightList) throws java.lang.Exception
tz
- the TZ propertydaylightList
- a List containing all DAYLIGHT properties
java.lang.Exception
public TimeZoneHelper(VTimezone vTimeZone, long from, long to) throws java.lang.Exception
vTimeZone
- from
- the start of the relevant time interval for the generation of
transitions (an istant expressed as a long)to
- the end of the relevant time interval for the generation of
transitions (an istant expressed as a long)
java.lang.Exception
public TimeZoneHelper(java.lang.String id, long from, long to)
id
- the time zone ID according to the zoneinfo (Olson) databasefrom
- the start of the relevant time interval for the generation of
transitions (an istant expressed as a long)to
- the end of the relevant time interval for the generation of
transitions (an istant expressed as a long)Method Detail |
---|
protected java.lang.String getName()
protected void setName(java.lang.String name)
name
- the new name to setprotected int getBasicOffset()
protected java.util.List<TimeZoneTransition> getTransitions()
protected void processID(java.lang.String id, long from, long to)
id
- the time zone ID according to the zoneinfo (Olson) databasefrom
- the start of the relevant time interval for the generation of
transitions (an istant expressed as a long)to
- the end of the relevant time interval for the generation of
transitions (an istant expressed as a long)public java.lang.String toID()
public java.lang.String toID(java.lang.String suggested)
suggested
- the suggested ID (as a string)
public java.lang.String toID(java.util.TimeZone suggested)
suggested
- the suggested time zone (as a TimeZone object)
public Property getTZ()
public java.util.List<Property> getDaylightList()
public java.util.List<Property> getXVCalendarProperties()
public VTimezone getVTimezone()
protected java.util.List<ICalendarTimeZoneTransition> getICalendarTransitions()
protected java.lang.String cacheID(java.lang.String id)
protected static VTimezone toVTimezone(java.util.List<ICalendarTimeZoneTransition> iCalendarTransitions, java.lang.String id, int basicOffset)
protected static int year(long time)
protected static int year(java.lang.String time) throws java.text.ParseException
java.text.ParseException
public void clearCachedID()
public static long getReferenceTime()
public static void setReferenceTime(long time)
protected long fixFrom(java.util.TimeZone tz, int standardOffset, long from)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |