Inheritance diagram for javawrapper::BehaviorTypeBase:
Public Member Functions | |
BehaviorTypeBase (GUIManager oManager, String sName, String sXMLTag) | |
Constructor. | |
boolean[] | GetWhichSpeciesUsed (ModelVector p_oData, TreePopulation oPop) |
Gets which species should have values for a given ModelVector. | |
boolean | AnyBehaviorsEnabled () |
Determines if any of the child behaviors are currently enabled. | |
Behavior | GetBehaviorByXMLTag (String sXMLTag) |
Finds a behavior by its XML tag. | |
Grid[] | GetEnabledGridObjects () throws ModelException |
Gets the list of grid objects which the currently enabled behaviors would be expected to create - and thus would be available to output, etc. | |
Grid[] | GetAllGridObjects () |
Returns all grid objects, whether they are used or not. | |
Behavior[] | GetAllBehaviors () |
Get all Behavior objects for this group. | |
void | WriteGridXML (BufferedWriter jOut) throws ModelException |
Writes grid maps for any grid that has values. | |
void | ClearGridMapValues () |
Clears all grid map values for this behavior's grids. | |
Behavior | GetBehaviorByKey (String sKey) |
Convenience method for getting a behavior. | |
Behavior | GetBehaviorByDisplayName (String sDescriptor) |
Convenience method for getting a behavior. | |
void | ReadXMLParentTag (String sXMLTag, Attributes oAttributes) throws ModelException |
Accepts an XML parent tag (empty, no data) from the parser. | |
boolean | SetSingleValueByXMLTag (String sXMLTag, String sXMLParentTag, Attributes oAttributes, Object oData) throws ModelException |
This method is looking for ma_floatCode, ma_intCode, ma_charCode, ma_boolCode, fl, int, ch, and bl. | |
boolean | SetVectorValueByXMLTag (String sXMLTag, String sXMLParentTag, Vector p_oData, String[] p_sChildXMLTags, boolean[] p_bAppliesTo, Attributes oParentAttributes, Attributes[] p_oAttributes) throws ModelException |
Override this function in order to be able to handle grid maps. | |
void | WriteSpeciesSpecificValue (BufferedWriter out, ModelVector p_oData, TreePopulation oPop) throws java.io.IOException, ModelException |
Writes a set of species-specific float values to a parameter file. | |
void | WriteXML (BufferedWriter jOut, TreePopulation oPop) throws ModelException |
Writes the XML data to a parameter file for the behaviors owned by this object. | |
boolean | IsThisDataUsed (ModelData oData) |
Determines whether a piece of data is required for any enabled behaviors in the mp_oChildBehaviors list. | |
void | WriteData (BufferedWriter jOut, ModelData oData) throws java.io. IOException |
Writes a piece of data to an XML file. | |
Protected Member Functions | |
void | SetUsesBehavior (Integer[] p_iVals, int iType, TreePopulation oPop, String sKey) throws ModelException |
Sets which species for a given type use a particular behavior. | |
Protected Attributes | |
Behavior[] | mp_oChildBehaviors |
List of child behaviors a behavior group is managing. | |
Grid[] | mp_oGrids |
List of grid objects associated with these behaviors - notice this array is not created in this class. | |
int | m_iGridParseIndex |
When parsing grid maps, this is the index of the current map (or -1 if the current map is not owned by this behavior). | |
int | m_iPackageIndex |
When parsing packages, this is the index of the current package (or -1 if the current map is not owned by this behavior). | |
int | m_iCurrentXCell |
When parsing grid maps, the current X grid cell. | |
int | m_iCurrentYCell |
When parsing grid maps, the current Y grid cell. | |
Package Functions | |
void | WriteBehaviorNodes (BufferedWriter out, TreePopulation oPop) throws ModelException |
Writes behavior tags to the parameter file. |
Each object of this class manages a group of similar behavior objects.
This is the behavior level of which the GUIManager is aware. It keeps a known set of these objects around, which can respond to a common set of requests, and relies on them to manage the complexity of the individual behaviors which they own.
Copyright: Copyright (c) 2003 Charles D. Canham
Company: Institute of Ecosystem Studies
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Determines if any of the child behaviors are currently enabled.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Clears all grid map values for this behavior's grids.
|
|
Get all Behavior objects for this group.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Returns all grid objects, whether they are used or not.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Convenience method for getting a behavior.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Convenience method for getting a behavior.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Finds a behavior by its XML tag.
Reimplemented in javawrapper::EstablishmentBehaviors, and javawrapper::MortalityBehaviors. |
|
Gets the list of grid objects which the currently enabled behaviors would be expected to create - and thus would be available to output, etc.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets which species should have values for a given ModelVector. This polls all behaviors; if a behavior is enabled, and this ModelVector is on its required data list, all species for which it is enabled are set to true.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Determines whether a piece of data is required for any enabled behaviors in the mp_oChildBehaviors list.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. |
|
Accepts an XML parent tag (empty, no data) from the parser. This is looking for grid data.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. Reimplemented in javawrapper::DisturbanceBehaviors, javawrapper::LightBehaviors, javawrapper::OutputBehaviors, and javawrapper::PlantingBehaviors. |
|
This method is looking for ma_floatCode, ma_intCode, ma_charCode, ma_boolCode, fl, int, ch, and bl. For the last four, they are only set if m_iCurrentSpecies and m_iCurrentTreeType are greater than -1. Thus grid values with these tags will be ignored.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. Reimplemented in javawrapper::DisturbanceBehaviors, javawrapper::LightBehaviors, javawrapper::OutputBehaviors, and javawrapper::PlantingBehaviors. |
|
Sets which species for a given type use a particular behavior. This method would normally not be used, as this object manages its own data and would make the decision of which behaviors are enabled and which are not. However, in the case of input of a tab-delimited parameter file, the information must be fed to this class.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Override this function in order to be able to handle grid maps.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. Reimplemented in javawrapper::OutputBehaviors, and javawrapper::PlantingBehaviors. |
|
Writes behavior tags to the parameter file. For all enabled behaviors, writes them in order along with their appropriate applyTo tags.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Writes a piece of data to an XML file.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. |
|
Writes grid maps for any grid that has values. If there are no grids, or if there are no grid map values in any grid, nothing is written.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Writes a set of species-specific float values to a parameter file. The data is only written if it is required for a behavior that is enabled; and then only for the species required by any behavior for which it is required.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. |
|
Writes the XML data to a parameter file for the behaviors owned by this object. Overridden so that only the data enabled by behaviors is written.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) Reimplemented from javawrapper::WorkerBase. Reimplemented in javawrapper::DisturbanceBehaviors, javawrapper::LightBehaviors, javawrapper::OutputBehaviors, and javawrapper::PlantingBehaviors. |
|
List of child behaviors a behavior group is managing. Notice that this array is not created in this class. Also note that you can't count on the order remaining constant, so to work with behaviors, use a GetBehaviorBy* method. |