net.fortuna.ical4j.model.component
Class VEvent

java.lang.Object
  extended by net.fortuna.ical4j.model.Component
      extended by net.fortuna.ical4j.model.component.CalendarComponent
          extended by net.fortuna.ical4j.model.component.VEvent
All Implemented Interfaces:
java.io.Serializable

public class VEvent
extends CalendarComponent

$Id: VEvent.java,v 1.52 2009/01/10 07:27:23 fortuna Exp $ [Apr 5, 2004] Defines an iCalendar VEVENT component.

       4.6.1 Event Component
   
          Component Name: "VEVENT"
   
          Purpose: Provide a grouping of component properties that describe an
          event.
   
          Format Definition: A "VEVENT" calendar component is defined by the
          following notation:
   
            eventc     = "BEGIN" ":" "VEVENT" CRLF
                         eventprop *alarmc
                         "END" ":" "VEVENT" CRLF
   
            eventprop  = *(
   
                       ; the following are optional,
                       ; but MUST NOT occur more than once
   
                       class / created / description / dtstart / geo /
                       last-mod / location / organizer / priority /
                       dtstamp / seq / status / summary / transp /
                       uid / url / recurid /
   
                       ; either 'dtend' or 'duration' may appear in
                       ; a 'eventprop', but 'dtend' and 'duration'
                       ; MUST NOT occur in the same 'eventprop'
   
                       dtend / duration /
   
                       ; the following are optional,
                       ; and MAY occur more than once
   
                       attach / attendee / categories / comment /
                       contact / exdate / exrule / rstatus / related /
                       resources / rdate / rrule / x-prop
   
                       )
 
Example 1 - Creating a new all-day event:

 java.util.Calendar cal = java.util.Calendar.getInstance();
 cal.set(java.util.Calendar.MONTH, java.util.Calendar.DECEMBER);
 cal.set(java.util.Calendar.DAY_OF_MONTH, 25);
 
 VEvent christmas = new VEvent(cal.getTime(), "Christmas Day");
 
 // initialise as an all-day event..
 christmas.getProperties().getProperty(Property.DTSTART).getParameters().add(
         Value.DATE);
 
 // add timezone information..
 VTimeZone tz = VTimeZone.getDefault();
 TzId tzParam = new TzId(tz.getProperties().getProperty(Property.TZID)
         .getValue());
 christmas.getProperties().getProperty(Property.DTSTART).getParameters().add(
         tzParam);
 
Example 2 - Creating an event of one (1) hour duration:

 java.util.Calendar cal = java.util.Calendar.getInstance();
 // tomorrow..
 cal.add(java.util.Calendar.DAY_OF_MONTH, 1);
 cal.set(java.util.Calendar.HOUR_OF_DAY, 9);
 cal.set(java.util.Calendar.MINUTE, 30);
 
 VEvent meeting = new VEvent(cal.getTime(), 1000 * 60 * 60, "Progress Meeting");
 
 // add timezone information..
 VTimeZone tz = VTimeZone.getDefault();
 TzId tzParam = new TzId(tz.getProperties().getProperty(Property.TZID)
         .getValue());
 meeting.getProperties().getProperty(Property.DTSTART).getParameters().add(
         tzParam);
 
