SORTIE Java Interface  1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sortie.tools.parfileupdater.GroupBase Class Referenceabstract
Inheritance diagram for sortie.tools.parfileupdater.GroupBase:
sortie.tools.parfileupdater.AnalysisBehaviors sortie.tools.parfileupdater.DisperseBehaviors sortie.tools.parfileupdater.DisturbanceBehaviors sortie.tools.parfileupdater.EpiphyticEstablishmentBehaviors sortie.tools.parfileupdater.EstablishmentBehaviors sortie.tools.parfileupdater.GrowthBehaviors sortie.tools.parfileupdater.LightBehaviors sortie.tools.parfileupdater.ManagementBehaviors sortie.tools.parfileupdater.MortalityBehaviors sortie.tools.parfileupdater.MortalityUtilitiesBehaviors sortie.tools.parfileupdater.OutputBehaviors sortie.tools.parfileupdater.PlantingBehaviors sortie.tools.parfileupdater.SeedPredationBehaviors sortie.tools.parfileupdater.SnagDynamicsBehaviors sortie.tools.parfileupdater.StateChangeBehaviors sortie.tools.parfileupdater.SubstrateBehaviors

Public Member Functions

void writeBehaviorsList (BufferedWriter jOut) throws IOException
 
void writeDataToFile (BufferedWriter jOut) throws IOException
 Writes all data to an XML file. More...
 
ModelData findObjectByXMLTag (String sXMLTag, String sXMLParentTag)
 Finds an object based on its XML tag. More...
 
boolean setSingleValueByXMLTag (String sXMLTag, String sXMLParentTag, Attributes oAttributes, String sData) throws ModelException
 Sets a data object's value. More...
 
ArrayList< BehaviorgetBehaviorByXMLTag (String sXMLTag)
 Finds a behavior by its XML tag. More...
 
boolean readXMLParentTag (String sXMLTag, Attributes oAttributes) throws ModelException
 Accepts an XML parent tag (empty, no data) from the parser. More...
 
void endXMLParentTag (String sXMLTag)
 
boolean parentTagOKForQueue (String sTag)
 Some tags get everything messed up in a parsing queue. More...
 

Protected Member Functions

void loadDataMember (ModelData oData)
 Takes some data and adds it to all applicable behaviors in their string buffer. More...
 

Protected Attributes

ArrayList< ModelDatamp_oAllData
 All data for this object. More...
 
String m_sXMLTag
 Highest-level XML tag for this object. More...
 
Behavior [] mp_oChildBehaviors
 

Member Function Documentation

◆ endXMLParentTag()

void sortie.tools.parfileupdater.GroupBase.endXMLParentTag ( String  sXMLTag)

◆ findObjectByXMLTag()

ModelData sortie.tools.parfileupdater.GroupBase.findObjectByXMLTag ( String  sXMLTag,
String  sXMLParentTag 
)

Finds an object based on its XML tag.

Parameters
sXMLTagXML tag for the object.
sXMLParentTagParent tag to sXMLTag.
Returns
ModelData object corresponding to the XML tag, or null if no such object is found.

◆ getBehaviorByXMLTag()

ArrayList<Behavior> sortie.tools.parfileupdater.GroupBase.getBehaviorByXMLTag ( String  sXMLTag)

Finds a behavior by its XML tag.

Parameters
sXMLTagString The XML tag for which to find a behavior.
Returns
Behavior Behavior for the XML tag, or NULL if none of the behaviors has that tag.

◆ loadDataMember()

void sortie.tools.parfileupdater.GroupBase.loadDataMember ( ModelData  oData)
protected

Takes some data and adds it to all applicable behaviors in their string buffer.

◆ parentTagOKForQueue()

boolean sortie.tools.parfileupdater.GroupBase.parentTagOKForQueue ( String  sTag)

Some tags get everything messed up in a parsing queue.

Override this to clean out certain tags, generally empty parent tags or enclosing tags that are now ignored.

Parameters
sTagTag to check.
Returns
Whether or not to keep this tag in the queue.

◆ readXMLParentTag()

boolean sortie.tools.parfileupdater.GroupBase.readXMLParentTag ( String  sXMLTag,
Attributes  oAttributes 
) throws ModelException

Accepts an XML parent tag (empty, no data) from the parser.

Parameters
sXMLTagThe XML tag.
oAttributesThe attributes of this object.
Exceptions
ModelExceptionif there is a problem reading this data.

◆ setSingleValueByXMLTag()

boolean sortie.tools.parfileupdater.GroupBase.setSingleValueByXMLTag ( String  sXMLTag,
String  sXMLParentTag,
Attributes  oAttributes,
String  sData 
) throws ModelException

Sets a data object's value.

Override this to add functionality.

Parameters
sXMLTagXML tag of data object whose value is to be set.
sXMLParentTagThe immediate parent tag that sXMLTag is within.
oAttributesAttributes of the object. Ignored, but may be needed by overriding objects.
sDataData value, either a String or a type appropriate to the data type
Returns
true if the value was set successfully; false if the value could not be found. (This would not be an error, because I need a way to cycle through the objects until one of the objects comes up with a match.)
Exceptions
ModelExceptionif the value could not be assigned to the data object.

◆ writeBehaviorsList()

void sortie.tools.parfileupdater.GroupBase.writeBehaviorsList ( BufferedWriter  jOut) throws IOException

◆ writeDataToFile()

void sortie.tools.parfileupdater.GroupBase.writeDataToFile ( BufferedWriter  jOut) throws IOException

Writes all data to an XML file.

Parameters
jOutThe file to write to.
Exceptions
IOExceptionPasses on exceptions from FileWriter

Member Data Documentation

◆ m_sXMLTag

String sortie.tools.parfileupdater.GroupBase.m_sXMLTag
protected

Highest-level XML tag for this object.

◆ mp_oAllData

ArrayList<ModelData> sortie.tools.parfileupdater.GroupBase.mp_oAllData
protected

All data for this object.

It should be placed in the order in which it should be written in XML.

◆ mp_oChildBehaviors

Behavior [] sortie.tools.parfileupdater.GroupBase.mp_oChildBehaviors
protected

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