nl.lxtreme.ols.api.data.project
Interface Project


public interface Project

Denotes a project, which contains the settings of the entire client, along with the last captured data.


Method Summary
 DataSet getDataSet()
          Returns the current data set for this project.
 File getFilename()
          Returns the path to the project file.
 Date getLastModified()
          Returns the date on which the project is last saved.
 String getName()
          Returns the name of this project.
 UserSettings getSettings(String aName)
          Returns the other user settings, like UI-settings, and such.
 String getSourceVersion()
          Returns the version of the OLS-client that created this project.
 boolean isChanged()
          Returns whether the contents of this project is changed or not.
 void readData(Reader aReader)
          Allows data to be read from a given reader, any current data in this project will be overwritten!
 void setCapturedData(AcquisitionResult aData)
          Sets the captured data of this project.
 void setChanged(boolean aChanged)
          Marks this project as "changed".
 void setFilename(File aFilename)
          Sets the filename of this project.
 void setLastModified(Date aLastModified)
          Sets the last modified date of this project.
 void setName(String aName)
          Sets the name of this project.
 void setSettings(UserSettings aSettings)
          Sets the user settings.
 void setSourceVersion(String aSourceVersion)
          Sets the version of the OLS-client that saved this project.
 void visit(ProjectVisitor aVisitor)
          Allows external callers to traverse the project structure without having to know the exact implementation details of a project.
 void writeData(Writer aWriter)
          Allows the current data to be written to a given writer.
 

Method Detail

getDataSet

DataSet getDataSet()
Returns the current data set for this project.

Returns:
a data set, can be null if there is no data yet.

getFilename

File getFilename()
Returns the path to the project file.

Returns:
a file object denoting the filename of this project, can be null in case this project is not yet saved.

getLastModified

Date getLastModified()
Returns the date on which the project is last saved.

Returns:
the last modified date of this project, can be null if this project is not yet saved.

getName

String getName()
Returns the name of this project.

Returns:
the name of this project, or null if no name is yet given.

getSettings

UserSettings getSettings(String aName)
Returns the other user settings, like UI-settings, and such.

Parameters:
aName - the name of the user settings to retrieve, cannot be null.
Returns:
a user settings object, never null.

getSourceVersion

String getSourceVersion()
Returns the version of the OLS-client that created this project.

Returns:
a source version string, such as "0.9.2".

isChanged

boolean isChanged()
Returns whether the contents of this project is changed or not.

Returns:
true if this project is changed, false otherwise.

readData

void readData(Reader aReader)
              throws IOException
Allows data to be read from a given reader, any current data in this project will be overwritten!

The format expected by this method is the "OLS data-file format".

Parameters:
aReader - the reader to read from, cannot be null.
Throws:
IOException - in case of I/O problems.

setCapturedData

void setCapturedData(AcquisitionResult aData)
Sets the captured data of this project.

Parameters:
aData - the captured data, can be null.

setChanged

void setChanged(boolean aChanged)
Marks this project as "changed".

Parameters:
aChanged - true to mark this project as changed, false otherwise.

setFilename

void setFilename(File aFilename)
Sets the filename of this project.

Parameters:
aFilename - the filename to set, can be null.

setLastModified

void setLastModified(Date aLastModified)
Sets the last modified date of this project.

Parameters:
aLastModified - a last modified date, can be null.

setName

void setName(String aName)
Sets the name of this project.

Parameters:
aName - the name of this project, can be null.

setSettings

void setSettings(UserSettings aSettings)
Sets the user settings.

Parameters:
aSettings - the user settings, cannot be null.

setSourceVersion

void setSourceVersion(String aSourceVersion)
Sets the version of the OLS-client that saved this project.

Parameters:
aSourceVersion - the source version, for example, "0.9.2", can be null .

visit

void visit(ProjectVisitor aVisitor)
Allows external callers to traverse the project structure without having to know the exact implementation details of a project.

Parameters:
aVisitor - the visitor callback to use, cannot be null.

writeData

void writeData(Writer aWriter)
               throws IOException
Allows the current data to be written to a given writer. The format in which the data will be written is the OLS data-file format.

Parameters:
aWriter - the writer to write to, cannot be null.
Throws:
IOException - in case of I/O problems.
See Also:
readData(Reader)


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.