Example 3 - Retrieve a list of periods representing a recurring event in a specified range:

 Calendar weekday9AM = Calendar.getInstance();
 weekday9AM.set(2005, Calendar.MARCH, 7, 9, 0, 0);
 weekday9AM.set(Calendar.MILLISECOND, 0);
 
 Calendar weekday5PM = Calendar.getInstance();
 weekday5PM.set(2005, Calendar.MARCH, 7, 17, 0, 0);
 weekday5PM.set(Calendar.MILLISECOND, 0);
 
 // Do the recurrence until December 31st.
 Calendar untilCal = Calendar.getInstance();
 untilCal.set(2005, Calendar.DECEMBER, 31);
 untilCal.set(Calendar.MILLISECOND, 0);
 
 // 9:00AM to 5:00PM Rule
 Recur recur = new Recur(Recur.WEEKLY, untilCal.getTime());
 recur.getDayList().add(WeekDay.MO);
 recur.getDayList().add(WeekDay.TU);
 recur.getDayList().add(WeekDay.WE);
 recur.getDayList().add(WeekDay.TH);
 recur.getDayList().add(WeekDay.FR);
 recur.setInterval(3);
 recur.setWeekStartDay(WeekDay.MO.getDay());
 RRule rrule = new RRule(recur);
 
 Summary summary = new Summary("TEST EVENTS THAT HAPPEN 9-5 MON-FRI");
 
 weekdayNineToFiveEvents = new VEvent();
 weekdayNineToFiveEvents.getProperties().add(rrule);
 weekdayNineToFiveEvents.getProperties().add(summary);
 weekdayNineToFiveEvents.getProperties().add(new DtStart(weekday9AM.getTime()));
 weekdayNineToFiveEvents.getProperties().add(new DtEnd(weekday5PM.getTime()));
 
 // Test Start 04/01/2005, End One month later.
 // Query Calendar Start and End Dates.
 Calendar queryStartDate = Calendar.getInstance();
 queryStartDate.set(2005, Calendar.APRIL, 1, 14, 47, 0);
 queryStartDate.set(Calendar.MILLISECOND, 0);
 Calendar queryEndDate = Calendar.getInstance();
 queryEndDate.set(2005, Calendar.MAY, 1, 11, 15, 0);
 queryEndDate.set(Calendar.MILLISECOND, 0);
 
 // This range is monday to friday every three weeks, starting from
 // March 7th 2005, which means for our query dates we need
 // April 18th through to the 22nd.
 PeriodList periods = weekdayNineToFiveEvents.getPeriods(queryStartDate
         .getTime(), queryEndDate.getTime());
 

Author:
Ben Fortuna
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.fortuna.ical4j.model.Component
AVAILABLE, BEGIN, END, EXPERIMENTAL_PREFIX, VALARM, VAVAILABILITY, VEVENT, VFREEBUSY, VJOURNAL, VTIMEZONE, VTODO, VVENUE
 
Constructor Summary
VEvent()
          Default constructor.
VEvent(Date start, Date end, java.lang.String summary)
          Constructs a new VEVENT instance starting and ending at the specified times with the specified summary.
VEvent(Date start, Dur duration, java.lang.String summary)
          Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified summary.
VEvent(Date start, java.lang.String summary)
          Constructs a new VEVENT instance starting at the specified time with the specified summary.
VEvent(PropertyList properties)
          Constructor.
VEvent(PropertyList properties, ComponentList alarms)
          Constructor.
 
Method Summary
 Component copy()
          Overrides default copy method to add support for copying alarm sub-components.
 boolean equals(java.lang.Object arg0)
          Uses EqualsBuilder to test equality.
 ComponentList getAlarms()
          Returns the list of alarms for this event.
 Clazz getClassification()
           
 PeriodList getConsumedTime(Date rangeStart, Date rangeEnd)
          Returns a normalised list of periods representing the consumed time for this event.
 PeriodList getConsumedTime(Date rangeStart, Date rangeEnd, boolean normalise)
          Returns a list of periods representing the consumed time for this event in the specified range.
 Created getCreated()
           
 DtStamp getDateStamp()
           
 Description getDescription()
           
 Duration getDuration()
           
 DtEnd getEndDate()
          Returns the end date of this event.
 DtEnd getEndDate(boolean deriveFromDuration)
          Convenience method to pull the DTEND out of the property list.
 Geo getGeographicPos()
           
 LastModified getLastModified()
           
 Location getLocation()
           
 VEvent getOccurrence(Date date)
          Returns a single occurrence of a recurring event.
 Organizer getOrganizer()
           
 Priority getPriority()
           
 RecurrenceId getRecurrenceId()
           
 Sequence getSequence()
           
 DtStart getStartDate()
          Convenience method to pull the DTSTART out of the property list.
 Status getStatus()
           
 Summary getSummary()
           
 Transp getTransparency()
           
 Uid getUid()
          Returns the UID property of this component if available.
 Url getUrl()
           
 int hashCode()
          Uses HashCodeBuilder to build hashcode.
 java.lang.String toString()
           
 void validate(boolean recurse)
          Perform validation on a component.
 void validateAdd()
          Apply validation for METHOD=ADD.
 void validateCancel()
          Apply validation for METHOD=CANCEL.
 void validateCounter()
          Apply validation for METHOD=COUNTER.
 void validateDeclineCounter()
          Apply validation for METHOD=DECLINE-COUNTER.
 void validatePublish()
           Component/Property Presence ------------------- ---------------------------------------------- METHOD 1 MUST equal "PUBLISH" VEVENT 1+ DTSTAMP 1 DTSTART 1 ORGANIZER 1 SUMMARY 1 Can be null.
 void validateRefresh()
          Apply validation for METHOD=REFRESH.
 void validateReply()
          Apply validation for METHOD=REPLY.
 void validateRequest()
          Apply validation for METHOD=REQUEST.
 
Methods inherited from class net.fortuna.ical4j.model.Component
calculateRecurrenceSet, getName, getProperties, getProperties, getProperty, validate, validateProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VEvent

public VEvent()
Default constructor.


VEvent

public VEvent(PropertyList properties)
Constructor.

Parameters:
properties - a list of properties

VEvent

public VEvent(PropertyList properties,
              ComponentList alarms)
Constructor.

Parameters:
properties - a list of properties
alarms - a list of alarms

VEvent

public VEvent(Date start,
              java.lang.String summary)
Constructs a new VEVENT instance starting at the specified time with the specified summary.

Parameters:
start - the start date of the new event
summary - the event summary

VEvent

public VEvent(Date start,
              Date end,
              java.lang.String summary)
Constructs a new VEVENT instance starting and ending at the specified times with the specified summary.

Parameters:
start - the start date of the new event
end - the end date of the new event
summary - the event summary

VEvent

public VEvent(Date start,
              Dur duration,
              java.lang.String summary)
Constructs a new VEVENT instance starting at the specified times, for the specified duration, with the specified summary.

Parameters:
start - the start date of the new event
duration - the duration of the new event
summary - the event summary
Method Detail

getAlarms

public final ComponentList getAlarms()
Returns the list of alarms for this event.

Returns:
a component list

toString

public final java.lang.String toString()
Overrides:
toString in class Component
See Also:
Object.toString()

validate

public final void validate(boolean recurse)
                    throws ValidationException
Description copied from class: Component
Perform validation on a component.

Specified by:
validate in class Component
Parameters:
recurse - indicates whether to validate the component's properties
Throws:
ValidationException - where the component is not in a valid state
See Also:
Component.validate(boolean)

validatePublish

public void validatePublish()
                     throws ValidationException
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1       MUST equal "PUBLISH"
 VEVENT              1+
      DTSTAMP        1
      DTSTART        1
      ORGANIZER      1
      SUMMARY        1       Can be null.
      UID            1
      RECURRENCE-ID  0 or 1  only if referring to an instance of a
                             recurring calendar component.  Otherwise
                             it MUST NOT be present.
      SEQUENCE       0 or 1  MUST be present if value is greater than
                             0, MAY be present if 0
      ATTACH         0+
      CATEGORIES     0 or 1  This property may contain a list of
                             values
      CLASS          0 or 1
      COMMENT        0 or 1
      CONTACT        0+
      CREATED        0 or 1
      DESCRIPTION    0 or 1  Can be null
      DTEND          0 or 1  if present DURATION MUST NOT be present
      DURATION       0 or 1  if present DTEND MUST NOT be present
      EXDATE         0+
      EXRULE         0+
      GEO            0 or 1
      LAST-MODIFIED  0 or 1
      LOCATION       0 or 1
      PRIORITY       0 or 1
      RDATE          0+
      RELATED-TO     0+
      RESOURCES      0 or 1 This property MAY contain a list of values
      RRULE          0+
      STATUS         0 or 1 MAY be one of TENTATIVE/CONFIRMED/CANCELLED
      TRANSP         0 or 1
      URL            0 or 1
      X-PROPERTY     0+
 
      ATTENDEE       0
      REQUEST-STATUS 0
 
 VALARM              0+
 VFREEBUSY           0
 VJOURNAL            0
 VTODO               0
 VTIMEZONE           0+    MUST be present if any date/time refers to
                           a timezone
 X-COMPONENT         0+
 

Specified by:
validatePublish in class CalendarComponent
Throws:
ValidationException

validateRequest

public void validateRequest()
                     throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=REQUEST.

Specified by:
validateRequest in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 -----------------------------------------------------------------
 METHOD              1       MUST be "REQUEST"
 VEVENT              1+      All components MUST have the same UID
     ATTENDEE        1+
     DTSTAMP         1
     DTSTART         1
     ORGANIZER       1
     SEQUENCE        0 or 1  MUST be present if value is greater than 0,
                             MAY be present if 0
     SUMMARY         1       Can be null
     UID             1
     
     ATTACH          0+
     CATEGORIES      0 or 1  This property may contain a list of values
     CLASS           0 or 1
     COMMENT         0 or 1
     CONTACT         0+
     CREATED         0 or 1
     DESCRIPTION     0 or 1  Can be null
     DTEND           0 or 1  if present DURATION MUST NOT be present
     DURATION        0 or 1  if present DTEND MUST NOT be present
     EXDATE          0+
     EXRULE          0+
     GEO             0 or 1
     LAST-MODIFIED   0 or 1
     LOCATION        0 or 1
     PRIORITY        0 or 1
     RDATE           0+
     RECURRENCE-ID   0 or 1  only if referring to an instance of a
                             recurring calendar component.  Otherwise it
                             MUST NOT be present.
     RELATED-TO      0+
     REQUEST-STATUS  0+
     RESOURCES       0 or 1  This property MAY contain a list of values
     RRULE           0+
     STATUS          0 or 1  MAY be one of TENTATIVE/CONFIRMED
     TRANSP          0 or 1
     URL             0 or 1
     X-PROPERTY      0+
     
 VALARM              0+
 VTIMEZONE           0+      MUST be present if any date/time refers to
                             a timezone
 X-COMPONENT         0+
 VFREEBUSY           0
 VJOURNAL            0
 VTODO               0
 

validateReply

public void validateReply()
                   throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=REPLY.

Specified by:
validateReply in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1       MUST be "REPLY"
 VEVENT              1+      All components MUST have the same UID
     ATTENDEE        1       MUST be the address of the Attendee
                             replying.
     DTSTAMP         1
     ORGANIZER       1
     RECURRENCE-ID   0 or 1  only if referring to an instance of a
                             recurring calendar component.  Otherwise
                             it must NOT be present.
     UID             1       MUST be the UID of the original REQUEST
     
     SEQUENCE        0 or 1  MUST if non-zero, MUST be the sequence
                             number of the original REQUEST. MAY be
                             present if 0.
     
     ATTACH          0+
     CATEGORIES      0 or 1  This property may contain a list of values
     CLASS           0 or 1
     COMMENT         0 or 1
     CONTACT         0+
     CREATED         0 or 1
     DESCRIPTION     0 or 1
     DTEND           0 or 1  if present DURATION MUST NOT be present
     DTSTART         0 or 1
     DURATION        0 or 1  if present DTEND MUST NOT be present
     EXDATE          0+
     EXRULE          0+
     GEO             0 or 1
     LAST-MODIFIED   0 or 1
     LOCATION        0 or 1
     PRIORITY        0 or 1
     RDATE           0+
     RELATED-TO      0+
     RESOURCES       0 or 1  This property MAY contain a list of values
     REQUEST-STATUS  0+
     RRULE           0+
     STATUS          0 or 1
     SUMMARY         0 or 1
     TRANSP          0 or 1
     URL             0 or 1
     X-PROPERTY      0+
     
 VTIMEZONE           0 or 1 MUST be present if any date/time refers
                            to a timezone
 X-COMPONENT         0+
 
 VALARM              0
 VFREEBUSY           0
 VJOURNAL            0
 VTODO               0
 

validateAdd

public void validateAdd()
                 throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=ADD.

Specified by:
validateAdd in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1      MUST be "ADD"
 VEVENT              1
     DTSTAMP         1
     DTSTART         1
     ORGANIZER       1
     SEQUENCE        1      MUST be greater than 0
     SUMMARY         1      Can be null
     UID             1      MUST match that of the original event
 
     ATTACH          0+
     ATTENDEE        0+
     CATEGORIES      0 or 1 This property MAY contain a list of values
     CLASS           0 or 1
     COMMENT         0 or 1
     CONTACT         0+
     CREATED         0 or 1
     DESCRIPTION     0 or 1  Can be null
     DTEND           0 or 1  if present DURATION MUST NOT be present
     DURATION        0 or 1  if present DTEND MUST NOT be present
     EXDATE          0+
     EXRULE          0+
     GEO             0 or 1
     LAST-MODIFIED   0 or 1
     LOCATION        0 or 1
     PRIORITY        0 or 1
     RDATE           0+
     RELATED-TO      0+
     RESOURCES       0 or 1  This property MAY contain a list of values
     RRULE           0+
     STATUS          0 or 1  MAY be one of TENTATIVE/CONFIRMED
     TRANSP          0 or 1
     URL             0 or 1
     X-PROPERTY      0+
 
     RECURRENCE-ID   0
     REQUEST-STATUS  0
 
 VALARM              0+
 VTIMEZONE           0+     MUST be present if any date/time refers to
                            a timezone
 X-COMPONENT         0+
 
 VFREEBUSY           0
 VTODO               0
 VJOURNAL            0
 

validateCancel

public void validateCancel()
                    throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=CANCEL.

Specified by:
validateCancel in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1      MUST be "CANCEL"
 
 VEVENT              1+     All must have the same UID
     ATTENDEE        0+     MUST include all "Attendees" being removed
                            the event. MUST include all "Attendees" if
                            the entire event is cancelled.
     DTSTAMP         1
     ORGANIZER       1
     SEQUENCE        1
     UID             1       MUST be the UID of the original REQUEST
 
     COMMENT         0 or 1
     ATTACH          0+
     CATEGORIES      0 or 1  This property may contain a list of values
     CLASS           0 or 1
     CONTACT         0+
     CREATED         0 or 1
     DESCRIPTION     0 or 1
     DTEND           0 or 1 if present DURATION MUST NOT be present
     DTSTART         0 or 1
     DURATION        0 or 1 if present DTEND MUST NOT be present
     EXDATE          0+
     EXRULE          0+
     GEO             0 or 1
     LAST-MODIFIED   0 or 1
     LOCATION        0 or 1
     PRIORITY        0 or 1
     RDATE           0+
     RECURRENCE-ID   0 or 1  MUST be present if referring to one or
                             more or more recurring instances.
                             Otherwise it MUST NOT be present
     RELATED-TO      0+
     RESOURCES       0 or 1
     RRULE           0+
     STATUS          0 or 1  MUST be set to CANCELLED. If uninviting
                             specific "Attendees" then MUST NOT be
                             included.
     SUMMARY         0 or 1
     TRANSP          0 or 1
     URL             0 or 1
     X-PROPERTY      0+
     REQUEST-STATUS  0
 
 VTIMEZONE           0+     MUST be present if any date/time refers to
                            a timezone
 X-COMPONENT         0+
 
 VTODO               0
 VJOURNAL            0
 VFREEBUSY           0
 VALARM              0
 

validateRefresh

public void validateRefresh()
                     throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=REFRESH.

Specified by:
validateRefresh in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1      MUST be "REFRESH"
 
 VEVENT              1
     ATTENDEE        1      MUST be the address of requestor
     DTSTAMP         1
     ORGANIZER       1
     UID             1      MUST be the UID associated with original
                            REQUEST
     COMMENT         0 or 1
     RECURRENCE-ID   0 or 1 MUST only if referring to an instance of a
                            recurring calendar component.  Otherwise
                            it must NOT be present.
     X-PROPERTY      0+
 
     ATTACH          0
     CATEGORIES      0
     CLASS           0
     CONTACT         0
     CREATED         0
     DESCRIPTION     0
     DTEND           0
     DTSTART         0
     DURATION        0
     EXDATE          0
     EXRULE          0
     GEO             0
     LAST-MODIFIED   0
     LOCATION        0
     PRIORITY        0
     RDATE           0
     RELATED-TO      0
     REQUEST-STATUS  0
     RESOURCES       0
     RRULE           0
     SEQUENCE        0
     STATUS          0
     SUMMARY         0
     TRANSP          0
     URL             0
 
 X-COMPONENT         0+
 
 VTODO               0
 VJOURNAL            0
 VFREEBUSY           0
 VTIMEZONE           0
 VALARM              0
 

validateCounter

public void validateCounter()
                     throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=COUNTER.

Specified by:
validateCounter in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1      MUST be "COUNTER"
 
 VEVENT              1
     DTSTAMP         1
     DTSTART         1
     ORGANIZER       1       MUST be the "Organizer" of the original
                             event
     SEQUENCE        1       MUST be present if value is greater than 0,
                             MAY be present if 0
     SUMMARY         1       Can be null
     UID             1       MUST be the UID associated with the REQUEST
                             being countered
 
     ATTACH          0+
     ATTENDEE        0+      Can also  be used to propose other
                             "Attendees"
     CATEGORIES      0 or 1  This property may contain a list of values
     CLASS           0 or 1
     COMMENT         0 or 1
     CONTACT         0+
     CREATED         0 or 1
     DESCRIPTION     0 or 1
     DTEND           0 or 1  if present DURATION MUST NOT be present
     DURATION        0 or 1  if present DTEND MUST NOT be present
     EXDATE          0+
     EXRULE          0+
     GEO             0 or 1
     LAST-MODIFIED   0 or 1
     LOCATION        0 or 1
     PRIORITY        0 or 1
     RDATE           0+
     RECURRENCE-ID   0 or 1  MUST only if referring to an instance of a
                             recurring calendar component.  Otherwise it
                             MUST NOT be present.
     RELATED-TO      0+
     REQUEST-STATUS  0+
     RESOURCES       0 or 1  This property may contain a list of values
     RRULE           0+
     STATUS          0 or 1  Value must be one of CONFIRMED/TENATIVE/
                             CANCELLED
     TRANSP          0 or 1
     URL             0 or 1
     X-PROPERTY      0+
 
 VALARM              0+
 VTIMEZONE           0+      MUST be present if any date/time refers to
                             a timezone
 X-COMPONENT         0+
 
 VTODO               0
 VJOURNAL            0
 VFREEBUSY           0
 

validateDeclineCounter

public void validateDeclineCounter()
                            throws ValidationException
Description copied from class: CalendarComponent
Apply validation for METHOD=DECLINE-COUNTER.

Specified by:
validateDeclineCounter in class CalendarComponent
Throws:
ValidationException -
 Component/Property  Presence
 ------------------- ----------------------------------------------
 METHOD              1      MUST be "DECLINECOUNTER"
 
 VEVENT              1
     DTSTAMP         1
     ORGANIZER       1
     UID             1       MUST, same UID specified in original
                             REQUEST and subsequent COUNTER
     COMMENT         0 or 1
     RECURRENCE-ID   0 or 1  MUST only if referring to an instance of a
                             recurring calendar component.  Otherwise it
                             MUST NOT be present.
     REQUEST-STATUS  0+
     SEQUENCE        0 OR 1  MUST be present if value is greater than 0,
                             MAY be present if 0
     X-PROPERTY      0+
     ATTACH          0
     ATTENDEE        0
     CATEGORIES      0
     CLASS           0
     CONTACT         0
     CREATED         0
     DESCRIPTION     0
     DTEND           0
     DTSTART         0
     DURATION        0
     EXDATE          0
     EXRULE          0
     GEO             0
     LAST-MODIFIED   0
     LOCATION        0
     PRIORITY        0
     RDATE           0
     RELATED-TO      0
     RESOURCES       0
     RRULE           0
     STATUS          0
     SUMMARY         0
     TRANSP          0
     URL             0
 
 X-COMPONENT         0+
 VTODO               0
 VJOURNAL            0
 VFREEBUSY           0
 VTIMEZONE           0
 VALARM              0
 

getConsumedTime

