Class CalToDb

java.lang.Object
  extended by CalToDb

public class CalToDb
extends java.lang.Object

This class "converts" an existing vCalendar file (*.ics) to a LinkedList. The list is then being used to make an IclDb with the events and todos and so forth, as IclStructs.


Constructor Summary
CalToDb(java.lang.String fileName)
          Simple constructor.
 
Method Summary
 com.sri.oaa2.icl.IclDb getDb()
          Method for getting the IclDb that is made from an existing *.ics file.
 java.util.LinkedList getLines(java.io.File file)
          Method for getting a LinkedList from an *.ics file.
 boolean isBuilt()
          This method returns whether a Db could be built from a calendar file or not.
 com.sri.oaa2.icl.IclDb toStruct(java.util.LinkedList list)
          Method for making an IclDb from a LinkedList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalToDb

public CalToDb(java.lang.String fileName)
Simple constructor.

Parameters:
fileName - the name of an *.ics file
Method Detail

getDb

public com.sri.oaa2.icl.IclDb getDb()
Method for getting the IclDb that is made from an existing *.ics file.

Returns:
the newly made IclDb

getLines

public java.util.LinkedList getLines(java.io.File file)
Method for getting a LinkedList from an *.ics file. Every new tag is starting a new line. Whitespaces are removed.

Parameters:
file - the *.ics file to be handled
Returns:
a LinkedList with no whitespaces

toStruct

public com.sri.oaa2.icl.IclDb toStruct(java.util.LinkedList list)
Method for making an IclDb from a LinkedList. Events and todos and so forth, become IclStructs in the IclDb.

Parameters:
list - the LinkedList to convert
Returns:
returns the IclDb made from the LinkedList

isBuilt

public boolean isBuilt()
This method returns whether a Db could be built from a calendar file or not. Mostly used to handle cases of non-existent calendar files.

Returns:
returns true if the Db is built successfully from a file, false if not.