datavisualizer.DetailedOutputTimestepParseHandler Class Reference

An object of this class will parse detailed output timestep files and pass the data to a DetailedOutputFileManager object. More...

Inherits org::xml::sax::helpers::DefaultHandler.

List of all members.

Public Member Functions

 DetailedOutputTimestepParseHandler (DetailedOutputFileManager oData)
 Constructor.
void startElement (java.lang.String sURI, java.lang.String sLocalName, java.lang.String sQName, Attributes oAttributes) throws SAXException
 Called when the parser hits a new opening tag.
void endElement (java.lang.String sURI, java.lang.String sLocalName, java.lang.String sQName) throws SAXException
 Feeds accumulated character data.
void characters (char[] ch, int start, int length) throws SAXException
 Reads character data from the XML file and appends it to the buffer.

Private Attributes

DetailedOutputFileManager m_oData
 Parent detailed output file manager.
StringBuffer m_sBuf
 String buffer for collecting character data.
String m_sDataMemberLabel
 Data member label.
String m_sGridName = ""
 Grid name.
int m_iSpecies
 Tree species.
int m_iType
 Tree type.
int m_iDeadCode
 Dead reason code.
int m_iDataMemberCode
 Data member code.
int m_iX
 Grid cell X number.
int m_iY
 Grid cell Y number.
boolean m_bIsGridXCellLength
 Indicates the data just parsed is the X length of grid cells.
boolean m_bIsGridYCellLength
 Indicates the data just parsed is the Y length of grid cells.
boolean m_bIsFloatCode
 Indicates the data just parsed is the code for a float data member.
boolean m_bIsIntCode
 Indicates the data just parsed is the code for an int data member.
boolean m_bIsCharCode
 Indicates the data just parsed is the code for a char data member.
boolean m_bIsBoolCode
 Indicates the data just parsed is the code for a bool data member.
boolean m_bIsFloatData
 Indicates the data just parsed is float data.
boolean m_bIsIntData
 Indicates the data just parsed is int data.
boolean m_bIsCharData
 Indicates the data just parsed is char data.
boolean m_bIsBoolData
 Indicates the data just parsed is bool data.
boolean m_bIsDeadFloatData
 Indicates the data just parsed is dead float data.
boolean m_bIsDeadIntData
 Indicates the data just parsed is dead int data.
boolean m_bIsDeadCharData
 Indicates the data just parsed is dead char data.
boolean m_bIsDeadBoolData
 Indicates the data just parsed is dead bool data.
boolean m_bWantsTreeFloat
 Indicates whether any other object wants tree float values.
boolean m_bWantsTreeInt
 Indicates whether any other object wants tree int values.
boolean m_bWantsTreeChar
 Indicates whether any other object wants tree char values.
boolean m_bWantsTreeBool
 Indicates whether any other object wants tree bool values.
boolean m_bWantsDeadTreeFloat
 Indicates whether any other object wants dead tree float values.
boolean m_bWantsDeadTreeInt
 Indicates whether any other object wants dead tree int values.
boolean m_bWantsDeadTreeChar
 Indicates whether any other object wants dead tree char values.
boolean m_bWantsDeadTreeBool
 Indicates whether any other object wants dead tree bool values.
boolean m_bWantsGridFloat
 Indicates whether any other object wants grid float values.
boolean m_bWantsGridInt
 Indicates whether any other object wants grid int values.
boolean m_bWantsGridChar
 Indicates whether any other object wants grid char values.
boolean m_bWantsGridBool
 Indicates whether any other object wants grid bool values.
boolean m_bWantsGridPackageFloat
 Indicates whether any other object wants grid package float values.
boolean m_bWantsGridPackageInt
 Indicates whether any other object wants grid package int values.
boolean m_bWantsGridPackageChar
 Indicates whether any other object wants grid package char values.
boolean m_bWantsGridPackageBool
 Indicates whether any other object wants grid package bool values.
boolean m_bIsPackage
 Indicates that these are grid package values.


Detailed Description

An object of this class will parse detailed output timestep files and pass the data to a DetailedOutputFileManager object.

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)
March 21, 2005: Fixed bug so we can differentiate between package and non-package grid data members (LEM)
March 20, 2006: Added grid package data parsing (LEM)
March 3, 2011: Added support for dead trees (LEM)

Constructor & Destructor Documentation

datavisualizer.DetailedOutputTimestepParseHandler.DetailedOutputTimestepParseHandler ( DetailedOutputFileManager  oData  ) 

Constructor.

Parameters:
oData Parent detailed output file manager.


Member Function Documentation

void datavisualizer.DetailedOutputTimestepParseHandler.startElement ( java.lang.String  sURI,
java.lang.String  sLocalName,
java.lang.String  sQName,
Attributes  oAttributes 
) throws SAXException

Called when the parser hits a new opening tag.

This is overridden from the base class. This function is interested in the following tags:

