edu.cmu.andrew.icalendar
Class AbstractAgenda

java.lang.Object
  |
  +--edu.cmu.andrew.icalendar.AbstractAgenda
All Implemented Interfaces:
Agenda

public abstract class AbstractAgenda
extends Object
implements Agenda

Skeleton agenda class that implements the more obvious methods in terms of the harder methods.

Author:
Larry

Field Summary
private static String crlf
           
 
Constructor Summary
AbstractAgenda()
           
 
Method Summary
abstract  Date getCreated()
          Return the time when this agenda was created.
abstract  List getEvents()
          Returns the set of events referred to by this agenda.
abstract  List getEventsByDate(Date startdate, Date enddate)
          Returns the set of events referred to by this agenda, narrowed by the specified date range.
private  void outputAgendaMetadata(Writer w)
           
 Writer outputEmptyAgenda(Writer w)
          Outputs an iCalendar object to the specified writer.
 Writer outputICalendar(Writer w)
          Outputs an iCalendar object to the specified writer.
 Writer outputICalendar(Writer w, Date startdate, Date enddate)
          Outputs an iCalendar object to the specified writer.
 String 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.Agenda
getCalid, getCN, getType
 

Field Detail

crlf

private static String crlf
Constructor Detail

AbstractAgenda

public AbstractAgenda()
Method Detail

getEvents

public abstract List getEvents()
Description copied from interface: Agenda
Returns the set of events referred to by this agenda.
Specified by:
getEvents in interface Agenda

getEventsByDate

public abstract List getEventsByDate(Date startdate,
                                     Date enddate)
Description copied from interface: Agenda
Returns the set of events referred to by this agenda, narrowed by the specified date range.
Specified by:
getEventsByDate in interface Agenda

getCreated

public abstract Date getCreated()
Description copied from interface: Agenda
Return the time when this agenda was created.
Specified by:
getCreated in interface Agenda

outputEmptyAgenda

public Writer outputEmptyAgenda(Writer w)
                         throws IOException
Description copied from interface: Agenda
Outputs an iCalendar object to the specified writer. This contains no events.
Specified by:
outputEmptyAgenda in interface Agenda
Following copied from interface: edu.cmu.andrew.icalendar.Agenda
Parameters:
w - where the output should go
Returns:
the writer after output

outputICalendar

public Writer outputICalendar(Writer w,
                              Date startdate,
                              Date enddate)
                       throws IOException
Description copied from interface: Agenda
Outputs an iCalendar object to the specified writer. This outputs an ICalendar object containing the requested date subset of this agenda.
Specified by:
outputICalendar in interface Agenda
Following copied from interface: edu.cmu.andrew.icalendar.Agenda
Parameters:
w - where output should go
start - when to start
end - when to end

outputAgendaMetadata

private void outputAgendaMetadata(Writer w)
                           throws IOException

outputICalendar

public Writer outputICalendar(Writer w)
                       throws IOException
Description copied from interface: Agenda
Outputs an iCalendar object to the specified writer. This outputs an ICalendar object containing all of the events in the agenda.
Specified by:
outputICalendar in interface Agenda
Following copied from interface: edu.cmu.andrew.icalendar.Agenda
Parameters:
writer - where to output the ICalendar object
Returns:
the writer after output

toString

public String toString()
Overrides:
toString in class Object