com.jstatcom.project
Class Project

java.lang.Object
  extended by com.jstatcom.project.Project

public final class Project
extends java.lang.Object

Holds all elements that make up a project. This class is XML serializable. A project contains of the following elements:

Author:
Markus Kraetzig

Field Summary
static javolution.xml.XmlFormat<Project> Project_XML
           
 
Constructor Summary
Project(java.lang.String name, java.lang.String description)
          Creates a new project with a name and a project description.
 
Method Summary
 void addOutputData(OutputData outputData)
          Adds a new output data element to this project.
 void addProjectData(ProjectData pData)
          Adds project data to this project.
 void addProjectState(ProjectState projectState)
          Adds a new project state to this project.
 java.lang.String getCurrentModuleFrame()
          Gets the name of the module frame that should be displayed when this project is loaded.
 java.util.Date getDate()
          Gets the creation date of this project.
 java.lang.String getDescription()
          Gets the description of this project.
 java.lang.String getName()
          Gets the name of this project.
 java.util.Iterator getOutputDataIterator()
          Gets an iterator over all output data elements.
 java.util.Iterator getProjectDataIterator()
          Gets an iterator over all added project data object.
 java.util.Iterator getProjectStatesIterator()
          Gets an iterator over all project states.
 void setCurrentModuleFrame(java.lang.String currentModuleFrame)
          Sets the name of the module frame that should be displayed when this project is loaded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Project_XML

public static final javolution.xml.XmlFormat<Project> Project_XML
Constructor Detail

Project

public Project(java.lang.String name,
               java.lang.String description)
Creates a new project with a name and a project description.

Parameters:
name - name of the project, will automatically be set to "project" if null or empty
description - description of this project, can be null
Method Detail

addProjectData

public void addProjectData(ProjectData pData)
Adds project data to this project. Nothing happens if the same object was added before.

Parameters:
pData - element of the project data store to be serialized
Throws:
java.lang.IllegalArgumentException - if (dataStoreType == null)

addOutputData

public void addOutputData(OutputData outputData)
Adds a new output data element to this project.

Parameters:
outputData - output data object
Throws:
java.lang.IllegalArgumentException - if (outputData == null)

addProjectState

public void addProjectState(ProjectState projectState)
Adds a new project state to this project. Nothing happens if projectState == null.

Parameters:
projectState - project state object

getOutputDataIterator

public java.util.Iterator getOutputDataIterator()
Gets an iterator over all output data elements.

Returns:
output iterator

getProjectDataIterator

public java.util.Iterator getProjectDataIterator()
Gets an iterator over all added project data object.

Returns:
project data iterator

getProjectStatesIterator

public java.util.Iterator getProjectStatesIterator()
Gets an iterator over all project states.

Returns:
project states iterator

getDate

public java.util.Date getDate()
Gets the creation date of this project.

Returns:
creation date

getDescription

public java.lang.String getDescription()
Gets the description of this project.

Returns:
description, never returns null but "" if empty

getName

public java.lang.String getName()
Gets the name of this project.

Returns:
the name of this project

getCurrentModuleFrame

public java.lang.String getCurrentModuleFrame()
Gets the name of the module frame that should be displayed when this project is loaded.

Returns:
name of the module frame

setCurrentModuleFrame

public void setCurrentModuleFrame(java.lang.String currentModuleFrame)
Sets the name of the module frame that should be displayed when this project is loaded. Does nothing if the current module frame is null.

Parameters:
currentModuleFrame - frame title of the module