public final PeriodList getConsumedTime(Date rangeStart,
                                        Date rangeEnd)
Returns a normalised list of periods representing the consumed time for this event.

Parameters:
rangeStart -
rangeEnd -
Returns:
a normalised list of periods representing consumed time for this event
See Also:
getConsumedTime(Date, Date, boolean)

getConsumedTime

public final PeriodList getConsumedTime(Date rangeStart,
                                        Date rangeEnd,
                                        boolean normalise)
Returns a list of periods representing the consumed time for this event in the specified range. Note that the returned list may contain a single period for non-recurring components or multiple periods for recurring components. If no time is consumed by this event an empty list is returned.

Parameters:
rangeStart - the start of the range to check for consumed time
rangeEnd - the end of the range to check for consumed time
normalise - indicate whether the returned list of periods should be normalised
Returns:
a list of periods representing consumed time for this event

getOccurrence

public final VEvent getOccurrence(Date date)
                           throws java.io.IOException,
                                  java.net.URISyntaxException,
                                  java.text.ParseException
Returns a single occurrence of a recurring event.

Parameters:
date -
Returns:
Throws:
java.io.IOException
java.net.URISyntaxException
java.text.ParseException

getClassification

public final Clazz getClassification()
Returns:
the optional access classification property for an event

getCreated

public final Created getCreated()
Returns:
the optional creation-time property for an event

getDescription

public final Description getDescription()
Returns:
the optional description property for an event

getStartDate

public final DtStart getStartDate()
Convenience method to pull the DTSTART out of the property list.

Returns:
The DtStart object representation of the start Date

getGeographicPos

public final Geo getGeographicPos()
Returns:
the optional geographic position property for an event

getLastModified

public final LastModified getLastModified()
Returns:
the optional last-modified property for an event

getLocation

public final Location getLocation()
Returns:
the optional location property for an event

getOrganizer

public final Organizer getOrganizer()
Returns:
the optional organizer property for an event

getPriority

public final Priority getPriority()
Returns:
the optional priority property for an event

getDateStamp

public final DtStamp getDateStamp()
Returns:
the optional date-stamp property

getSequence

public final Sequence getSequence()
Returns:
the optional sequence number property for an event

getStatus

public final Status getStatus()
Returns:
the optional status property for an event

getSummary

public final Summary getSummary()
Returns:
the optional summary property for an event

getTransparency

public final Transp getTransparency()
Returns:
the optional time transparency property for an event

getUrl

public final Url getUrl()
Returns:
the optional URL property for an event

getRecurrenceId

public final RecurrenceId getRecurrenceId()
Returns:
the optional recurrence identifier property for an event

getEndDate

public final DtEnd getEndDate()
Returns the end date of this event. Where an end date is not available it will be derived from the event duration.

Returns:
a DtEnd instance, or null if one cannot be derived

getEndDate

public final DtEnd getEndDate(boolean deriveFromDuration)
Convenience method to pull the DTEND out of the property list. If DTEND was not specified, use the DTSTART + DURATION to calculate it.

Parameters:
deriveFromDuration - specifies whether to derive an end date from the event duration where an end date is not found
Returns:
The end for this VEVENT.

getDuration

public final Duration getDuration()
Returns:
the optional Duration property

getUid

public final Uid getUid()
Returns the UID property of this component if available.

Returns:
a Uid instance, or null if no UID property exists

equals

public boolean equals(java.lang.Object arg0)
Description copied from class: Component
Uses EqualsBuilder to test equality. Two components are equal if and only if their name and property lists are equal.

Overrides:
equals in class Component

hashCode

public int hashCode()
Description copied from class: Component
Uses HashCodeBuilder to build hashcode.

Overrides:
hashCode in class Component

copy

public Component copy()
               throws java.text.ParseException,
                      java.io.IOException,
                      java.net.URISyntaxException
Overrides default copy method to add support for copying alarm sub-components.

Overrides:
copy in class Component
Returns:
the component copy
Throws:
java.text.ParseException
java.io.IOException
java.net.URISyntaxException
See Also:
Component.copy()


Copyright © 2004-2009 Modularity. All Rights Reserved.