tit.configuration.ConfigurationFile Class Reference

Inheritance diagram for tit.configuration.ConfigurationFile:

tit.configuration.ConfigurationRecord tit.configuration.Configuration List of all members.

Public Member Functions

void setSummaryIntervals (FromUntilPair[] newpairs)
void setBehaviourCodes (BehaviourCodes newcodes)
void setObservationDuration (long newduration)
void setDateFormat (SimpleDateFormat newdateformat)
void setTimeFormat (SimpleDateFormat newtimeformat)
void setDateTimeFormat (SimpleDateFormat newdatetimeformat)
void setEndOfObservationSound (String newsound)
void setEndOfObservationSoundOffset (int newsoundoffset)
void setAutosaveDirectory (String newautosavedirectory)
void setAutosaveObservation (boolean newautosaveobservation)
void setDefaultFlyTime (long newdefaultflytime)
void setCSVSeparator (char newcsvseparator)
void setCSVQuotation (char newcsvquotation)
void setSplashScreen (String newsplashscreen)
void setPDFReader (String newpdfreader)

Static Public Member Functions

static final void loadConfigurationFile (File fileinit, boolean writeatonceinit) throws IOException
static final void loadConfigurationFile (File fileinit) throws IOException

Protected Member Functions

 ConfigurationFile (File fileinit, boolean writeatonceinit) throws IOException
void saveConfiguration (boolean force)
final void saveConfiguration ()
 ConfigurationFile (File fileinit) throws IOException
void finalize ()

Private Attributes

File configurationfile
boolean writeatonce
boolean dirty

Static Private Attributes

static final String VALUE_SEPERATOR = "="
static final String COMMENT_SEPERATOR = "#"

Detailed Description

A Configuration which is read from file.
Author:
Bart Sas


Constructor & Destructor Documentation

tit.configuration.ConfigurationFile.ConfigurationFile ( File  fileinit,
boolean  writeatonceinit 
) throws IOException [protected]

Create a new ConfigurationFile.

Parameters:
fileinit The configuration file.
writeatonceinit Wen the configuration is changed: write it at once or wait until the finalize method is called?
Exceptions:
IOException Is thrown when an io-error occurs.

tit.configuration.ConfigurationFile.ConfigurationFile ( File  fileinit  )  throws IOException [protected]

Create a new ConfigurationFile.

Parameters:
fileinit The configuration file.
Exceptions:
IOException Is thrown when an io-error occurs.


Member Function Documentation

static final void tit.configuration.ConfigurationFile.loadConfigurationFile ( File  fileinit,
boolean  writeatonceinit 
) throws IOException [static]

Loads a configuration file, and sets it as the current configuration.

Parameters:
fileinit The configuration file.
writeatonceinit Wen the configuration is changed: write it at once or wait until the finalize method is called?
Exceptions:
IOException Is thrown when an io-error occurs.

static final void tit.configuration.ConfigurationFile.loadConfigurationFile ( File  fileinit  )  throws IOException [static]

Loads a configuration file, and sets it as the current configuration.

Parameters:
fileinit The configuration file.
Exceptions:
IOException Is thrown when an io-error occurs.

void tit.configuration.ConfigurationFile.saveConfiguration ( boolean  force  )  [protected]

Writes this configuration to disk.

Parameters:
force Force a write, if the data isn't dirty it normally isn't written to file, if force is true it is written.

final void tit.configuration.ConfigurationFile.saveConfiguration (  )  [protected]

Writes this configuration to disk.

void tit.configuration.ConfigurationFile.setSummaryIntervals ( FromUntilPair[]  newpairs  ) 

Sets the intervals of a observation that must be summarized.

Parameters:
newpairs The new value.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setBehaviourCodes ( BehaviourCodes  newcodes  ) 

Sets the used behaviour codes.

Parameters:
newcodes The new value.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setObservationDuration ( long  newduration  ) 

Sets the duration of an observation.

Parameters:
newduration The new value.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setDateFormat ( SimpleDateFormat  newdateformat  ) 

Sets the date foramt.

Parameters:
newdateformat The date format.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setTimeFormat ( SimpleDateFormat  newtimeformat  ) 

Sets the date foramt.

Parameters:
newtimeformat The date format.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setDateTimeFormat ( SimpleDateFormat  newdatetimeformat  ) 

Sets the date-time foramt.

Parameters:
newdatetimeformat The date-time format.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setEndOfObservationSound ( String  newsound  ) 

Sets the new sound which is played at the end of an observation, this operation may have no effect.

Parameters:
newsound The new sound which is played at the end of an observation.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setEndOfObservationSoundOffset ( int  newsoundoffset  ) 

Sets the new sound which is played at the end of an observation's ofset, this operation may have no effect.

Parameters:
newsoundoffset The new sound which is played at the end of an observation's ofset.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setAutosaveDirectory ( String  newautosavedirectory  ) 

Sets the new autosave directory, this operation may have no effect.

Parameters:
newautosavedirectory The new autosave directory.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setAutosaveObservation ( boolean  newautosaveobservation  ) 

Sets the autosave-flag.

Parameters:
newautosaveobservation The new autosave-flag.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setDefaultFlyTime ( long  newdefaultflytime  ) 

Sets the defulat fly time.

Parameters:
newdefaultflytime The new default fly time.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setCSVSeparator ( char  newcsvseparator  ) 

Sets the csv separator.

Parameters:
newcsvseparator The new csv separator.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setCSVQuotation ( char  newcsvquotation  ) 

Sets the csv quotation.

Parameters:
newcsvquotation The new csv quotation.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setSplashScreen ( String  newsplashscreen  ) 

Sets the splash screen.

Parameters:
newsplashscreen The new splash screen.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.setPDFReader ( String  newpdfreader  ) 

Sets the pdf-reader.

Parameters:
newpdfreader The new pdf-reader.

Reimplemented from tit.configuration.ConfigurationRecord.

void tit.configuration.ConfigurationFile.finalize (  )  [protected]

Saves this configuration file.


Member Data Documentation

final String tit.configuration.ConfigurationFile.VALUE_SEPERATOR = "=" [static, private]

The value seperator.

final String tit.configuration.ConfigurationFile.COMMENT_SEPERATOR = "#" [static, private]

The comment seperator.

File tit.configuration.ConfigurationFile.configurationfile [private]

The configuration file.

boolean tit.configuration.ConfigurationFile.writeatonce [private]

Wen the configuration is changed write it at once or wait until the finalize method is called?

boolean tit.configuration.ConfigurationFile.dirty [private]

Determines whether this is diry (changes haven't been saved yet) or not.


The documentation for this class was generated from the following file:
Generated on Sun Jun 3 16:44:00 2007 by  doxygen 1.5.1