datavisualizer.HarvestDataRequest Class Reference

Produces a table of harvest or mortality episode results. More...

Inheritance diagram for datavisualizer.HarvestDataRequest:

datavisualizer.DataRequest

List of all members.

Public Member Functions

 HarvestDataRequest (String sChartName, DetailedOutputFileManager oManager) throws ModelException
 Constructor.
void AddGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal)
 If this is from a Results grid, it is assumed to be a basal area value.
void AddGridIntData (String sGridName, int iX, int iY, int iCode, int iVal)
 If this is from a Results grid, it is assumed to be a density value.
boolean WantAnyGridFloats ()
 This wants floats.
boolean WantAnyGridInts ()
 This wants ints.
void AddGridFloatDataMemberCode (String sGridName, String sLabel, int iCode)
 Accepts a grid float data member code for future reference when passed float data members.
void AddGridIntDataMemberCode (String sGridName, String sLabel, int iCode)
 Accepts a grid int data member code for future reference when passed int data members.

Protected Member Functions

void WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException
 Writes the table's data to tab-delimited text.

Package Functions

ModelInternalFrame DrawChart (Legend oLegend, String sChartTitle) throws ModelException
 Creates a table of the results that have been collected.
void UpdateChart (Legend oLegend) throws ModelException
 Redraws the chart using the existing dataset.
void ClearData () throws ModelException
 Clears out existing data.

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.
JPanel CreateTable (Legend oLegend) throws ModelException
 Creates the results table.

Private Attributes

float[] mp_fDensity
 The density cut for this timestep for each species.
float[] mp_fBasalArea
 The basal area cut for this timestep for each species.
int[] mp_iDensityIndexes
 Translates a data member code to an index in the density array.
int[] mp_iBasalAreaIndexes
 Translates a data member code to an index in the basal area array.
String[] mp_sColumnNames
 Column headers, to be consistent between displays.
String[] mp_sSpeciesNames
 Keep our species names ready to display, as well.
String m_sThisGrid
 Name of the grid from which the data will be collected.
float m_fPlotAreaInHectares
 Plot area, in hectares.
int m_iNumSpecies
 The number of species.
int m_iNumCutRanges = 4
 Number of allowed cut ranges.
int m_iHarvestTypeCode = -1
 We want to throw away harvest type - capture its data member code so we'll recognize it.


Detailed Description

Produces a table of harvest or mortality episode results.

A harvest table requires the detailed output file to have data saved from the "Harvest Results" grid; for mortality episodes, the "Mortality Episode Results" grid.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
June 29, 2004: Added disturbance results (LEM)

Constructor & Destructor Documentation

datavisualizer.HarvestDataRequest.HarvestDataRequest ( String  sChartName,
DetailedOutputFileManager  oManager 
) throws ModelException

Constructor.

Parameters:
sChartName Name of the chart
oManager Detailed output file manager
Exceptions:
ModelException not really, but I have to declare this.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
June 29, 2004: Dynamically deciding grid name (LEM)


Member Function Documentation

void datavisualizer.HarvestDataRequest.WriteChartDataToFile ( java.io.FileWriter  jOut  )  throws java.io. IOException [protected, virtual]

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

Parameters:
jOut java.io.FileWriter The file to write to.
Exceptions:
java.io.IOException if there's a problem writing the file.

Implements datavisualizer.DataRequest.

void datavisualizer.HarvestDataRequest.AddGridFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal 
)

If this is from a Results grid, it is assumed to be a basal area value.

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

Parameters:
sGridName Name of the grid for this data
iX X number of the cell from which this value came
iY Y number of the cell from which this value came
iCode Data member code of this value.
fVal Value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

void datavisualizer.HarvestDataRequest.AddGridIntData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
int  iVal 
)

If this is from a Results grid, it is assumed to be a density value.

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

Parameters:
sGridName Name of the grid for this data
iX X number of the cell from which this value came
iY Y number of the cell from which this value came
iCode Data member code of this value.
iVal Value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

boolean datavisualizer.HarvestDataRequest.WantAnyGridFloats (  ) 

This wants floats.

Returns:
True.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

boolean datavisualizer.HarvestDataRequest.WantAnyGridInts (  ) 

This wants ints.

Returns:
True.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

void datavisualizer.HarvestDataRequest.AddGridFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

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

Parameters:
sGridName Name of the grid
sLabel The label of the data member.
iCode The data member code.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

void datavisualizer.HarvestDataRequest.AddGridIntDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

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

Parameters:
sGridName Name of the grid
sLabel The label of the data member.
iCode The data member code.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Reimplemented from datavisualizer.DataRequest.

int datavisualizer.HarvestDataRequest.GetSpeciesFromDataMemberLabel ( String  sLabel  )  [private]

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

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

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

ModelInternalFrame datavisualizer.HarvestDataRequest.DrawChart ( Legend  oLegend,
String  sChartTitle 
) throws ModelException [package, virtual]

Creates a table of the results that have been collected.

Parameters:
oLegend The species legend.
sChartTitle The chart title.
Returns:
A JInternalFrame with the table present in it.
Exceptions:
datavisualizer.ModelException 
Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Implements datavisualizer.DataRequest.

void datavisualizer.HarvestDataRequest.UpdateChart ( Legend  oLegend  )  throws ModelException [package, virtual]

Redraws the chart using the existing dataset.

Parameters:
oLegend The legend for this chart.
Exceptions:
ModelException if anything goes wrong with the chart drawing.

Implements datavisualizer.DataRequest.

JPanel datavisualizer.HarvestDataRequest.CreateTable ( Legend  oLegend  )  throws ModelException [private]

Creates the results table.

Parameters:
oLegend Legend for this chart.
Returns:
Panel containing the table.
Exceptions:
ModelException If anything goes wrong with the drawing.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void datavisualizer.HarvestDataRequest.ClearData (  )  throws ModelException [package, virtual]

Clears out existing data.

Exceptions:
ModelException Doesn't throw an exception.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Implements datavisualizer.DataRequest.


Member Data Documentation

The density cut for this timestep for each species.

The basal area cut for this timestep for each species.

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

The code matches the location in these arrays; that location's value is the index to one of the above arrays.

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

The code matches the location in these arrays; that location's value is the index to one of the above arrays.

Initial value:

 {
        "Species", "Density (#/ha)", "Basal Area (sq. m/ha)"}
Column headers, to be consistent between displays.

Keep our species names ready to display, as well.

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

Plot area, in hectares.

The number of species.

Number of allowed cut ranges.

We want to throw away harvest type - capture its data member code so we'll recognize it.


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

Generated on Tue Apr 19 13:59:33 2011 for SORTIE Java Interface by  doxygen 1.5.6