datavisualizer::DetailedOutputTimestepParseHandler Class Reference

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

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_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.Indicates the data just parsed is int data.
boolean m_bIsIntData
 Indicates the data just parsed is char data.
boolean m_bIsCharData
 Indicates the data just parsed is bool data.
boolean m_bIsBoolData
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_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)


Constructor & Destructor Documentation

datavisualizer::DetailedOutputTimestepParseHandler::DetailedOutputTimestepParseHandler DetailedOutputFileManager  oData  )  [inline]
 

Constructor.

Parameters:
oData Parent detailed output file manager.

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


Member Function Documentation

void datavisualizer::DetailedOutputTimestepParseHandler::characters char[]  ch,
int  start,
int  length
throws SAXException [inline]
 

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.

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

void datavisualizer::DetailedOutputTimestepParseHandler::endElement java.lang.String  sURI,
java.lang.String  sLocalName,
java.lang.String  sQName
throws SAXException [inline]
 

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.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
March 21, 2005: Fixed a bug so that package members could be differentiated (LEM)

void datavisualizer::DetailedOutputTimestepParseHandler::startElement java.lang.String  sURI,
java.lang.String  sLocalName,
java.lang.String  sQName,
Attributes  oAttributes
throws SAXException [inline]
 

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

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.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
March 21, 2005: Fixed a bug so that package members could be differentiated (LEM)


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:25 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO