edu.cmu.andrew.icalendar
Interface Event

All Known Implementing Classes:
AbstractEvent, VEvent

public interface Event

Any class exporting this interface represents a single event. This is a VEVENT object as described by RFC 2445.

Author:
leg

Method Summary
 Date getCreated()
          Returns the creation date/time of this event.
 String getDescription()
          The detailed description of this event.
 Date getEnddate()
          Returns the ending date of this event.
 String getEventClass()
          One of "PUBLIC", "PRIVATE", or "CONFIDENTIAL".
 CharacterIterator getIndexable()
          What data should be indexed from this event?
 String getLocation()
          The location of this event.
 String getOwningAgenda()
          All events stored in the event store have an "owning agenda".
 int getPriority()
          the priority of the event, if any, from 1 to 9, with 1 the highest priority.
 String getSecondaryValue(String property)
          All other event properties are considered "secondary": they do not influence the scheduling of meetings relative to each other.
 int getSeq()
          The sequence number of an event is incremented every time the event is modified in a substantial fashion.
 Date getStartdate()
          The date that this event starts on.
 EventStatus getStatus()
          The status of the event.
 String getSummary()
          The summary ("title") of this event.
 boolean getTransp()
          Whether or not this event is transparent to other events.
 String getUid()
          The unique ID of an event is a globally unique identification that is invariant across the life of this event, regardless of invitations/removals/cancellations.
 boolean hasEndtime()
          The equivalent to hasStarttime.
 boolean hasStarttime()
          Returns true if the startdate has a time component.
 Writer outputICalendar(Writer w)
          Write the iCalendar representation to w.
 

Method Detail

getUid

public String getUid()
The unique ID of an event is a globally unique identification that is invariant across the life of this event, regardless of invitations/removals/cancellations.
Returns:
the unique id, non-null

getSeq

public int getSeq()
The sequence number of an event is incremented every time the event is modified in a substantial fashion. See RFC 2445. (In event calendar terms, any change is likely to increase the SEQ.) It starts at 0 and is strictly ascending.
Returns:
the current sequence number

getStartdate

public Date getStartdate()
The date that this event starts on. The time is only significant if hasStarttime returns tRUe.
Returns:
the starting time of this event, non-null

hasStarttime

public boolean hasStarttime()
Returns true if the startdate has a time component. If it is a day event, this returns false; otherwise it returns true. If this returns false, then getStartdate() is accurate only to the nearest day.
Returns:
true if there is a specific starting time for this event, false otherwise

getEnddate

public Date getEnddate()
Returns the ending date of this event. The time is only significant if hasEndtime returns true.
Returns:
the ending time of this event

hasEndtime

public boolean hasEndtime()
The equivalent to hasStarttime.
Returns:
true if there is a specific ending time for this event, false otherwise

getCreated

public Date getCreated()
Returns the creation date/time of this event.
Returns:
the creation time of this event, non-null

getEventClass

public String getEventClass()
One of "PUBLIC", "PRIVATE", or "CONFIDENTIAL". It defaults to "PUBLIC".
Returns:
the class of this event, always non-null.

getPriority

public int getPriority()
the priority of the event, if any, from 1 to 9, with 1 the highest priority. a 0 priority is "undefined".
Returns:
the priority, or 0 if undefined

getStatus

public EventStatus getStatus()
The status of the event. The default value is EventStatus.CONFIRMED.
Returns:
the EventStatus, non-null.

getTransp

public boolean getTransp()
Whether or not this event is transparent to other events.
Returns:
the transparency; false by default

getSummary

public String getSummary()
The summary ("title") of this event.
Returns:
the summary

getDescription

public String getDescription()
The detailed description of this event.
Returns:
the description, non-null

getLocation

public String getLocation()
The location of this event.
Returns:
the location, non-null

getSecondaryValue

public String getSecondaryValue(String property)
All other event properties are considered "secondary": they do not influence the scheduling of meetings relative to each other. (In the current uses of this library most of the other properties have no influence, either.) Local properties should start with "CMU-".
Parameters:
property - the name of the property
Returns:
the value of that property as a string

getOwningAgenda

public String getOwningAgenda()
All events stored in the event store have an "owning agenda". This returns the hierarchical identifier of that owning agenda, if any. Events not in the calendar store should return the empty string for this.
Returns:
the owning agenda, if any

getIndexable

public CharacterIterator getIndexable()
What data should be indexed from this event?
Returns:
characters from the fields that should be indexed

outputICalendar

public Writer outputICalendar(Writer w)
                       throws IOException
Write the iCalendar representation to w. It invokes the output method of each subcomponent and each property of this object. Outputs only a VEVENT component.
Parameters:
w - the writer to send output to
Returns:
the writer w
Throws:
IOException - when w does so