SORTIE Java Interface  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
sortie.datavisualizer.FoliarChemistryTableDataRequest Class Reference

Produces a table of foliar chemistry results. More...

Inheritance diagram for sortie.datavisualizer.FoliarChemistryTableDataRequest:
sortie.datavisualizer.DataRequest

Public Member Functions

 FoliarChemistryTableDataRequest (String sChartName, DetailedOutputFileManager oManager) throws ModelException
 Constructor. More...
 
void getReadyForTimestepParse (int iTimestep, boolean bBatchMode)
 This will be called for all open data requests just before time step parsing begins. More...
 
void timestepParseFinished (boolean bBatchMode)
 This will be called for all open data requests after time step parsing is completed. More...
 
void addGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal, boolean bBatchMode)
 This accepts float data. More...
 
boolean wantAnyGridFloats ()
 This wants floats. More...
 
void addGridFloatDataMemberCode (String sGridName, String sLabel, int iCode)
 Accepts a grid float data member code for future reference when passed float data members. More...
 
- Public Member Functions inherited from sortie.datavisualizer.DataRequest
 DataRequest (String sChartName, DetailedOutputFileManager oManager)
 Constructor. More...
 
void setCurrentTimestep (int iTimestep)
 Sets the current time step. More...
 
void actionPerformed (java.awt.event.ActionEvent oEvent)
 If passed the order to write chart data, does it. More...
 
void extractBatchSetupInfo (ChartInfo oInfo) throws ModelException
 Extracts information needed by the data request from the controls panel displayed to the user. More...
 
boolean isFileWritingExternallyManaged ()
 Gets whether or not file writing is externally managed for this data request or whether it takes care of everything itself. More...
 
void getReadyForTimestepParse (int iTimestep, boolean bBatchMode) throws ModelException
 This will be called for all open data requests just before time step parsing begins. More...
 
void timestepParseFinished (boolean bBatchMode) throws ModelException
 This will be called for all open data requests after time step parsing is completed. More...
 
void outputFileParseFinished (boolean bBatchMode)
 This will be called for all open data requests after output file parsing is completed. More...
 
void saveChartDataToFile (boolean bJustCurrTS)
 Writes a chart's data to a file. More...
 
String getChartName ()
 Get the name of the chart. More...
 
JInternalFrame getChart ()
 Get the chart frame. More...
 
boolean wantAnyTreeFloats ()
 Whether or not this object wants any tree float data members. More...
 
boolean wantAnyTreeInts ()
 Whether or not this object wants any tree int data members. More...
 
boolean wantAnyTreeChars ()
 Whether or not this object wants any tree char data members. More...
 
boolean wantAnyTreeBools ()
 Whether or not this object wants any tree bool data members. More...
 
boolean wantAnyDeadTreeFloats ()
 Whether or not this object wants any dead tree float data members. More...
 
boolean wantAnyDeadTreeInts ()
 Whether or not this object wants any dead tree int data members. More...
 
boolean wantAnyDeadTreeChars ()
 Whether or not this object wants any dead tree char data members. More...
 
boolean wantAnyDeadTreeBools ()
 Whether or not this object wants any dead tree bool data members. More...
 
boolean wantAnyGridFloats ()
 Whether or not this object wants any grid float data members. More...
 
boolean wantAnyGridInts ()
 Whether or not this object wants any grid int data members. More...
 
boolean wantAnyGridChars ()
 Whether or not this object wants any grid char data members. More...
 
boolean wantAnyGridBools ()
 Whether or not this object wants any grid bool data members. More...
 
boolean wantAnyGridPackageFloats ()
 Whether or not this object wants any grid package float data members. More...
 
boolean wantAnyGridPackageInts ()
 Whether or not this object wants any grid package int data members. More...
 
boolean wantAnyGridPackageChars ()
 Whether or not this object wants any grid package char data members. More...
 
boolean wantAnyGridPackageBools ()
 Whether or not this object wants any grid package bool data members. More...
 
void addTreeFloatData (int iSpecies, int iType, int iCode, float fVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree float data from the parser. More...
 
void addTreeIntData (int iSpecies, int iType, int iCode, int iVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree int data from the parser. More...
 
void addTreeCharData (int iSpecies, int iType, int iCode, String sVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree char data from the parser. More...
 
void addTreeBoolData (int iSpecies, int iType, int iCode, boolean bVal, boolean bBatchMode) throws SAXException
 Accepts a piece of tree bool data from the parser. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void endPackage () throws SAXException
 Announces a package has ended. More...
 
void endTree (boolean bBatchMode) throws SAXException
 Announces a tree record has ended. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Protected Member Functions

void writeChartDataToFile (FileWriter jOut) throws IOException
 Writes the table's data to tab-delimited text. More...
 
- Protected Member Functions inherited from sortie.datavisualizer.DataRequest
abstract void writeChartDataToFile (java.io.FileWriter jOut) throws java.io.IOException, ModelException
 Child classes override this to write the data behind their chart to tab-delimited text. More...
 

Private Member Functions

int getSpeciesFromDataMemberLabel (String sLabel)
 Gets the species from a data member label which ends in "_x", where x is the species number. More...
 
JPanel createTablePanel () throws ModelException
 Creates the results table panel. More...
 
Object [][] createTable () throws ModelException
 Creates the results table. More...
 

Private Attributes

float [] mp_fN
 The N for this timestep for each species. More...
 
float [] mp_fP
 The P for this timestep for each species. More...
 
float [] mp_fLignin
 The lignin for this timestep for each species. More...
 
float [] mp_fFiber
 The fiber for this timestep for each species. More...
 
float [] mp_fCellulose
 The cellulose for this timestep for each species. More...
 
float [] mp_fTannins
 The tannins for this timestep for each species. More...
 
float [] mp_fPhenolics
 The phenolics for this timestep for each species. More...
 
float [] mp_fSLA
 The SLA for this timestep for each species. More...
 
int [] mp_iNIndexes
 Translates a data member code to an index in the N array. More...
 
int [] mp_iPIndexes
 Translates a data member code to an index in the P array. More...
 
int [] mp_iLigninIndexes
 Translates a data member code to an index in the lignin array. More...
 
int [] mp_iFiberIndexes
 Translates a data member code to an index in the fiber array. More...
 
int [] mp_iCelluloseIndexes
 Translates a data member code to an index in the cellulose array. More...
 
int [] mp_iTanninsIndexes
 Translates a data member code to an index in the tannins array. More...
 
int [] mp_iPhenolicsIndexes
 Translates a data member code to an index in the phenolics array. More...
 
int [] mp_iSLAIndexes
 Translates a data member code to an index in the SLA array. More...
 
String [] mp_sColumnNames
 Table column headers. More...
 
String [] mp_sSpeciesNames
 Array of species names for display. More...
 
String m_sThisGrid
 Name of the grid from which the data will be collected. More...
 
float m_fPlotAreaInHa
 Plot area, in hectares. More...
 
int m_iNumSpecies
 The number of species. More...
 
int m_iNumCols = 9
 Number of columns in the table. More...
 

Additional Inherited Members

- Protected Attributes inherited from sortie.datavisualizer.DataRequest
String m_sBatchFilename = ""
 File name for batch data extraction. More...
 
int m_iCurrentTimestep
 Current time step being parsed. More...
 
boolean m_bShowOneTimestep = true
 Whether this chart shows one timestep at a time (true) or all timesteps (false). More...
 
boolean m_bExternallyManageWriting = true
 Whether or not this data request gets its file writing managed externally. More...
 
ModelInternalFrame m_oChartFrame
 Chart for this request. More...
 
String m_sChartName
 Name string of chart. More...
 

Detailed Description

Produces a table of foliar chemistry results.

This requires the detailed output file to have data saved from the "Foliar Chemistry" grid.

Copyright: Copyright (c) Charles D. Canham 2006 Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
December 16, 2008: Created (LEM)

Constructor & Destructor Documentation

◆ FoliarChemistryTableDataRequest()

sortie.datavisualizer.FoliarChemistryTableDataRequest.FoliarChemistryTableDataRequest ( String  sChartName,
DetailedOutputFileManager  oManager 
) throws ModelException

Constructor.

Parameters
sChartNameName of the chart
oManagerDetailed output file manager
Exceptions
ModelExceptionnot really, but I have to declare this.

Member Function Documentation

◆ addGridFloatData()

void sortie.datavisualizer.FoliarChemistryTableDataRequest.addGridFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal,
boolean  bBatchMode 
)

This accepts float data.

The index vector is consulted and the values added to the appropriate array location.

Parameters
sGridNameName of the grid for this data
iXX number of the cell from which this value came
iYY number of the cell from which this value came
iCodeData member code of this value.
fValValue.
bBatchModeWhether not this is in the context of the batch utility.

◆ addGridFloatDataMemberCode()

void sortie.datavisualizer.FoliarChemistryTableDataRequest.addGridFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

Accepts a grid float data member code for future reference when passed float data members.

Parameters
sGridNameName of the grid
sLabelThe label of the data member.
iCodeThe data member code.

◆ createTable()

Object [][] sortie.datavisualizer.FoliarChemistryTableDataRequest.createTable ( ) throws ModelException
private

Creates the results table.

Returns
The table.
Exceptions
ModelExceptionIf anything goes wrong with the drawing.

◆ createTablePanel()

JPanel sortie.datavisualizer.FoliarChemistryTableDataRequest.createTablePanel ( ) throws ModelException
private

Creates the results table panel.

Returns
Panel containing the table.
Exceptions
ModelExceptionIf anything goes wrong with the drawing.

◆ getReadyForTimestepParse()

void sortie.datavisualizer.FoliarChemistryTableDataRequest.getReadyForTimestepParse ( int  iTimestep,
boolean  bBatchMode 
)

This will be called for all open data requests just before time step parsing begins.

Parameters
iTimestepTimestep to parse.
bBatchModeWhether or not this is in the context of batch extraction mode.

◆ getSpeciesFromDataMemberLabel()

int sortie.datavisualizer.FoliarChemistryTableDataRequest.getSpeciesFromDataMemberLabel ( String  sLabel)
private

Gets the species from a data member label which ends in "_x", where x is the species number.

Parameters
sLabelThe data member label.
Returns
The species number, or -1 if none exists.

◆ timestepParseFinished()

void sortie.datavisualizer.FoliarChemistryTableDataRequest.timestepParseFinished ( boolean  bBatchMode)

This will be called for all open data requests after time step parsing is completed.

Parameters
bBatchModeWhether or not this is in the context of batch extraction mode.

◆ wantAnyGridFloats()

boolean sortie.datavisualizer.FoliarChemistryTableDataRequest.wantAnyGridFloats ( )

This wants floats.

Returns
True.

◆ writeChartDataToFile()

void sortie.datavisualizer.FoliarChemistryTableDataRequest.writeChartDataToFile ( FileWriter  jOut) throws IOException
protected

Writes the table's data to tab-delimited text.

Parameters
jOutFileWriter The file to write to.
Exceptions
IOExceptionif there's a problem writing the file.

Member Data Documentation

◆ m_fPlotAreaInHa

float sortie.datavisualizer.FoliarChemistryTableDataRequest.m_fPlotAreaInHa
private

Plot area, in hectares.

◆ m_iNumCols

int sortie.datavisualizer.FoliarChemistryTableDataRequest.m_iNumCols = 9
private

Number of columns in the table.

◆ m_iNumSpecies

int sortie.datavisualizer.FoliarChemistryTableDataRequest.m_iNumSpecies
private

The number of species.

◆ m_sThisGrid

String sortie.datavisualizer.FoliarChemistryTableDataRequest.m_sThisGrid
private

Name of the grid from which the data will be collected.

◆ mp_fCellulose

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fCellulose
private

The cellulose for this timestep for each species.

◆ mp_fFiber

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fFiber
private

The fiber for this timestep for each species.

◆ mp_fLignin

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fLignin
private

The lignin for this timestep for each species.

◆ mp_fN

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fN
private

The N for this timestep for each species.

◆ mp_fP

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fP
private

The P for this timestep for each species.

◆ mp_fPhenolics

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fPhenolics
private

The phenolics for this timestep for each species.

◆ mp_fSLA

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fSLA
private

The SLA for this timestep for each species.

◆ mp_fTannins

float [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_fTannins
private

The tannins for this timestep for each species.

◆ mp_iCelluloseIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iCelluloseIndexes
private

Translates a data member code to an index in the cellulose array.

For each species, this gives the code for the cellulose index.

◆ mp_iFiberIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iFiberIndexes
private

Translates a data member code to an index in the fiber array.

For each species, this gives the code for the fiber index.

◆ mp_iLigninIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iLigninIndexes
private

Translates a data member code to an index in the lignin array.

For each species, this gives the code for the lignin index.

◆ mp_iNIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iNIndexes
private

Translates a data member code to an index in the N array.

For each species, this gives the code for the N index.

◆ mp_iPhenolicsIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iPhenolicsIndexes
private

Translates a data member code to an index in the phenolics array.

For each species, this gives the code for the phenolics index.

◆ mp_iPIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iPIndexes
private

Translates a data member code to an index in the P array.

For each species, this gives the code for the P index.

◆ mp_iSLAIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iSLAIndexes
private

Translates a data member code to an index in the SLA array.

For each species, this gives the code for the SLA index.

◆ mp_iTanninsIndexes

int [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_iTanninsIndexes
private

Translates a data member code to an index in the tannins array.

For each species, this gives the code for the tannins index.

◆ mp_sColumnNames

String [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_sColumnNames
private
Initial value:
= {"Species", "N (kg/ha)", "P (kg/ha)",
"Lignin (kg/ha)", "Fiber (kg/ha)", "Cellulose (kg/ha)", "Tannins (kg/ha)",
"Phenolics (kg/ha)", "SLA (kg/ha)"}

Table column headers.

Putting them here makes them consistent in all possible display methods.

◆ mp_sSpeciesNames

String [] sortie.datavisualizer.FoliarChemistryTableDataRequest.mp_sSpeciesNames
private

Array of species names for display.


The documentation for this class was generated from the following file: