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

Controls the data visualization for a single detailed output file. More...

Inheritance diagram for sortie.datavisualizer.DetailedOutputFileManager:
sortie.datavisualizer.DataFileManager

Public Member Functions

 DetailedOutputFileManager (DataVisualizerManager oManager, String sTarball) throws ModelException
 Constructor. More...
 
void setParFileTimesteps (int i)
 Sets the number of timesteps for the detailed output file parameter file. More...
 
int getNumberOfActualTimesteps ()
 Gets the number of actual data timesteps contained in this detailed output file (as opposed to how many the par file says there are). More...
 
void setSubplotXCellLength (float f)
 Sets the subplot X cell length. More...
 
void setSubplotYCellLength (float f)
 Sets the subplot Y cell length. More...
 
boolean isThisSubplot (String sSubplotName)
 Checks to see if a subplot name indicates that the detailed output file being managed is in fact for that subplot. More...
 
float getPlotArea ()
 Gets the area of this plot or subplot, in ha. More...
 
void addBatchData (ChartInfo oInfo) throws ModelException
 Adds a new item to the data request list. More...
 
void doBatchExtraction () throws ModelException
 Does batch data extraction of all data requests. More...
 
JInternalFrame drawChart (String sGraphName) throws ModelException
 Handles the request to draw a chart for this file. More...
 
void updateCurrentRunCharts () throws ModelException
 Updates charts for a current run. More...
 
JPopupMenu getTableOptions (ActionListener sActionListener)
 Gets the tables that can be drawn for this file. More...
 
JPopupMenu getHistogramOptions (ActionListener sActionListener)
 Gets the histograms that can be drawn for this file. More...
 
JPopupMenu getMapOptions (ActionListener sActionListener)
 Gets the maps that can be drawn for this file. More...
 
JPopupMenu getLineGraphOptions (ActionListener sActionListener)
 Gets the line graphs that can be drawn for this file. More...
 
void setXPlotLength (float f)
 Sets the plot X length. More...
 
void setYPlotLength (float f)
 Sets the plot Y length. More...
 
void setNumberOfYearsPerTimestep (float f)
 Sets the number of years per timestep. More...
 
float getNumberOfYearsPerTimestep ()
 Gets the number of years per timestep. More...
 
float getXPlotLength ()
 Gets the plot X length. More...
 
float getYPlotLength ()
 Gets the plot Y length. More...
 
void updateCharts () throws ModelException
 Redraws all the charts currently open for this detailed output file. More...
 
void addSpeciesName (String sName)
 Adds a species name to the end of the species name list. More...
 
DetailedTreeSettings createNewTreeSettings (String sSpeciesName, int iType, int iDeadCode) throws ModelException
 Creates a new DetailedTreeSettings object and adds it to the tree settings vector. More...
 
DetailedGridSettings createNewGridSettings (String sGridName)
 Creates a new DetailedGridSettings object and adds it to the grid settings vector. More...
 
void addGridXCellLength (String sGridName, float fLength)
 Adds the X cell length to grid settings. More...
 
void addGridYCellLength (String sGridName, float fLength)
 Adds the Y cell length to grid settings. More...
 
int getNumberOfSpecies ()
 Gets the number of species that exist in the detailed output header file. More...
 
int getNumberOfTypes ()
 Gets the number of tree types. More...
 
int getSpeciesCodeFromName (String sName) throws ModelException
 When passed the name of a species, will give back the corresponding species number code. More...
 
String getSpeciesNameFromCode (int iIndex) throws ModelException
 When passed the index of a species, will give back the corresponding species name. More...
 
void readFile (int iTimestep) throws ModelException
 Read the detailed output file for a particular timestep. More...
 
boolean wantAnyTreeFloats ()
 Whether or not any open data requests want any tree float data members. More...
 
boolean wantAnyDeadTreeFloats ()
 Whether or not any open data requests want any dead tree float data members. More...
 
boolean wantAnyGridFloats ()
 Whether or not any open data requests want any grid float data members. More...
 
boolean wantAnyGridPackageFloats ()
 Whether or not any open data requests want any grid package float data members. More...
 
boolean wantAnyTreeInts ()
 Whether or not any open data requests want any tree int data members. More...
 
boolean wantAnyDeadTreeInts ()
 Whether or not any open data requests want any dead tree int data members. More...
 
boolean wantAnyGridInts ()
 Whether or not any open data requests want any grid int data members. More...
 
boolean wantAnyGridPackageInts ()
 Whether or not any open data requests want any grid package int data members. More...
 
boolean wantAnyTreeChars ()
 Whether or not any open data requests want any tree char data members. More...
 
boolean wantAnyDeadTreeChars ()
 Whether or not any open data requests want any dead tree char data members. More...
 
boolean wantAnyGridChars ()
 Whether or not any open data requests want any grid char data members. More...
 
boolean wantAnyGridPackageChars ()
 Whether or not any open data requests want any grid package char data members. More...
 
