SORTIE Java Interface
1
|
Writes an overview table for a detailed output file (basal area and density for each life history stage). More...
Public Member Functions | |
OverviewTableDataRequest (DetailedOutputFileManager oManager, String sChartName) | |
Constructor. | |
void | timestepParseFinished (boolean bBatchMode) throws ModelException |
Creates a table dataset out of the accumulated data and puts it in mp_oTables. | |
void | getReadyForTimestepParse (int iTimestep, boolean bBatchMode) |
Sets all the values in the data collection arrays back to 0. | |
boolean | wantAnyTreeFloats () |
This wants diameter values for all trees. | |
void | addTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) |
Accepts a tree float data member code. | |
void | addTreeFloatData (int iSpecies, int iType, int iCode, float fVal, boolean bBatchMode) |
Accepts a tree float data member value. | |
![]() | |
DataRequest (String sChartName, DetailedOutputFileManager oManager) | |
Constructor. | |
void | setCurrentTimestep (int iTimestep) |
Sets the current time step. | |
void | actionPerformed (java.awt.event.ActionEvent oEvent) |
If passed the order to write chart data, does it. | |
void | extractBatchSetupInfo (ChartInfo oInfo) throws ModelException |
Extracts information needed by the data request from the controls panel displayed to the user. | |
boolean | isFileWritingExternallyManaged () |
Gets whether or not file writing is externally managed for this data request or whether it takes care of everything itself. | |
void | getReadyForTimestepParse (int iTimestep, boolean bBatchMode) throws ModelException |
This will be called for all open data requests just before time step parsing begins. | |
void | timestepParseFinished (boolean bBatchMode) throws ModelException |
This will be called for all open data requests after time step parsing is completed. | |
void | outputFileParseFinished (boolean bBatchMode) |
This will be called for all open data requests after output file parsing is completed. | |
void | saveChartDataToFile (boolean bJustCurrTS) |
Writes a chart's data to a file. | |
String | getChartName () |
Get the name of the chart. | |
JInternalFrame | getChart () |
Get the chart frame. | |
boolean | wantAnyTreeFloats () |
Whether or not this object wants any tree float data members. | |
boolean | wantAnyTreeInts () |
Whether or not this object wants any tree int data members. | |
boolean | wantAnyTreeChars () |
Whether or not this object wants any tree char data members. | |
boolean | wantAnyTreeBools () |
Whether or not this object wants any tree bool data members. | |
boolean | wantAnyDeadTreeFloats () |
Whether or not this object wants any dead tree float data members. | |
boolean | wantAnyDeadTreeInts () |
Whether or not this object wants any dead tree int data members. | |
boolean | wantAnyDeadTreeChars () |
Whether or not this object wants any dead tree char data members. | |
boolean | wantAnyDeadTreeBools () |
Whether or not this object wants any dead tree bool data members. | |
boolean | wantAnyGridFloats () |
Whether or not this object wants any grid float data members. | |
boolean | wantAnyGridInts () |
Whether or not this object wants any grid int data members. | |
boolean | wantAnyGridChars () |
Whether or not this object wants any grid char data members. | |
boolean | wantAnyGridBools () |
Whether or not this object wants any grid bool data members. | |
boolean | wantAnyGridPackageFloats () |
Whether or not this object wants any grid package float data members. | |
boolean | wantAnyGridPackageInts () |
Whether or not this object wants any grid package int data members. | |
boolean | wantAnyGridPackageChars () |
Whether or not this object wants any grid package char data members. | |
boolean | wantAnyGridPackageBools () |
Whether or not this object wants any grid package bool data members. | |
void | addTreeFloatData (int iSpecies, int iType, int iCode, float fVal, boolean bBatchMode) throws SAXException |
Accepts a piece of tree float data from the parser. | |
void | addTreeIntData (int iSpecies, int iType, int iCode, int iVal, boolean bBatchMode) throws SAXException |
Accepts a piece of tree int data from the parser. | |
void | addTreeCharData (int iSpecies, int iType, int iCode, String sVal, boolean bBatchMode) throws SAXException |
Accepts a piece of tree char data from the parser. | |
void | addTreeBoolData (int iSpecies, int iType, int iCode, boolean bVal, boolean bBatchMode) throws SAXException |
Accepts a piece of tree bool data from the parser. | |
void | addDeadTreeFloatData (int iSpecies, int iType, int iCode, int iDeadCode, float fVal, boolean bBatchMode) throws SAXException |
Accepts a piece of dead tree float data from the parser. | |
void | addDeadTreeIntData (int iSpecies, int iType, int iCode, int iDeadCode, int iVal, boolean bBatchMode) throws SAXException |
Accepts a piece of dead tree int data from the parser. | |
void | addDeadTreeCharData (int iSpecies, int iType, int iCode, int iDeadCode, String sVal, boolean bBatchMode) throws SAXException |
Accepts a piece of dead tree char data from the parser. | |
void | addDeadTreeBoolData (int iSpecies, int iType, int iCode, int iDeadCode, boolean bVal, boolean bBatchMode) throws SAXException |
Accepts a piece of dead tree bool data from the parser. | |
void | addGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid float data from the parser. | |
void | addGridIntData (String sGridName, int iX, int iY, int iCode, int iVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid int data from the parser. | |
void | addGridCharData (String sGridName, int iX, int iY, int iCode, String sVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid char data from the parser. | |
void | addGridBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid bool data from the parser. | |
void | addGridPackageFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid package float data from the parser. | |
void | addGridPackageIntData (String sGridName, int iX, int iY, int iCode, int iVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid package int data from the parser. | |
void | addGridPackageCharData (String sGridName, int iX, int iY, int iCode, String sVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid package char data from the parser. | |
void | addGridPackageBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal, boolean bBatchMode) throws SAXException |
Accepts a piece of grid package bool data from the parser. | |
void | endPackage () throws SAXException |
Announces a package has ended. | |
void | endTree (boolean bBatchMode) throws SAXException |
Announces a tree record has ended. | |
void | addTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException |
Accepts a tree float data member code for future reference when passed float data members. | |
void | addTreeIntDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException |
Accepts a tree int data member code for future reference when passed int data members. | |
void | addTreeCharDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException |
Accepts a tree char data member code for future reference when passed char data members. | |
void | addTreeBoolDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException |
Accepts a tree bool data member code for future reference when passed bool data members. | |
void | addGridFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid float data member code for future reference when passed float data members. | |
void | addGridIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid int data member code for future reference when passed int data members. | |
void | addGridCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid char data member code for future reference when passed char data members. | |
void | addGridBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid bool data member code for future reference when passed bool data members. | |
void | addGridPackageFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid package float data member code for future reference when passed float data members. | |
void | addGridPackageIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid package int data member code for future reference when passed int data members. | |
void | addGridPackageCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid package char data member code for future reference when passed char data members. | |
void | addGridPackageBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException |
Accepts a grid package bool data member code for future reference when passed bool data members. | |
Protected Member Functions | |
void | writeChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException, ModelException |
Saves the data in the current table as a tab-delimited text file. | |
Private Attributes | |
String[][][] | mp_sTables |
Array of datasets for tables. | |
float[][] | mp_fABA |
Basal area data. | |
int[][] | mp_iADN |
Absolute density data. | |
int[][] | mp_iDbhCode |
Holds the data codes for diameter (diam10 or DBH). | |
float | m_fPlotAreaInHectares |
Area of the plot, in hectares. | |
int | m_iNumSpecies |
Number of total species. | |
Additional Inherited Members | |
![]() | |
String | m_sBatchFilename = "" |
File name for batch data extraction. | |
int | m_iCurrentTimestep |
Current time step being parsed. | |
boolean | m_bShowOneTimestep = true |
Whether this chart shows one timestep at a time (true) or all timesteps (false). | |
boolean | m_bExternallyManageWriting = true |
Whether or not this data request gets its file writing managed externally. | |
ModelInternalFrame | m_oChartFrame |
Chart for this request. | |
String | m_sChartName |
Name string of chart. | |
Writes an overview table for a detailed output file (basal area and density for each life history stage).
The tabulation of density and basal area data is based on the diameter value for each tree life history stage (that is, diameter at 10 cm for seedlings and DBH for everything else). For density, the number of diameter values encountered is counted; for basal area, the individual basal areas calculated from DBH are totaled. All values are displayed in per hectare units.
Technically, density data could be extracted from any tree data member, since counting up the total is all that is required. I didn't do it that way because I'm a little lazy, and I'll wait for a hue and cry from the users before unnecessarily complicating my code.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
August 4, 2004: Created (LEM)
September 9, 2011: Updated for batch mode use (LEM)
sortie.datavisualizer.OverviewTableDataRequest.OverviewTableDataRequest | ( | DetailedOutputFileManager | oManager, |
String | sChartName | ||
) |
Constructor.
Declares all the arrays.
oManager | Parent detailed output file manager |
sChartName | Name of the table being drawn. |
void sortie.datavisualizer.OverviewTableDataRequest.addTreeFloatData | ( | int | iSpecies, |
int | iType, | ||
int | iCode, | ||
float | fVal, | ||
boolean | bBatchMode | ||
) |
Accepts a tree float data member value.
If it matches our code, we'll increment the density count and the basal area total, if it's bigger than a seedling.
iSpecies | Species of the tree from which this value came. |
iType | Type of the tree from which this value came. |
iCode | Data member code of this value. |
fVal | Value. |
bBatchMode | Whether not this is in the context of the batch utility. |
void sortie.datavisualizer.OverviewTableDataRequest.addTreeFloatDataMemberCode | ( | int | iSpecies, |
int | iType, | ||
String | sLabel, | ||
int | iCode | ||
) |
Accepts a tree float data member code.
We're looking for diam10 for seedlings, and DBH for all other tree types supported.
iSpecies | The species for which this is a data member. |
iType | The tree type for which this is a data member. |
sLabel | The label of the data member. |
iCode | The data member code. |
void sortie.datavisualizer.OverviewTableDataRequest.getReadyForTimestepParse | ( | int | iTimestep, |
boolean | bBatchMode | ||
) |
Sets all the values in the data collection arrays back to 0.
void sortie.datavisualizer.OverviewTableDataRequest.timestepParseFinished | ( | boolean | bBatchMode | ) | throws ModelException |
Creates a table dataset out of the accumulated data and puts it in mp_oTables.
The four primary arrays within the overall array are ready to pass to the table constructor.
boolean sortie.datavisualizer.OverviewTableDataRequest.wantAnyTreeFloats | ( | ) |
This wants diameter values for all trees.
|
protectedvirtual |
Saves the data in the current table as a tab-delimited text file.
jOut | java.io.FileWriter The file to write to. |
java.io.IOException | if there's a problem writing the file. |
Implements sortie.datavisualizer.DataRequest.
|
private |
Area of the plot, in hectares.
|
private |
Number of total species.
|
private |
Basal area data.
Array indexes are #1 - type and #2 - species.
|
private |
Absolute density data.
Array indexes are #1 - type and #2 - species.
|
private |
Holds the data codes for diameter (diam10 or DBH).
Array indexes are #1 - type and #2 - species.
|
private |
Array of datasets for tables.
Index 0 is the seedling dataset, 1 is the sapling dataset, 2 is the adult dataset, and 3 is the snag dataset.