tauZaman
v0.1

tauzaman.calendar
Class CalendarRepository

java.lang.Object
  |
  +--tauzaman.calendar.CalendarRepository

public class CalendarRepository
extends java.lang.Object

CalendarRepository class manages a collection of Calendar(s). For example:

    CalendarRepository cr = new CalendarRepository();
    cr.loadCalendar(new URL("http://www.eecs.wsu.edu/greg.xml"));
 

See Also:
Calendar
Status:
design complete, implementation complete

Constructor Summary
CalendarRepository()
          Constructs a CalendarRepository object.
 
Method Summary
 Calendar loadCalendar(java.net.URL url)
          Loads a Calendar into this CalendarRepository.
 java.lang.String toString()
          Returns all URLs in this CalendarRepository<>.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalendarRepository

public CalendarRepository()
Constructs a CalendarRepository object. It also forms a Hashtable, in which keys are URLs and values are Calendar objects.

Method Detail

loadCalendar

public Calendar loadCalendar(java.net.URL url)
                      throws CalendarFormationException

Loads a Calendar into this CalendarRepository. If Calendar with given URL does not exist in this CalendarRepository then URL will chased and Calendar that it points will be loaded and a handle to loaded Calendar will be returned.

Otherwise, if Calendar with given URL exists in this CalendarRepository then a a handle to existing Calendar will be returned.

That's, keep silent.

Parameters:
url - Url of Calendar specification file.
Returns:
a handle to loaded Calendar
Throws:
CalendarFormationException - if there is any problem with parsing the file that given URL points

toString

public java.lang.String toString()
Returns all URLs in this CalendarRepository<>.

Overrides:
toString in class java.lang.Object
Returns:
String representation of urls tokenized with a blankspace

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project