edu.cmu.andrew.icalendar.components
Class VEvent

java.lang.Object
  |
  +--edu.cmu.andrew.icalendar.Component
        |
        +--edu.cmu.andrew.icalendar.components.VEvent
All Implemented Interfaces:
Event

public class VEvent
extends Component
implements Event

A single ICalendar object from BEGIN:VEVENT to END:VEVENT


Field Summary
(package private)  String uid
           
 
Fields inherited from class edu.cmu.andrew.icalendar.Component
properties, subComponents
 
Constructor Summary
VEvent(Map properties, List subComponents)
           
 
Method Summary
private  void checkInvariant()
           
 Date getCreated()
          standard accessor
 String getDescription()
          standard accessor
 Date getEnddate()
          standard accessor
 String getEventClass()
          standard accessor
 CharacterIterator getIndexable()
          What data should be indexed from this event?
 String getLocation()
          standard accessor
 String getName()
          Return the name of this Component.
 String getOwningAgenda()
          All events stored in the event store have an "owning agenda".
 int getPriority()
          standard accessor
 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()
          standard accessor
 Date getStartdate()
          standard accessor
 EventStatus getStatus()
          standard accessor
 String getSummary()
          standard accessor
private  Date getthedate(String name, Date def)
           
private  int gettheinteger(String name, int def)
           
private  String getthestring(String name, String def)
           
 boolean getTransp()
          standard accessor
 String getUid()
          standard accessor
 boolean hasEndtime()
          The equivalent to hasStarttime.
 boolean hasStarttime()
          Returns true if the startdate has a time component.
 
Methods inherited from class edu.cmu.andrew.icalendar.Component
getComponents, getInstance, getProperty, getPropertyMap, getSingleDate, getSingleDuration, getSingleInteger, getSingleString, outputICalendar, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface edu.cmu.andrew.icalendar.Event
outputICalendar
 

Field Detail

uid

String uid
Constructor Detail

VEvent

public VEvent(Map properties,
              List subComponents)
       throws BadComponentException
Method Detail

getName

public String getName()
Description copied from class: Component
Return the name of this Component.
Overrides:
getName in class Component

getUid

public String getUid()
standard accessor
Specified by:
getUid in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the unique id, non-null

getthestring

private String getthestring(String name,
                            String def)

gettheinteger

private int gettheinteger(String name,
                          int def)

getthedate

private Date getthedate(String name,
                        Date def)

getSeq

public int getSeq()
standard accessor
Specified by:
getSeq in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the current sequence number

getStartdate

public Date getStartdate()
standard accessor
Specified by:
getStartdate in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the starting time of this event, non-null

hasStarttime

public boolean hasStarttime()
Description copied from interface: Event
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.
Specified by:
hasStarttime in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
true if there is a specific starting time for this event, false otherwise

getCreated

public Date getCreated()
standard accessor
Specified by:
getCreated in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the creation time of this event, non-null

getEnddate

public Date getEnddate()
standard accessor
Specified by:
getEnddate in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the ending time of this event

hasEndtime

public boolean hasEndtime()
Description copied from interface: Event
The equivalent to hasStarttime.
Specified by:
hasEndtime in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
true if there is a specific ending time for this event, false otherwise

getEventClass

public String getEventClass()
standard accessor
Specified by:
getEventClass in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the class of this event, always non-null.

getDescription

public String getDescription()
standard accessor
Specified by:
getDescription in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the description, non-null

getPriority

public int getPriority()
standard accessor
Specified by:
getPriority in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the priority, or 0 if undefined

getStatus

public EventStatus getStatus()
standard accessor
Specified by:
getStatus in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the EventStatus, non-null.

getSummary

public String getSummary()
standard accessor
Specified by:
getSummary in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the summary

getTransp

public boolean getTransp()
standard accessor
Specified by:
getTransp in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the transparency; false by default

getLocation

public String getLocation()
standard accessor
Specified by:
getLocation in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the location, non-null

getOwningAgenda

public String getOwningAgenda()
Description copied from interface: Event
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.
Specified by:
getOwningAgenda in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
the owning agenda, if any

getSecondaryValue

public String getSecondaryValue(String property)
Description copied from interface: Event
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-".
Specified by:
getSecondaryValue in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Parameters:
property - the name of the property
Returns:
the value of that property as a string

getIndexable

public CharacterIterator getIndexable()
Description copied from interface: Event
What data should be indexed from this event?
Specified by:
getIndexable in interface Event
Following copied from interface: edu.cmu.andrew.icalendar.Event
Returns:
characters from the fields that should be indexed

checkInvariant

private void checkInvariant()
                     throws BadComponentException