Inheritance diagram for javawrapper::OutputBehaviors:
Public Member Functions | |
OutputBehaviors (GUIManager oManager) | |
Constructor. | |
Subplot | AddShortOutputSubplot (String sName) |
Creates a subplot for short output. | |
Subplot | AddDetailedOutputSubplot (String sName) |
Creates a subplot for detailed output. | |
void | SetShortOutputFileName (String sFilename) |
Sets the short output filename. | |
String | GetShortOutputFileName () |
Gets the short output filename. | |
void | SetDetailedOutputFileName (String sFilename) |
Sets the detailed output filename. | |
String | GetDetailedOutputFileName () |
Gets the detailed output filename. | |
int | GetNumberOfDetailedTreeSettings () |
Gets the number of tree settings for which there is detailed output info (each setting is one tree species/type combo). | |
int | GetNumberOfDetailedGridSettings () |
Gets the number of grid settings for which there is detailed output info. | |
boolean | SavingShortOutputData () |
Gets whether or not short output is being saved. | |
DetailedTreeSettings | GetDetailedTreeSetting (int iIndex) |
Returns the detailed output tree setting at a specified index. | |
DetailedGridSettings | GetDetailedGridSetting (int iIndex) |
Returns the detailed output grid setting at a specified index. | |
void | SetSaveAbsoluteDensity (int iType, boolean bUse) throws ModelException |
Sets the save absolute density attribute for a type. | |
void | SetSaveRelativeDensity (int iType, boolean bUse) throws ModelException |
Sets the save relative density attribute for a type. | |
void | SetSaveAbsoluteBasalArea (int iType, boolean bUse) throws ModelException |
Sets the save absolute basal area attribute for a type. | |
void | SetSaveRelativeBasalArea (int iType, boolean bUse) throws ModelException |
Sets the save relative basal area attribute for a type. | |
boolean | GetSaveAbsoluteBasalArea (int iType) throws ModelException |
Gets whether or not absolute basal area is saved for a tree type. | |
boolean | GetSaveRelativeBasalArea (int iType) throws ModelException |
Gets whether or not relative basal area is saved for a tree type. | |
boolean | GetSaveAbsoluteDensity (int iType) throws ModelException |
Gets whether or not absolute density is saved for a tree type. | |
boolean | GetSaveRelativeDensity (int iType) throws ModelException |
Gets whether or not relative density is saved for a tree type. | |
void | WriteXML (BufferedWriter jOut, TreePopulation oPop) throws ModelException |
Overridden from base because output parameters are special. | |
void | ValidateData (TreePopulation oPop) throws ModelException |
Validates the data before writing to a parameter file. | |
void | DoSetup (TreePopulation oPop) throws javawrapper.ModelException |
Performs setup. | |
Vector | FormatDataForDisplay (TreePopulation oPop) |
This has its own display window; it won't contribute data to the display. | |
TreePopulation | GetTreePopulation () |
Gets the tree population. | |
void | ClearDetailedTreeSettings () |
Deletes all detailed output tree settings. | |
void | ClearDetailedGridSettings () |
Deletes all detailed output grid settings. | |
void | AddDetailedTreeSettings (DetailedTreeSettings oTreeSettings) throws ModelException |
Adds a new detailed output tree settings object. | |
void | AddDetailedGridSettings (DetailedGridSettings oTreeSettings) |
Adds a new detailed output grid settings object. | |
boolean | SetSingleValueByXMLTag (String sXMLTag, String sXMLParentTag, Attributes oAttributes, Object oData) throws ModelException |
Sets a data object's value. | |
boolean | SetVectorValueByXMLTag (String sXMLTag, String sXMLParentTag, Vector p_oData, String[] p_sChildXMLTags, boolean[] p_bAppliesTo, Attributes oParentAttributes, Attributes[] p_oAttributes) throws ModelException |
Sets a data vector's value. | |
void | ReadXMLParentTag (String sXMLTag, Attributes oAttributes) throws ModelException |
Accepts an XML parent tag (empty, no data) from the parser. | |
void | ChangeOfSpecies (int iOldNumSpecies, int[] p_iIndexer, String[] p_sNewSpecies) |
Checks detailed output settings upon change of species. | |
void | CopySpecies (int iSpeciesCopyFrom, int iSpeciesCopyTo) throws ModelException |
Updates output settings when species are copied. | |
void | ChangeOfPlotResolution (float fOldX, float fOldY, float fNewX, float fNewY) throws ModelException |
Removes cells from subplots that are outside the plot. | |
Static Public Attributes | |
static final String | DETAILED_OUTPUT_EXTENSION = ".gz.tar" |
File extension for the detailed output file. | |
static final String | SUMMARY_EXTENSION = ".out" |
File extension for the summary output file. | |
Protected Member Functions | |
void | UpdateIsEnabled (Behavior oBeh) |
Keeps the behavior enabled flag current. | |
void | WriteShortOutputXML (BufferedWriter jOut) throws java.io. IOException |
Writes the parameter file data for short output. | |
void | WriteDetailedOutputXML (BufferedWriter jOut, TreePopulation oPop) throws java.io. IOException, ModelException |
Writes the parameter file data for detailed output. | |
Protected Attributes | |
Vector | mp_oShortTreeSaveSettings |
For short output - collection of TreeOutputSaveInfo objects - vector is sized number of types. | |
Vector | mp_oDetailedTreeSaveSettings |
For detailed output - collection of DetailedTreeSettings objects. | |
Vector | mp_oDetailedGridSaveSettings |
For detailed output - collection of DetailedGridSettings objects. | |
Vector | mp_oShortOutputSubplots = new Vector(0) |
For short output - the list of Subplot objects. | |
Vector | mp_oDetailedOutputSubplots = new Vector(0) |
For detailed output - the list of Subplot objects. | |
TreePopulation | m_oPop |
Tree population. | |
ModelString | m_sShortOutputFilename |
File name for short output. | |
ModelString | m_sDetailedOutputFilename |
File name for detailed output. | |
DetailedOutputSettings | m_oCurrentDetailedSettings |
When parsing an XML file, this is the setting currently receiving data. | |
Subplot | m_oCurrentSubplot |
When parsing an XML file, this is the subplot currently receiving data. | |
int | m_iCurrentType |
When parsing an XML file, this is the current short output type. | |
Package Functions | |
void | DisplayWindow (MainWindow oWindow) |
Displays the output setup options. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
javawrapper::OutputBehaviors::OutputBehaviors | ( | GUIManager | oManager | ) | [inline] |
Constructor.
oManager | GUIManager object. |
Subplot javawrapper::OutputBehaviors::AddShortOutputSubplot | ( | String | sName | ) | [inline] |
Creates a subplot for short output.
sName | Name of the subplot. |
Subplot javawrapper::OutputBehaviors::AddDetailedOutputSubplot | ( | String | sName | ) | [inline] |
Creates a subplot for detailed output.
sName | Name of the subplot. |
void javawrapper::OutputBehaviors::SetShortOutputFileName | ( | String | sFilename | ) | [inline] |
Sets the short output filename.
sFilename | Filename. |
String javawrapper::OutputBehaviors::GetShortOutputFileName | ( | ) | [inline] |
Gets the short output filename.
void javawrapper::OutputBehaviors::SetDetailedOutputFileName | ( | String | sFilename | ) | [inline] |
Sets the detailed output filename.
sFilename | Filename. |
String javawrapper::OutputBehaviors::GetDetailedOutputFileName | ( | ) | [inline] |
Gets the detailed output filename.
int javawrapper::OutputBehaviors::GetNumberOfDetailedTreeSettings | ( | ) | [inline] |
Gets the number of tree settings for which there is detailed output info (each setting is one tree species/type combo).
int javawrapper::OutputBehaviors::GetNumberOfDetailedGridSettings | ( | ) | [inline] |
Gets the number of grid settings for which there is detailed output info.
boolean javawrapper::OutputBehaviors::SavingShortOutputData | ( | ) | [inline] |
Gets whether or not short output is being saved.
DetailedTreeSettings javawrapper::OutputBehaviors::GetDetailedTreeSetting | ( | int | iIndex | ) | [inline] |
Returns the detailed output tree setting at a specified index.
iIndex | The index. |
DetailedGridSettings javawrapper::OutputBehaviors::GetDetailedGridSetting | ( | int | iIndex | ) | [inline] |
Returns the detailed output grid setting at a specified index.
iIndex | The index. |
void javawrapper::OutputBehaviors::UpdateIsEnabled | ( | Behavior | oBeh | ) | [inline, protected] |
Keeps the behavior enabled flag current.
Any change of save flags has the potential to enable the behavior (by making the first save flag true) or unenabling (by making the last save flag false).
oBeh | Behavior to check. |
void javawrapper::OutputBehaviors::SetSaveAbsoluteDensity | ( | int | iType, | |
boolean | bUse | |||
) | throws ModelException [inline] |
Sets the save absolute density attribute for a type.
iType | Tree type. | |
bUse | Whether or not to use this. |
ModelException | If the type is not valid. |
void javawrapper::OutputBehaviors::SetSaveRelativeDensity | ( | int | iType, | |
boolean | bUse | |||
) | throws ModelException [inline] |
Sets the save relative density attribute for a type.
iType | Tree type. | |
bUse | Whether or not to use this. |
ModelException | If the type is not valid. |
void javawrapper::OutputBehaviors::SetSaveAbsoluteBasalArea | ( | int | iType, | |
boolean | bUse | |||
) | throws ModelException [inline] |
Sets the save absolute basal area attribute for a type.
This is ignored if it's not sapling or adult.
iType | Tree type. | |
bUse | Whether or not to use this. |
ModelException | If the type is not valid. |
void javawrapper::OutputBehaviors::SetSaveRelativeBasalArea | ( | int | iType, | |
boolean | bUse | |||
) | throws ModelException [inline] |
Sets the save relative basal area attribute for a type.
This is ignored if it's not sapling or adult.
iType | Tree type. | |
bUse | Whether or not to use this. |
ModelException | If the type is not valid. |
boolean javawrapper::OutputBehaviors::GetSaveAbsoluteBasalArea | ( | int | iType | ) | throws ModelException [inline] |
Gets whether or not absolute basal area is saved for a tree type.
iType | Tree type. |
ModelException | if the type is not valid. |
boolean javawrapper::OutputBehaviors::GetSaveRelativeBasalArea | ( | int | iType | ) | throws ModelException [inline] |
Gets whether or not relative basal area is saved for a tree type.
iType | Tree type. |
ModelException | if the type is not valid. |
boolean javawrapper::OutputBehaviors::GetSaveAbsoluteDensity | ( | int | iType | ) | throws ModelException [inline] |
Gets whether or not absolute density is saved for a tree type.
iType | Tree type. |
ModelException | if the type is not valid. |
boolean javawrapper::OutputBehaviors::GetSaveRelativeDensity | ( | int | iType | ) | throws ModelException [inline] |
Gets whether or not relative density is saved for a tree type.
iType | Tree type. |
ModelException | if the type is not valid. |
void javawrapper::OutputBehaviors::WriteXML | ( | BufferedWriter | jOut, | |
TreePopulation | oPop | |||
) | throws ModelException [inline] |
Overridden from base because output parameters are special.
jOut | File to write to. | |
oPop | TreePopulation object. |
ModelException | if there is a problem writing the file. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::OutputBehaviors::WriteShortOutputXML | ( | BufferedWriter | jOut | ) | throws java.io. IOException [inline, protected] |
Writes the parameter file data for short output.
Does nothing if there are no short output save settings.
jOut | File to write |
java.io.IOException | passed through from file writing |
void javawrapper::OutputBehaviors::WriteDetailedOutputXML | ( | BufferedWriter | jOut, | |
TreePopulation | oPop | |||
) | throws java.io. IOException, ModelException [inline, protected] |
Writes the parameter file data for detailed output.
Does nothing if there are no detailed output save settings.
jOut | File to write | |
oPop | TreePopulation object |
java.io.IOException | passed through from file writing | |
ModelException | passed through from tree population |
void javawrapper::OutputBehaviors::ValidateData | ( | TreePopulation | oPop | ) | throws ModelException [inline, virtual] |
Validates the data before writing to a parameter file.
ModelException | if the filename is empty but there are save settings. |
oPop | Not used. |
Implements javawrapper::WorkerBase.
void javawrapper::OutputBehaviors::DoSetup | ( | TreePopulation | oPop | ) | throws javawrapper.ModelException [inline, virtual] |
Performs setup.
oPop | TreePopulation object. |
javawrapper.ModelException | Doesn't throw this exception. |
Implements javawrapper::WorkerBase.
void javawrapper::OutputBehaviors::DisplayWindow | ( | MainWindow | oWindow | ) | [inline, package] |
Displays the output setup options.
oWindow | Main application window. |
Vector javawrapper::OutputBehaviors::FormatDataForDisplay | ( | TreePopulation | oPop | ) | [inline] |
This has its own display window; it won't contribute data to the display.
oPop | TreePopulation object. |
Reimplemented from javawrapper::WorkerBase.
TreePopulation javawrapper::OutputBehaviors::GetTreePopulation | ( | ) | [inline] |
Gets the tree population.
void javawrapper::OutputBehaviors::ClearDetailedTreeSettings | ( | ) | [inline] |
Deletes all detailed output tree settings.
Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
void javawrapper::OutputBehaviors::ClearDetailedGridSettings | ( | ) | [inline] |
Deletes all detailed output grid settings.
Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
void javawrapper::OutputBehaviors::AddDetailedTreeSettings | ( | DetailedTreeSettings | oTreeSettings | ) | throws ModelException [inline] |
Adds a new detailed output tree settings object.
This will overwrite any existing settings for that species and type.
oTreeSettings | The new settings object. |
ModelException | if either the type or the species name is invalid. |
void javawrapper::OutputBehaviors::AddDetailedGridSettings | ( | DetailedGridSettings | oTreeSettings | ) | [inline] |
Adds a new detailed output grid settings object.
This will overwrite any existing settings for that grid.
oTreeSettings | The new settings object. |
boolean javawrapper::OutputBehaviors::SetSingleValueByXMLTag | ( | String | sXMLTag, | |
String | sXMLParentTag, | |||
Attributes | oAttributes, | |||
Object | oData | |||
) | throws ModelException [inline] |
Sets a data object's value.
Overriden from the base class to capture output settings.
sXMLTag | XML tag of data object whose value is to be set. | |
sXMLParentTag | The immediate parent tag that sXMLTag is within. | |
oAttributes | Attributes of XML tag | |
oData | Data value appropriate to the data type |
ModelException | if the value could not be assigned to the data object. |
Reimplemented from javawrapper::WorkerBase.
boolean javawrapper::OutputBehaviors::SetVectorValueByXMLTag | ( | String | sXMLTag, | |
String | sXMLParentTag, | |||
Vector | p_oData, | |||
String[] | p_sChildXMLTags, | |||
boolean[] | p_bAppliesTo, | |||
Attributes | oParentAttributes, | |||
Attributes[] | p_oAttributes | |||
) | throws ModelException [inline] |
Sets a data vector's value.
Overridden from the base class. Due to the vagaries of parameter file parsing, our values may come in through here instead of in single values because there could be repeats.
sXMLTag | Parent XML tag of data vector whose value is to be set. | |
sXMLParentTag | The immediate parent tag that sXMLTag is within. | |
p_oData | Vector of data values appropriate to the data type | |
p_sChildXMLTags | The XML tags of the child elements | |
p_bAppliesTo | Array of booleans saying which of the vector values should be set. This is important in the case of species-specifics - the vector index is the species number but not all species are set. | |
oParentAttributes | Attributes of parent tag. May be useful when overridding this for unusual tags. | |
p_oAttributes | Attributes passed from parser. This may be needed when overriding this function. Basic species-specific values are already handled by this function. |
ModelException | if the value could not be assigned to the data object. |
Reimplemented from javawrapper::WorkerBase.
void javawrapper::OutputBehaviors::ReadXMLParentTag | ( | String | sXMLTag, | |
Attributes | oAttributes | |||
) | throws ModelException [inline] |
Accepts an XML parent tag (empty, no data) from the parser.
This function watches for the following output tags:
sXMLTag | The XML tag. | |
oAttributes | The attributes of this object. |
ModelException | if data is missing or invalid. |
Reimplemented from javawrapper::WorkerBase.
void javawrapper::OutputBehaviors::ChangeOfSpecies | ( | int | iOldNumSpecies, | |
int[] | p_iIndexer, | |||
String[] | p_sNewSpecies | |||
) | [inline] |
Checks detailed output settings upon change of species.
iOldNumSpecies | says how many species there used to be. | |
p_iIndexer | is an array, sized to the new number of species. For each bucket (representing the index number of a species on the new list), the value is either the index of that same species in the old species list, or -1 if the species is new. | |
p_sNewSpecies | The new species list. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::OutputBehaviors::CopySpecies | ( | int | iSpeciesCopyFrom, | |
int | iSpeciesCopyTo | |||
) | throws ModelException [inline] |
Updates output settings when species are copied.
iSpeciesCopyFrom | int Species to copy. | |
iSpeciesCopyTo | int Species that is the copy. |
ModelException | if there is a problem. |
Reimplemented from javawrapper::BehaviorTypeBase.
void javawrapper::OutputBehaviors::ChangeOfPlotResolution | ( | float | fOldX, | |
float | fOldY, | |||
float | fNewX, | |||
float | fNewY | |||
) | throws ModelException [inline] |
Removes cells from subplots that are outside the plot.
fOldX | float Old plot X length. | |
fOldY | float Old plot Y length. | |
fNewX | float New plot X length. | |
fNewY | float New plot Y length. |
ModelException | won't. |
Reimplemented from javawrapper::WorkerBase.
final String javawrapper::OutputBehaviors::DETAILED_OUTPUT_EXTENSION = ".gz.tar" [static] |
File extension for the detailed output file.
final String javawrapper::OutputBehaviors::SUMMARY_EXTENSION = ".out" [static] |
File extension for the summary output file.