com.funambol.common.pim.icalendar
Class ICalendarParserListener

java.lang.Object
  extended by com.funambol.common.pim.vcalendar.BasicVCalendarParserListener
      extended by com.funambol.common.pim.icalendar.ICalendarParserListener

public class ICalendarParserListener
extends BasicVCalendarParserListener

This class implements the ICalendarSyntaxParserListener interface in order to listen all the events which happen during the iCalendar parsing process. Depending on the item type (event or task) it will be filled a JSR75 PIMItem (Event or ToDo), provided through the constructor. It includes some methods which should be implemented by a subclass in order to store extended fields, not directly supported by JSR75:

  • setTZID(String value);
  • setTZOffset(long offset);
  • setAllDay(boolean allday);
  • setTaskAlarm(VAlarm value);
  • Common vCalendar properties are parsed by the BasicVCalendarParserListener.


    Field Summary
    protected  long eventStartTime
               
    protected  java.lang.String tzid
               
     
    Fields inherited from class com.funambol.common.pim.vcalendar.BasicVCalendarParserListener
    alarm, alarmEndRelatedTime, alarmStartRelatedTime, allDay, pimItem, pimList, pimUtils
     
    Constructor Summary
    ICalendarParserListener(PIMItem pimItem)
              The construtor accepts a PIMItem object that will be populated of all the iCalendar properties
     
    Method Summary
     void addAlarm()
               
     void addAlarmProperty(ParserProperty property)
               
     void addDayLightCProperty(ParserProperty property)
               
     void addEventProperty(ParserProperty property)
               
     void addProperty(ParserProperty property)
               
     void addStandardCProperty(ParserProperty property)
               
     void addTimezoneDayLightC()
               
     void addTimezoneProperty(ParserProperty property)
               
     void addTimezoneStandardC()
               
     void addToDoProperty(ParserProperty property)
               
     void end()
               
     void endAlarm()
               
     void endEvent()
               
     void endTimezone()
               
     void endTimezoneDayLightC()
               
     void endTimezoneStandardC()
               
     void endToDo()
               
    protected  void setAllDay(boolean allday)
               
    protected  void setCompleted(java.lang.String value)
               
    protected  void setDue(java.lang.String value, java.lang.String tzid)
               
    protected  void setEnd(java.lang.String value, java.lang.String tzid)
               
    protected  void setRRULE(java.lang.String value)
              End listener methods
    protected  void setStart(java.lang.String value, java.lang.String tzid)
               
    protected  void setTaskAlarm(VAlarm alarm)
               
    protected  void setTZID(java.lang.String value)
              Methods which should be implemented by a subclass in order to store additional data, not supported by JSR75.
    protected  void setTZOffset(long offset)
               
     void start()
              Unused methods
     void startAlarm()
               
     void startEvent()
               
     void startTimezone()
               
     void startTimezoneDayLightC()
               
     void startTimezoneStandardC()
               
     void startToDo()
               
     
    Methods inherited from class com.funambol.common.pim.vcalendar.BasicVCalendarParserListener
    addAttendee, getCharset, getClearValue, getEncoding, getParameter, setClass, setEventAlarm, setLocation, setNote, setPriority, setRevision, setStatus, setSummary, setUID
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    tzid

    protected java.lang.String tzid

    eventStartTime

    protected long eventStartTime
    Constructor Detail

    ICalendarParserListener

    public ICalendarParserListener(PIMItem pimItem)
    The construtor accepts a PIMItem object that will be populated of all the iCalendar properties

    Parameters:
    pimItem - the PIMItem object
    Method Detail

    setTZID

    protected void setTZID(java.lang.String value)
    Methods which should be implemented by a subclass in order to store additional data, not supported by JSR75.


    setTZOffset

    protected void setTZOffset(long offset)

    setTaskAlarm

    protected void setTaskAlarm(VAlarm alarm)

    setAllDay

    protected void setAllDay(boolean allday)

    addEventProperty

    public void addEventProperty(ParserProperty property)
                          throws ParseException
    Overrides:
    addEventProperty in class BasicVCalendarParserListener
    Throws:
    ParseException

    addToDoProperty

    public void addToDoProperty(ParserProperty property)
                         throws ParseException
    Overrides:
    addToDoProperty in class BasicVCalendarParserListener
    Throws:
    ParseException

    startAlarm

    public void startAlarm()
                    throws ParseException
    Throws:
    ParseException

    addAlarmProperty

    public void addAlarmProperty(ParserProperty property)
                          throws ParseException
    Throws:
    ParseException

    addTimezoneProperty

    public void addTimezoneProperty(ParserProperty property)
                             throws ParseException
    Throws:
    ParseException

    endEvent

    public void endEvent()
                  throws ParseException
    Throws:
    ParseException

    endToDo

    public void endToDo()
                 throws ParseException
    Throws:
    ParseException

    end

    public void end()

    start

    public void start()
    Unused methods


    startEvent

    public void startEvent()
                    throws ParseException
    Throws:
    ParseException

    startToDo

    public void startToDo()
                   throws ParseException
    Throws:
    ParseException

    addAlarm

    public void addAlarm()
                  throws ParseException
    Throws:
    ParseException

    endAlarm

    public void endAlarm()
                  throws ParseException
    Throws:
    ParseException

    addProperty

    public void addProperty(ParserProperty property)
                     throws ParseException
    Throws:
    ParseException

    startTimezone

    public void startTimezone()
                       throws ParseException
    Throws:
    ParseException

    endTimezone

    public void endTimezone()
                     throws ParseException
    Throws:
    ParseException

    addTimezoneStandardC

    public void addTimezoneStandardC()
                              throws ParseException
    Throws:
    ParseException

    addTimezoneDayLightC

    public void addTimezoneDayLightC()
                              throws ParseException
    Throws:
    ParseException

    startTimezoneStandardC

    public void startTimezoneStandardC()
                                throws ParseException
    Throws:
    ParseException

    endTimezoneStandardC

    public void endTimezoneStandardC()
                              throws ParseException
    Throws:
    ParseException

    addStandardCProperty

    public void addStandardCProperty(ParserProperty property)
                              throws ParseException
    Throws:
    ParseException

    startTimezoneDayLightC

    public void startTimezoneDayLightC()
                                throws ParseException
    Throws:
    ParseException

    endTimezoneDayLightC

    public void endTimezoneDayLightC()
                              throws ParseException
    Throws:
    ParseException

    addDayLightCProperty

    public void addDayLightCProperty(ParserProperty property)
                              throws ParseException
    Throws:
    ParseException

    setRRULE

    protected void setRRULE(java.lang.String value)
                     throws ParseException
    End listener methods

    Throws:
    ParseException

    setStart

    protected void setStart(java.lang.String value,
                            java.lang.String tzid)
                     throws ParseException
    Throws:
    ParseException

    setEnd

    protected void setEnd(java.lang.String value,
                          java.lang.String tzid)
                   throws ParseException
    Throws:
    ParseException

    setCompleted

    protected void setCompleted(java.lang.String value)
                         throws ParseException
    Throws:
    ParseException

    setDue

    protected void setDue(java.lang.String value,
                          java.lang.String tzid)
                   throws ParseException
    Throws:
    ParseException


    Copyright © 2001-2009 Funambol.