boolean wantAnyTreeBools ()
 Whether or not any open data requests want any tree bool data members. More...
 
boolean wantAnyDeadTreeBools ()
 Whether or not any open data requests want any dead tree bool data members. More...
 
boolean wantAnyGridBools ()
 Whether or not any open data requests want any grid bool data members. More...
 
boolean wantAnyGridPackageBools ()
 Whether or not any open data requests want any grid package bool data members. More...
 
void addTreeFloatData (int iSpecies, int iType, int iCode, float fVal) throws SAXException
 Accepts a piece of tree float data from the parser and passes it on to open data requests. More...
 
void addDeadTreeFloatData (int iSpecies, int iType, int iCode, int iDeadCode, float fVal) throws SAXException
 Accepts a piece of dead tree float data from the parser and passes it on to open data requests. More...
 
void addGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal) throws SAXException
 Accepts a piece of grid float data from the parser and passes it on to open data requests. More...
 
void addGridPackageFloatData (String sGridName, int iX, int iY, int iCode, float fVal) throws SAXException
 Accepts a piece of grid package float data from the parser and passes it on to open data requests. More...
 
void addTreeIntData (int iSpecies, int iType, int iCode, int iVal) throws SAXException
 Accepts a piece of tree int data from the parser and passes it on to open data requests. More...
 
void addDeadTreeIntData (int iSpecies, int iType, int iCode, int iDeadCode, int iVal) throws SAXException
 Accepts a piece of dead tree int data from the parser and passes it on to open data requests. More...
 
void addGridIntData (String sGridName, int iX, int iY, int iCode, int iVal) throws SAXException
 Accepts a piece of grid int data from the parser and passes it on to open data requests. More...
 
void addGridPackageIntData (String sGridName, int iX, int iY, int iCode, int iVal) throws SAXException
 Accepts a piece of grid package int data from the parser and passes it on to open data requests. More...
 
void addTreeCharData (int iSpecies, int iType, int iCode, String sVal) throws SAXException
 Accepts a piece of tree char data from the parser and passes it on to open data requests. More...
 
void addDeadTreeCharData (int iSpecies, int iType, int iCode, int iDeadCode, String sVal) throws SAXException
 Accepts a piece of dead tree char data from the parser and passes it on to open data requests. More...
 
void addGridCharData (String sGridName, int iX, int iY, int iCode, String sVal) throws SAXException
 Accepts a piece of grid char data from the parser and passes it on to open data requests. More...
 
void addGridPackageCharData (String sGridName, int iX, int iY, int iCode, String sVal) throws SAXException
 Accepts a piece of grid package char data from the parser and passes it on to open data requests. More...
 
void addTreeBoolData (int iSpecies, int iType, int iCode, boolean bVal) throws SAXException
 Accepts a piece of tree bool data from the parser to pass on to open data requests. More...
 
void addDeadTreeBoolData (int iSpecies, int iType, int iCode, int iDeadCode, boolean bVal) throws SAXException
 Accepts a piece of dead tree bool data from the parser to pass on to open data requests. More...
 
void addGridBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal) throws SAXException
 Accepts a piece of grid bool data from the parser to pass on to open data requests. More...
 
void addGridPackageBoolData (String sGridName, int iX, int iY, int iCode, boolean bVal) throws SAXException
 Accepts a piece of grid package bool data from the parser to pass on to open data requests. More...
 
void addTreeFloatDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree float data member code from the parser to pass on to open data requests. More...
 
void addGridFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid float data member code from the parser to pass on to open data requests. More...
 
void addGridPackageFloatDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package float data member code from the parser to pass on to open data requests. More...
 
void addTreeIntDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts an int data member code from the parser to pass on to open data requests. More...
 
void addGridIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts an int data member code from the parser to pass on to open data requests. More...
 
void addGridPackageIntDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package int data member code from the parser to pass on to open data requests. More...
 
void addTreeCharDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree char data member code from the parser to pass on to open data requests. More...
 
void addGridCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid char data member code from the parser to pass on to open data requests. More...
 
void addGridPackageCharDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package char data member code from the parser to pass on to open data requests. More...
 
void addTreeBoolDataMemberCode (int iSpecies, int iType, String sLabel, int iCode) throws SAXException
 Accepts a tree bool data member code from the parser to pass on to open data requests. More...
 
void addGridBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid bool data member code from the parser to pass on to open data requests. More...
 
void addGridPackageBoolDataMemberCode (String sGridName, String sLabel, int iCode) throws SAXException
 Accepts a grid package bool data member code from the parser to pass on to open data requests. More...
 
void endPackage () throws SAXException
 Notifies all open data requests that a new package has ended. More...
 
void endTree () throws SAXException
 Notifies all open data requests that a tree record has ended. More...
 
int getNumberTreeSettings ()
 Get the total number of detailed tree settings. More...
 
DetailedTreeSettings getTreeSetting (int i)
 Access a detailed tree output settings record. More...
 
