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

Plugs into the Xerces SAX parser to handle the incoming data when the detailed output setup XML file is parsed. More...

Inheritance diagram for sortie.datavisualizer.DetailedOutputFileSetupParseHandler:

Public Member Functions

 DetailedOutputFileSetupParseHandler (DetailedOutputFileManager oManager)
 Constructor. More...
 
void startElement (java.lang.String uri, java.lang.String localName, java.lang.String qName, Attributes attributes) throws SAXException
 Called when the parser hits a new opening tag. More...
 
void characters (char[] ch, int start, int length) throws SAXException
 Reads character data from the XML file. More...
 
void endElement (java.lang.String sURI, java.lang.String sLocalName, java.lang.String sQName) throws SAXException
 Called at the end of an XML tag. More...
 

Private Attributes

DetailedOutputFileManager m_oManager
 Detailed output file manager which owns this parser. More...
 
sortie.data.simpletypes.DetailedTreeSettings m_oTreeSettings = null
 Set of tree settings into which to put data. More...
 
sortie.data.simpletypes.DetailedGridSettings m_oGridSettings = null
 Set of grid settings into which to put data. More...
 
StringBuffer m_sBuf = new StringBuffer()
 String buffer to collect data in our parser. More...
 
boolean m_bIsFloat = false
 Indicates the data just parsed is a float data member. More...
 

Detailed Description

Plugs into the Xerces SAX parser to handle the incoming data when the detailed output setup XML file is parsed.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
January 3, 2007: Added better subplot support including specific area calculation (LEM)

Constructor & Destructor Documentation

◆ DetailedOutputFileSetupParseHandler()

sortie.datavisualizer.DetailedOutputFileSetupParseHandler.DetailedOutputFileSetupParseHandler ( DetailedOutputFileManager  oManager)

Constructor.

This is passed an object into which to put the parsed data.

Parameters
oManagerThe DetailedOutputFileViewer object into which the data goes.

Member Function Documentation

◆ characters()

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

Reads character data from the XML file.

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.

If m_bIsFloat is true, AddNewFloat() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsInt is true, AddNewInt() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsChar is true, AddNewChar() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsBool is true, AddNewFloat() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsTimesteps is true, the number of timesteps is sent to m_oManager.

After execution any flag turned on is turned back off.

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

◆ endElement()

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

Called at the end of an XML tag.

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.

If m_bIsFloat is true, AddNewFloat() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsInt is true, AddNewInt() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsChar is true, AddNewChar() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsBool is true, AddNewFloat() is called for m_oTreeSettings. If mp_oTreeMapSettings is null, an error is thrown.

If m_bIsTimesteps is true, the number of timesteps is sent to m_oManager.

After execution any flag turned on is turned back off.

Parameters
sURIthe Namespace URI (ignored)
sLocalNamethe local name (what this function looks at)
sQNamethe qualified (prefixed) name (ignored)
Exceptions
SAXExceptionif there were problems assigning the data.

◆ startElement()

void sortie.datavisualizer.DetailedOutputFileSetupParseHandler.startElement ( java.lang.String  uri,
java.lang.String  localName,
java.lang.String  qName,
Attributes  attributes 
) throws SAXException

Called when the parser hits a new opening tag.

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

  • ou_treeInfo - the DetailedOutputFileManager is used to create a new DetailedTreeSettings object. The object is then stashed in m_oTreeSettings.
  • ou_float - m_bIsFloat is set to true.
  • ou_int - m_bIsInt is set to true.
  • ou_char - m_bIsChar is set to true.
  • ou_bool - m_bIsBool is set to true.
  • tr_species - the species name is passed to m_oManager.
  • timesteps - m_bIsTimesteps is set to true.
  • plot_lenX - m_bIsXPlotLength is set to true.
  • plot_lenY - m_bIsYPlotLength is set to true.
  • ou_gridInfo - the DetailedOutputFileManager is used to create a new DetailedGridSettings object. The object is then stashed in m_oGridSettings.
  • ou_packageFloat - m_bIsFloat and m_bIsPackage are set to true.
  • ou_packageInt - m_bIsInt and m_bIsPackage are set to true.
  • ou_packageChar - m_bIsChar and m_bIsPackage are set to true.
  • ou_packageBool - m_bIsBool and m_bIsPackage are set to true.
Parameters
urithe Namespace URI (ignored)
localNamethe local name (what this function looks at)
qNamethe qualified (prefixed) name (ignored)
attributesThe tag's attributes
Exceptions
SAXExceptionif there are any problems.

Member Data Documentation

◆ m_bIsFloat

boolean sortie.datavisualizer.DetailedOutputFileSetupParseHandler.m_bIsFloat = false
private

Indicates the data just parsed is a float data member.

◆ m_oGridSettings

sortie.data.simpletypes.DetailedGridSettings sortie.datavisualizer.DetailedOutputFileSetupParseHandler.m_oGridSettings = null
private

Set of grid settings into which to put data.

◆ m_oManager

DetailedOutputFileManager sortie.datavisualizer.DetailedOutputFileSetupParseHandler.m_oManager
private

Detailed output file manager which owns this parser.

◆ m_oTreeSettings

sortie.data.simpletypes.DetailedTreeSettings sortie.datavisualizer.DetailedOutputFileSetupParseHandler.m_oTreeSettings = null
private

Set of tree settings into which to put data.

◆ m_sBuf

StringBuffer sortie.datavisualizer.DetailedOutputFileSetupParseHandler.m_sBuf = new StringBuffer()
private

String buffer to collect data in our parser.


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