com.funambol.common.pim.vcalendar
Class BasicVCalendarParserListener

java.lang.Object
  extended by com.funambol.common.pim.vcalendar.BasicVCalendarParserListener
Direct Known Subclasses:
ICalendarParserListener, XVCalendarParserListener

public abstract class BasicVCalendarParserListener
extends java.lang.Object

This class implements the a basic vCalendar parser listener which manages the parsing of common properties shared by the vCalendar 1.0 and iCalendar (vCalendar 2.0) formats, and fills those common properties to a JSR75 PIMItem object.

Assumptions:

  • vCalendar represents a vCalendar version 1.0
  • iCalendar represents a vCalendar version 2.0
  • NOTE: Implementations of the iCalendar and vCalendar parser listeners should extend this class.


    Field Summary
    protected  VAlarm alarm
               
    protected  long alarmEndRelatedTime
               
    protected  long alarmStartRelatedTime
              Specifies the alarm related times, used to compute the alarm interval
    protected  boolean allDay
              Check whether this is an allday event
    protected  PIMItem pimItem
               
    protected  PIMList pimList
               
    protected  Utils pimUtils
               
     
    Constructor Summary
    BasicVCalendarParserListener(PIMItem pimItem)
              The construtor accepts a PIMItem object that will be populated of all the common vCalendar properties.
     
    Method Summary
    protected  void addAttendee(java.lang.String value)
              Called when a new attendee is found during the parsing.
     void addEventProperty(ParserProperty property)
               
     void addToDoProperty(ParserProperty property)
               
    protected  java.lang.String getCharset(ArrayList params)
               
    protected  java.lang.String getClearValue(ParserProperty property)
              Get the clear value from ParserProperty: unfolded, decoded, unescaped
    protected  java.lang.String getEncoding(ArrayList params)
               
    protected  java.lang.String getParameter(ArrayList params, java.lang.String paramName)
              Get a parameter value from the specified params array
    protected  void setClass(int pimField, java.lang.String value)
               
    protected  void setEventAlarm(VAlarm alarm)
               
    protected  void setLocation(java.lang.String value)
               
    protected  void setNote(int pimField, java.lang.String value)
               
    protected  void setPriority(java.lang.String value)
               
    protected  void setRevision(int pimField, java.lang.String value)
               
    protected  void setStatus(java.lang.String value)
               
    protected  void setSummary(int pimField, java.lang.String value)
               
    protected  void setUID(int pimField, java.lang.String value)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    pimItem

    protected PIMItem pimItem

    pimList

    protected PIMList pimList

    pimUtils

    protected Utils pimUtils

    allDay

    protected boolean allDay
    Check whether this is an allday event


    alarmStartRelatedTime

    protected long alarmStartRelatedTime
    Specifies the alarm related times, used to compute the alarm interval


    alarmEndRelatedTime

    protected long alarmEndRelatedTime

    alarm

    protected VAlarm alarm
    Constructor Detail

    BasicVCalendarParserListener

    public BasicVCalendarParserListener(PIMItem pimItem)
    The construtor accepts a PIMItem object that will be populated of all the common vCalendar properties.

    Parameters:
    pimItem - the PIMItem object
    Method Detail

    addAttendee

    protected void addAttendee(java.lang.String value)
    Called when a new attendee is found during the parsing. It should be redefined by implementations which support this information.

    Parameters:
    value -

    addEventProperty

    public void addEventProperty(ParserProperty property)
                          throws java.lang.Exception
    Throws:
    java.lang.Exception

    addToDoProperty

    public void addToDoProperty(ParserProperty property)
                         throws java.lang.Exception
    Throws:
    java.lang.Exception

    setSummary

    protected void setSummary(int pimField,
                              java.lang.String value)

    setRevision

    protected void setRevision(int pimField,
                               java.lang.String value)

    setNote

    protected void setNote(int pimField,
                           java.lang.String value)

    setClass

    protected void setClass(int pimField,
                            java.lang.String value)

    setUID

    protected void setUID(int pimField,
                          java.lang.String value)

    setLocation

    protected void setLocation(java.lang.String value)

    setStatus

    protected void setStatus(java.lang.String value)

    setPriority

    protected void setPriority(java.lang.String value)

    setEventAlarm

    protected void setEventAlarm(VAlarm alarm)
                          throws java.lang.Exception
    Throws:
    java.lang.Exception

    getClearValue

    protected java.lang.String getClearValue(ParserProperty property)
    Get the clear value from ParserProperty: unfolded, decoded, unescaped

    Parameters:
    property -
    Returns:
    the clear value

    getParameter

    protected java.lang.String getParameter(ArrayList params,
                                            java.lang.String paramName)
    Get a parameter value from the specified params array

    Parameters:
    params - the array of the params
    paramName - the param name
    Returns:
    the param value

    getEncoding

    protected java.lang.String getEncoding(ArrayList params)

    getCharset

    protected java.lang.String getCharset(ArrayList params)


    Copyright © 2001-2009 Funambol.