float getGridXCellLength (String sGridName)
 Gets the length of X cells for a grid. More...
 
float getGridYCellLength (String sGridName)
 Gets the length of Y cells for a grid. More...
 
void cleanUp () throws ModelException
 Deletes all files from the tarball in the temp folder. More...
 
void addSubplotCell (int iX, int iY)
 Adds one of the cells of this subplot. More...
 
void addChartForBatchExtraction (String sGraphName) throws ModelException
 
- Public Member Functions inherited from sortie.datavisualizer.DataFileManager
Legend getLegend ()
 Get the legend for this file. More...
 
int getNumberOpenCharts ()
 Gets the number of open charts for this file. More...
 
void closeAllCharts ()
 Closes all the open charts for this window. More...
 
void cleanUp () throws ModelException
 Any clean-up tasks that must be done can be put here. More...
 
 DataFileManager (DataVisualizerManager oManager, String sFileName)
 Constructor. More...
 
String getFileName ()
 Gets the file being managed. More...
 
abstract JPopupMenu getLineGraphOptions (ActionListener sActionListener)
 Gets a list of the line graphs this object is capable of drawing. More...
 
abstract JPopupMenu getMapOptions (ActionListener sActionListener)
 Gets a list of maps this object is capable of drawing. More...
 
abstract JPopupMenu getHistogramOptions (ActionListener sActionListener)
 Gets a list of histograms this object is capable of drawing. More...
 
abstract JPopupMenu getTableOptions (ActionListener sActionListener)
 Gets a list of tables this object is capable of drawing. More...
 
JInternalFrame createNewChart (String sGraphName) throws ModelException
 Creates a requested chart as a JInternalFrame. More...
 
abstract void updateCharts () throws ModelException
 Prompts the redrawing of all open charts. More...
 
abstract void updateCurrentRunCharts () throws ModelException
 Prompts the redrawing of open charts for the current run. More...
 

Static Public Member Functions

static JPanel getOptionsPanel (String sGraphName) throws ModelException
 

Private Member Functions

ArrayList< String > getMenuOptions (MenuElement jMenu)
 Recursively add all the elements of a menu and its sub menus to an array of strings. More...
 
void countTimesteps () throws ModelException
 Counts the number of timesteps in the tarball and places it in m_iNumTimesteps. More...
 
void parseParamFile () throws ModelException
 Parses the parameter file portion of the tarball. More...
 
DataRequest interpretGraphName (String sGraphName) throws ModelException
 Matches a graph name to a data request class and returns an instance of the appropriate class. More...
 

Private Attributes

ArrayList< DataRequestmp_oDataRequests = new ArrayList<DataRequest>(0)
 The collection of all data requests currently open. More...
 
ArrayList< String > mp_sSpeciesNames = new ArrayList<String>(0)
 Species names - the order determines the species codes. More...
 
ArrayList< DetailedTreeSettingsmp_oTreeSettings = new ArrayList<DetailedTreeSettings>(0)
 Collection of DetailedTreeSettings objects. More...
 
ArrayList< DetailedGridSettingsmp_oGridSettings = new ArrayList<DetailedGridSettings>(0)
 Collection of DetailedGridSettings objects. More...
 
boolean [] mp_bHistogramIsFloat
 Whether each histogram option is float (true) or int (false) More...
 
String [] mp_sHistogramNames
 Histogram names - so we can figure out which value in mp_bHistogramIsFloat value to use. More...
 
String [] mp_sMapNames
 All the map names, so we can quickly check if an option is valid. More...
 
String [] mp_sTableNames
 All the table names, so we can quickly check if an option is valid. More...
 
String [] mp_sLineGraphNames
 All the line graph names, so we can quickly check if an option is valid. More...
 
int [] mp_iDeadCodes
 Dead reason codes for each tree data member. More...
 
String m_sShortFileDisplayName
 Display string of filename - should have the last 40 chars. More...
 
String m_sLongFileDisplayName
 Display string of filename - should have the last 90 chars. More...
 
XMLReader m_oParser
 File parser. More...
 
String m_sTempRoot
 Root directory to put temp files. More...
 
float m_fPlotArea = 0
 Area of plot (or subplot) in hectares. More...
 
int m_iNumTimesteps
 Number of actual timesteps of data. More...
 
boolean m_bBatchMode = false
 Whether not this is working in the context of batch output extraction. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sortie.datavisualizer.DataFileManager
abstract JInternalFrame drawChart (String sGraphName) throws ModelException
 Creates a requested chart as a JInternalFrame. More...
 
- Protected Attributes inherited from sortie.datavisualizer.DataFileManager
DataVisualizerManager m_oManager
 Manager object. More...
 
String m_sFilename
 File under management. More...
 
ArrayList< JInternalFrame > mp_oCharts = new ArrayList<JInternalFrame>(0)
 All charts under management. More...
 
Legend m_oLegend
 The legend for this file. More...
 