Tree settings information:

  • tm_treeSettings - the species and type are saved.
  • tm_floatCode - the label is extracted and m_bIsFloatCode and m_bIsSettings are set to true.
  • tm_intCode - the label is extracted and m_bIsIntCode and m_bIsSettings are set to true.
  • tm_charCode - the label is extracted and m_bIsCharCode and m_bIsSettings are set to true.
  • tm_boolCode - the label is extracted and m_bIsBoolCode and m_bIsSettings are set to true.
Tree data:
  • tree - the species and type are extracted and set in m_iSpecies and m_iType.
  • fl - m_bWantsTreeFloat is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • int - m_bWantsTreeInt is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • ch - m_bWantsTreeChar is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • bl - m_bWantsTreeBool is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • ghost - the species, type, and dead code are extracted and set in m_iSpecies, m_iType, and m_iDeadCode.
  • gfl - m_bWantsDeadTreeFloat is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • gint - m_bWantsDeadTreeInt is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • gch - m_bWantsDeadTreeChar is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • gbl - m_bWantsDeadTreeBool is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.

Grid settings information:

  • grid - m_sGridName is set.
  • ma_floatCode - the label is extracted and m_bIsFloatCode and m_bIsSettings are set to true.
  • ma_intCode - the label is extracted and m_bIsIntCode and m_bIsSettings are set to true.
  • ma_charCode - the label is extracted and m_bIsCharCode and m_bIsSettings are set to true.
  • ma_boolCode - the label is extracted and m_bIsBoolCode and m_bIsSettings are set to true.
  • Something starting with "ma_package" - m_bIsPackage is set to true.

Grid data:

  • ma_v - m_iX and m_iY is extracted from the attributes.
  • fl - m_bWantsGridFloat is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • int - m_bWantsGridInt is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • ch - m_bWantsGridChar is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • bl - m_bWantsGridBool is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • pfl - m_bWantsGridPackageFloat is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • pint - m_bWantsGridPackageInt is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • pch - m_bWantsGridPackageChar is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • pbl - m_bWantsGridPackageBool is checked. If true, the data member code is extracted from the attributes and placed in m_sDataMemberLabel.
  • ma_lengthXCells - m_bIsGridXCellLength is set to true.
  • ma_lengthYCells - m_bIsGridYCellLength is set to true.
  • pkg - m_bIsPackage is set to true.
Parameters:
sURI the Namespace URI (ignored)
sLocalName the local name (what this function looks at)
sQName the qualified (prefixed) name (ignored)
oAttributes The tag's oAttributes
Exceptions:
SAXException if there are any problems.

void datavisualizer.DetailedOutputTimestepParseHandler.endElement ( java.lang.String  sURI,
java.lang.String  sLocalName,
java.lang.String  sQName 
) throws SAXException

Feeds accumulated character data.

Whether or not the data is ignored, and what is done with it if it is not ignored, depends on flags that have been set.

Parameters:
sURI the Namespace URI (ignored)
sLocalName the local name (what this function looks at)
sQName the qualified (prefixed) name (ignored)
Exceptions:
SAXException if there are any problems.

void datavisualizer.DetailedOutputTimestepParseHandler.characters ( char[]  ch,
int  start,
int  length 
) throws SAXException

Reads character data from the XML file and appends it to the buffer.

The parser can call this multiple times per tag.

Parameters:
ch The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Exceptions:
SAXException if any of the described cases above is true.


Member Data Documentation

Parent detailed output file manager.

String buffer for collecting character data.

Data member label.

Grid name.

Tree species.

Tree type.

Dead reason code.

Data member code.

Grid cell X number.

Grid cell Y number.

Indicates the data just parsed is the X length of grid cells.

Indicates the data just parsed is the Y length of grid cells.

Indicates the data just parsed is the code for a float data member.

Indicates the data just parsed is the code for an int data member.

Indicates the data just parsed is the code for a char data member.

Indicates the data just parsed is the code for a bool data member.

Indicates the data just parsed is float data.

Indicates the data just parsed is int data.

Indicates the data just parsed is char data.

Indicates the data just parsed is bool data.

Indicates the data just parsed is dead float data.

Indicates the data just parsed is dead int data.

Indicates the data just parsed is dead char data.

Indicates the data just parsed is dead bool data.

Indicates whether any other object wants tree float values.

Indicates whether any other object wants tree int values.

Indicates whether any other object wants tree char values.

Indicates whether any other object wants tree bool values.

Indicates whether any other object wants dead tree float values.

Indicates whether any other object wants dead tree int values.

Indicates whether any other object wants dead tree char values.

Indicates whether any other object wants dead tree bool values.

Indicates whether any other object wants grid float values.

Indicates whether any other object wants grid int values.

Indicates whether any other object wants grid char values.

Indicates whether any other object wants grid bool values.

Indicates whether any other object wants grid package float values.

Indicates whether any other object wants grid package int values.

Indicates whether any other object wants grid package char values.

Indicates whether any other object wants grid package bool values.

Indicates that these are grid package values.


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

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