String [] mp_sDeadCodeNames = new String[OutputBehaviors.NUMCODES]
 Text equivalents of dead codes. More...
 

Detailed Description

Controls the data visualization for a single detailed output file.

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

Author
Lora E. Murphy
Version
1.3


Edit history:
---------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)

Constructor & Destructor Documentation

◆ DetailedOutputFileManager()

sortie.datavisualizer.DetailedOutputFileManager.DetailedOutputFileManager ( DataVisualizerManager  oManager,
String  sTarball 
) throws ModelException

Constructor.

Parameters
oManagerData file manager.
sTarballDetailed output file to manage.
Exceptions
ModelExceptionIf there was a problem reading the file.

Member Function Documentation

◆ addBatchData()

void sortie.datavisualizer.DetailedOutputFileManager.addBatchData ( ChartInfo  oInfo) throws ModelException

Adds a new item to the data request list.

This is the same as drawChart but does not actually open or draw a chart. This will verify that the option is possible for this file before adding it. No file parsing is triggered.

Parameters
oInfoInfo for chart to draw.
Exceptions
ModelExceptionIf anything goes wrong.

◆ addChartForBatchExtraction()

void sortie.datavisualizer.DetailedOutputFileManager.addChartForBatchExtraction ( String  sGraphName) throws ModelException

◆ addDeadTreeBoolData()

void sortie.datavisualizer.DetailedOutputFileManager.addDeadTreeBoolData ( int  iSpecies,
int  iType,
int  iCode,
int  iDeadCode,
boolean  bVal 
) throws SAXException

Accepts a piece of dead tree bool data from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value and passes it on to open data requests.
iDeadCodeDead code for this tree.
bValValue.

◆ addDeadTreeCharData()

void sortie.datavisualizer.DetailedOutputFileManager.addDeadTreeCharData ( int  iSpecies,
int  iType,
int  iCode,
int  iDeadCode,
String  sVal 
) throws SAXException

Accepts a piece of dead tree char data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
iDeadCodeDead code for this tree.
sValValue.

◆ addDeadTreeFloatData()

void sortie.datavisualizer.DetailedOutputFileManager.addDeadTreeFloatData ( int  iSpecies,
int  iType,
int  iCode,
int  iDeadCode,
float  fVal 
) throws SAXException

Accepts a piece of dead tree float data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
iDeadCodeDead code for this tree.
fValValue.

◆ addDeadTreeIntData()

void sortie.datavisualizer.DetailedOutputFileManager.addDeadTreeIntData ( int  iSpecies,
int  iType,
int  iCode,
int  iDeadCode,
int  iVal 
) throws SAXException

Accepts a piece of dead tree int data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
iDeadCodeDead code for this tree.
iValValue.

◆ addGridBoolData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridBoolData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
boolean  bVal 
) throws SAXException

Accepts a piece of grid bool data from the parser to pass on to open data requests.

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 and passes it on to open data requests.
bValValue.

◆ addGridBoolDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridBoolDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid bool data member code from the parser to pass on to open data requests.

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

◆ addGridCharData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridCharData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
String  sVal 
) throws SAXException

Accepts a piece of grid char data from the parser and passes it on to open data requests.

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.
sValValue.

◆ addGridCharDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridCharDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid char data member code from the parser to pass on to open data requests.

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

◆ addGridFloatData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal 
) throws SAXException

Accepts a piece of grid float data from the parser and passes it on to open data requests.

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.

◆ addGridFloatDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid float data member code from the parser to pass on to open data requests.

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

◆ addGridIntData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridIntData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
int  iVal 
) throws SAXException

Accepts a piece of grid int data from the parser and passes it on to open data requests.

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.
iValValue.

◆ addGridIntDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridIntDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts an int data member code from the parser to pass on to open data requests.

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

◆ addGridPackageBoolData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageBoolData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
boolean  bVal 
) throws SAXException

Accepts a piece of grid package bool data from the parser to pass on to open data requests.

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 and passes it on to open data requests.
bValValue.

◆ addGridPackageBoolDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageBoolDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid package bool data member code from the parser to pass on to open data requests.

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

◆ addGridPackageCharData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageCharData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
String  sVal 
) throws SAXException

Accepts a piece of grid package char data from the parser and passes it on to open data requests.

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.
sValValue.

◆ addGridPackageCharDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageCharDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid package char data member code from the parser to pass on to open data requests.

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

◆ addGridPackageFloatData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal 
) throws SAXException

Accepts a piece of grid package float data from the parser and passes it on to open data requests.

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.

◆ addGridPackageFloatDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid package float data member code from the parser to pass on to open data requests.

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

◆ addGridPackageIntData()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageIntData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
int  iVal 
) throws SAXException

Accepts a piece of grid package int data from the parser and passes it on to open data requests.

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.
iValValue.

◆ addGridPackageIntDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addGridPackageIntDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a grid package int data member code from the parser to pass on to open data requests.

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

◆ addGridXCellLength()

void sortie.datavisualizer.DetailedOutputFileManager.addGridXCellLength ( String  sGridName,
float  fLength 
)

Adds the X cell length to grid settings.

Parameters
sGridNameThe grid name for which to add the cell length.
fLengthThe new X cell length in m.

◆ addGridYCellLength()

void sortie.datavisualizer.DetailedOutputFileManager.addGridYCellLength ( String  sGridName,
float  fLength 
)

Adds the Y cell length to grid settings.

Parameters
sGridNameThe grid name for which to add the cell length.
fLengthThe new Y cell length in m.

◆ addSpeciesName()

void sortie.datavisualizer.DetailedOutputFileManager.addSpeciesName ( String  sName)

Adds a species name to the end of the species name list.

The position within the vector becomes that name's species index code.

Parameters
sNameThe species name to add.

◆ addSubplotCell()

void sortie.datavisualizer.DetailedOutputFileManager.addSubplotCell ( int  iX,
int  iY 
)

Adds one of the cells of this subplot.

This adds the area of the cell to the total, taking into account odd-sized end cells.

Parameters
iXX cell
iYY cell

◆ addTreeBoolData()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeBoolData ( int  iSpecies,
int  iType,
int  iCode,
boolean  bVal 
) throws SAXException

Accepts a piece of tree bool data from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value and passes it on to open data requests.
bValValue.

◆ addTreeBoolDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeBoolDataMemberCode ( int  iSpecies,
int  iType,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a tree bool data member code from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
sLabelThe label of the data member.
iCodeThe data member code.

◆ addTreeCharData()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeCharData ( int  iSpecies,
int  iType,
int  iCode,
String  sVal 
) throws SAXException

Accepts a piece of tree char data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
sValValue.

◆ addTreeCharDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeCharDataMemberCode ( int  iSpecies,
int  iType,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a tree char data member code from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
sLabelThe label of the data member.
iCodeThe data member code.

◆ addTreeFloatData()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeFloatData ( int  iSpecies,
int  iType,
int  iCode,
float  fVal 
) throws SAXException

Accepts a piece of tree float data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
fValValue.

◆ addTreeFloatDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeFloatDataMemberCode ( int  iSpecies,
int  iType,
String  sLabel,
int  iCode 
) throws SAXException

Accepts a tree float data member code from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
sLabelThe label of the data member.
iCodeThe data member code.

◆ addTreeIntData()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeIntData ( int  iSpecies,
int  iType,
int  iCode,
int  iVal 
) throws SAXException

Accepts a piece of tree int data from the parser and passes it on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
iCodeData member code of this value.
iValValue.

◆ addTreeIntDataMemberCode()

void sortie.datavisualizer.DetailedOutputFileManager.addTreeIntDataMemberCode ( int  iSpecies,
int  iType,
String  sLabel,
int  iCode 
) throws SAXException

Accepts an int data member code from the parser to pass on to open data requests.

Parameters
iSpeciesSpecies of the tree from which this value came.
iTypeType of the tree from which this value came.
sLabelThe label of the data member.
iCodeThe data member code.

◆ cleanUp()

void sortie.datavisualizer.DetailedOutputFileManager.cleanUp ( ) throws ModelException

Deletes all files from the tarball in the temp folder.

◆ countTimesteps()

void sortie.datavisualizer.DetailedOutputFileManager.countTimesteps ( ) throws ModelException
private

Counts the number of timesteps in the tarball and places it in m_iNumTimesteps.

The value is found by counting the number of files. The number of timesteps is the number of files - 2 (for the parameter file and initial conditions). This is compared to the number of timesteps found in the header file and the lesser one is chosen.

Exceptions
ModelException- wrapping other exceptions

◆ createNewGridSettings()

DetailedGridSettings sortie.datavisualizer.DetailedOutputFileManager.createNewGridSettings ( String  sGridName)

Creates a new DetailedGridSettings object and adds it to the grid settings vector.

Parameters
sGridNameThe grid name string
Returns
The new object created

◆ createNewTreeSettings()

DetailedTreeSettings sortie.datavisualizer.DetailedOutputFileManager.createNewTreeSettings ( String  sSpeciesName,
int  iType,
int  iDeadCode 
) throws ModelException

Creates a new DetailedTreeSettings object and adds it to the tree settings vector.

Parameters
sSpeciesNameThe species name string
iTypeThe type number
iDeadCodeDead code for tree settings.
Returns
The new object created
Exceptions
ModelExceptionif either the type or the species name is invalid.

◆ doBatchExtraction()

void sortie.datavisualizer.DetailedOutputFileManager.doBatchExtraction ( ) throws ModelException

Does batch data extraction of all data requests.

◆ drawChart()

JInternalFrame sortie.datavisualizer.DetailedOutputFileManager.drawChart ( String  sGraphName) throws ModelException

Handles the request to draw a chart for this file.

The request will be passed on to an appropriate DataRequest object. If the chart is already open, the open chart will be returned.

Parameters
sGraphNameName of chart to draw.
Returns
The drawn chart, or NULL if it could not be drawn.
Exceptions
ModelExceptionIf anything goes wrong.

◆ endPackage()

void sortie.datavisualizer.DetailedOutputFileManager.endPackage ( ) throws SAXException

Notifies all open data requests that a new package has ended.

◆ endTree()

void sortie.datavisualizer.DetailedOutputFileManager.endTree ( ) throws SAXException

Notifies all open data requests that a tree record has ended.

◆ getGridXCellLength()

float sortie.datavisualizer.DetailedOutputFileManager.getGridXCellLength ( String  sGridName)

Gets the length of X cells for a grid.

Parameters
sGridNameGrid for which to get the X cell length.
Returns
The X cell length, in m, or 0 if the grid is not recognized.

◆ getGridYCellLength()

float sortie.datavisualizer.DetailedOutputFileManager.getGridYCellLength ( String  sGridName)

Gets the length of Y cells for a grid.

Parameters
sGridNameGrid for which to get the Y cell length.
Returns
The Y cell length, in m, or 0 if the grid is not recognized.

◆ getHistogramOptions()

JPopupMenu sortie.datavisualizer.DetailedOutputFileManager.getHistogramOptions ( ActionListener  sActionListener)

Gets the histograms that can be drawn for this file.

Returns
String of tables, or NULL if no histograms can be drawn.

◆ getLineGraphOptions()

JPopupMenu sortie.datavisualizer.DetailedOutputFileManager.getLineGraphOptions ( ActionListener  sActionListener)

Gets the line graphs that can be drawn for this file.

Returns
JPopupMenu of tables, or NULL if no line graphs can be drawn.

◆ getMapOptions()

JPopupMenu sortie.datavisualizer.DetailedOutputFileManager.getMapOptions ( ActionListener  sActionListener)

Gets the maps that can be drawn for this file.

Returns
JPopupMenu of maps, or NULL if no maps can be drawn.

◆ getMenuOptions()

ArrayList<String> sortie.datavisualizer.DetailedOutputFileManager.getMenuOptions ( MenuElement  jMenu)
private

Recursively add all the elements of a menu and its sub menus to an array of strings.

Parameters
jMenuMenu to analyze
Returns
Array of strings, one for each menu item (sub menu names are skipped)

◆ getNumberOfActualTimesteps()

int sortie.datavisualizer.DetailedOutputFileManager.getNumberOfActualTimesteps ( )

Gets the number of actual data timesteps contained in this detailed output file (as opposed to how many the par file says there are).

Returns
int Number of timesteps for this detailed output file.

◆ getNumberOfSpecies()

int sortie.datavisualizer.DetailedOutputFileManager.getNumberOfSpecies ( )

Gets the number of species that exist in the detailed output header file.

Returns
The number of species.

◆ getNumberOfTypes()

int sortie.datavisualizer.DetailedOutputFileManager.getNumberOfTypes ( )

Gets the number of tree types.

Returns
The number of types.

◆ getNumberOfYearsPerTimestep()

float sortie.datavisualizer.DetailedOutputFileManager.getNumberOfYearsPerTimestep ( )

Gets the number of years per timestep.

Returns
Number of years per timestep.

◆ getNumberTreeSettings()

int sortie.datavisualizer.DetailedOutputFileManager.getNumberTreeSettings ( )

Get the total number of detailed tree settings.

Returns
the total number of detailed tree settings.

◆ getOptionsPanel()

static JPanel sortie.datavisualizer.DetailedOutputFileManager.getOptionsPanel ( String  sGraphName) throws ModelException
static

◆ getPlotArea()

float sortie.datavisualizer.DetailedOutputFileManager.getPlotArea ( )

Gets the area of this plot or subplot, in ha.

Returns
Plot area in ha.

◆ getSpeciesCodeFromName()

int sortie.datavisualizer.DetailedOutputFileManager.getSpeciesCodeFromName ( String  sName) throws ModelException

When passed the name of a species, will give back the corresponding species number code.

Parameters
sNameThe name of the species.
Returns
The code.
Exceptions
ModelExceptionif the name is not recognized.

◆ getSpeciesNameFromCode()

String sortie.datavisualizer.DetailedOutputFileManager.getSpeciesNameFromCode ( int  iIndex) throws ModelException

When passed the index of a species, will give back the corresponding species name.

Parameters
iIndexSpecies index.
Returns
Species name.
Exceptions
ModelExceptionif the index is unrecognized.

◆ getTableOptions()

JPopupMenu sortie.datavisualizer.DetailedOutputFileManager.getTableOptions ( ActionListener  sActionListener)

Gets the tables that can be drawn for this file.

Returns
String of tables, or NULL if no tables can be drawn.

◆ getTreeSetting()

DetailedTreeSettings sortie.datavisualizer.DetailedOutputFileManager.getTreeSetting ( int  i)

Access a detailed tree output settings record.

Parameters
iIndex of the desired record.
Returns
The record at position i.

◆ getXPlotLength()

float sortie.datavisualizer.DetailedOutputFileManager.getXPlotLength ( )

Gets the plot X length.

Returns
Plot X length, in meters.

◆ getYPlotLength()

float sortie.datavisualizer.DetailedOutputFileManager.getYPlotLength ( )

Gets the plot Y length.

Returns
Plot Y length, in meters.

◆ interpretGraphName()

DataRequest sortie.datavisualizer.DetailedOutputFileManager.interpretGraphName ( String  sGraphName) throws ModelException
private

Matches a graph name to a data request class and returns an instance of the appropriate class.

Parameters
sGraphNameGraph name.
Returns
New instance of the data request class that corresponds to the graph name.
Exceptions
ModelExceptionPassed through from created objects.

◆ isThisSubplot()

boolean sortie.datavisualizer.DetailedOutputFileManager.isThisSubplot ( String  sSubplotName)

Checks to see if a subplot name indicates that the detailed output file being managed is in fact for that subplot.

If it were, the subplot name would be the last part of the tarball name preceded by an underscore.

Parameters
sSubplotNameName of possible subplot for this file.
Returns
True if this is a subplot with that name, false otherwise.

◆ parseParamFile()

void sortie.datavisualizer.DetailedOutputFileManager.parseParamFile ( ) throws ModelException
private

Parses the parameter file portion of the tarball.

This function parses the detailed output header file to find species information and tree setup information.

Exceptions
ModelExceptionif the file cannot be parsed.

◆ readFile()

void sortie.datavisualizer.DetailedOutputFileManager.readFile ( int  iTimestep) throws ModelException

Read the detailed output file for a particular timestep.

Parameters
iTimestepTimestep for which to read the file.
Exceptions
ModelExceptionIf the file cannot be read.

◆ setNumberOfYearsPerTimestep()

void sortie.datavisualizer.DetailedOutputFileManager.setNumberOfYearsPerTimestep ( float  f)

Sets the number of years per timestep.

Parameters
fNumber of years per timestep.

◆ setParFileTimesteps()

void sortie.datavisualizer.DetailedOutputFileManager.setParFileTimesteps ( int  i)

Sets the number of timesteps for the detailed output file parameter file.

Parameters
iNumber of timesteps.

◆ setSubplotXCellLength()

void sortie.datavisualizer.DetailedOutputFileManager.setSubplotXCellLength ( float  f)

Sets the subplot X cell length.

Parameters
fX cell length, in m.

◆ setSubplotYCellLength()

void sortie.datavisualizer.DetailedOutputFileManager.setSubplotYCellLength ( float  f)

Sets the subplot Y cell length.

Parameters
fY cell length, in m.

◆ setXPlotLength()

void sortie.datavisualizer.DetailedOutputFileManager.setXPlotLength ( float  f)

Sets the plot X length.

Parameters
fPlot X length, in meters.

◆ setYPlotLength()

void sortie.datavisualizer.DetailedOutputFileManager.setYPlotLength ( float  f)

Sets the plot Y length.

Parameters
fPlot Y length, in meters.

◆ updateCharts()

void sortie.datavisualizer.DetailedOutputFileManager.updateCharts ( ) throws ModelException

Redraws all the charts currently open for this detailed output file.

This is accomplished by sending an UpdateChart() call to each data request object.

Exceptions
ModelExceptionwrapping another exception.

◆ updateCurrentRunCharts()

void sortie.datavisualizer.DetailedOutputFileManager.updateCurrentRunCharts ( ) throws ModelException

Updates charts for a current run.

This re-inflates the tarball and gets the last timestep file for parsing and processing.

Exceptions
ModelExceptionif there is a problem reading the file or drawing the charts.

◆ wantAnyDeadTreeBools()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyDeadTreeBools ( )

Whether or not any open data requests want any dead tree bool data members.

Returns
True if bool data members are desired, false if not.

◆ wantAnyDeadTreeChars()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyDeadTreeChars ( )

Whether or not any open data requests want any dead tree char data members.

Returns
True if char data members are desired, false if not.

◆ wantAnyDeadTreeFloats()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyDeadTreeFloats ( )

Whether or not any open data requests want any dead tree float data members.

Returns
True if float data members are desired, false if not.

◆ wantAnyDeadTreeInts()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyDeadTreeInts ( )

Whether or not any open data requests want any dead tree int data members.

Returns
True if int data members are desired, false if not.

◆ wantAnyGridBools()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridBools ( )

Whether or not any open data requests want any grid bool data members.

Returns
True if bool data members are desired, false if not.

◆ wantAnyGridChars()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridChars ( )

Whether or not any open data requests want any grid char data members.

Returns
True if char data members are desired, false if not.

◆ wantAnyGridFloats()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridFloats ( )

Whether or not any open data requests want any grid float data members.

Returns
True if float data members are desired, false if not.

◆ wantAnyGridInts()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridInts ( )

Whether or not any open data requests want any grid int data members.

Returns
True if int data members are desired, false if not.

◆ wantAnyGridPackageBools()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridPackageBools ( )

Whether or not any open data requests want any grid package bool data members.

Returns
True if bool data members are desired, false if not.

◆ wantAnyGridPackageChars()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridPackageChars ( )

Whether or not any open data requests want any grid package char data members.

Returns
True if char data members are desired, false if not.

◆ wantAnyGridPackageFloats()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridPackageFloats ( )

Whether or not any open data requests want any grid package float data members.

Returns
True if float data members are desired, false if not.

◆ wantAnyGridPackageInts()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyGridPackageInts ( )

Whether or not any open data requests want any grid package int data members.

Returns
True if int data members are desired, false if not.

◆ wantAnyTreeBools()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyTreeBools ( )

Whether or not any open data requests want any tree bool data members.

Returns
True if bool data members are desired, false if not.

◆ wantAnyTreeChars()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyTreeChars ( )

Whether or not any open data requests want any tree char data members.

Returns
True if char data members are desired, false if not.

◆ wantAnyTreeFloats()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyTreeFloats ( )

Whether or not any open data requests want any tree float data members.

Returns
True if float data members are desired, false if not.

◆ wantAnyTreeInts()

boolean sortie.datavisualizer.DetailedOutputFileManager.wantAnyTreeInts ( )

Whether or not any open data requests want any tree int data members.

Returns
True if int data members are desired, false if not.

Member Data Documentation

◆ m_bBatchMode

boolean sortie.datavisualizer.DetailedOutputFileManager.m_bBatchMode = false
private

Whether not this is working in the context of batch output extraction.

◆ m_fPlotArea

float sortie.datavisualizer.DetailedOutputFileManager.m_fPlotArea = 0
private

Area of plot (or subplot) in hectares.

◆ m_iNumTimesteps

int sortie.datavisualizer.DetailedOutputFileManager.m_iNumTimesteps
private

Number of actual timesteps of data.

◆ m_oParser

XMLReader sortie.datavisualizer.DetailedOutputFileManager.m_oParser
private

File parser.

◆ m_sLongFileDisplayName

String sortie.datavisualizer.DetailedOutputFileManager.m_sLongFileDisplayName
private

Display string of filename - should have the last 90 chars.

◆ m_sShortFileDisplayName

String sortie.datavisualizer.DetailedOutputFileManager.m_sShortFileDisplayName
private

Display string of filename - should have the last 40 chars.

◆ m_sTempRoot

String sortie.datavisualizer.DetailedOutputFileManager.m_sTempRoot
private

Root directory to put temp files.

◆ mp_bHistogramIsFloat

boolean [] sortie.datavisualizer.DetailedOutputFileManager.mp_bHistogramIsFloat
private

Whether each histogram option is float (true) or int (false)

◆ mp_iDeadCodes

int [] sortie.datavisualizer.DetailedOutputFileManager.mp_iDeadCodes
private

Dead reason codes for each tree data member.

◆ mp_oDataRequests

ArrayList<DataRequest> sortie.datavisualizer.DetailedOutputFileManager.mp_oDataRequests = new ArrayList<DataRequest>(0)
private

The collection of all data requests currently open.

◆ mp_oGridSettings

ArrayList<DetailedGridSettings> sortie.datavisualizer.DetailedOutputFileManager.mp_oGridSettings = new ArrayList<DetailedGridSettings>(0)
private

Collection of DetailedGridSettings objects.

◆ mp_oTreeSettings

ArrayList<DetailedTreeSettings> sortie.datavisualizer.DetailedOutputFileManager.mp_oTreeSettings = new ArrayList<DetailedTreeSettings>(0)
private

Collection of DetailedTreeSettings objects.

◆ mp_sHistogramNames

String [] sortie.datavisualizer.DetailedOutputFileManager.mp_sHistogramNames
private

Histogram names - so we can figure out which value in mp_bHistogramIsFloat value to use.

◆ mp_sLineGraphNames

String [] sortie.datavisualizer.DetailedOutputFileManager.mp_sLineGraphNames
private

All the line graph names, so we can quickly check if an option is valid.

◆ mp_sMapNames

String [] sortie.datavisualizer.DetailedOutputFileManager.mp_sMapNames
private

All the map names, so we can quickly check if an option is valid.

◆ mp_sSpeciesNames

ArrayList<String> sortie.datavisualizer.DetailedOutputFileManager.mp_sSpeciesNames = new ArrayList<String>(0)
private

Species names - the order determines the species codes.

◆ mp_sTableNames

String [] sortie.datavisualizer.DetailedOutputFileManager.mp_sTableNames
private

All the table names, so we can quickly check if an option is valid.


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