SORTIE Java Interface  1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
sortie.data.funcgroups.light.GLIBase Class Referenceabstract

Corresponds to the class. More...

Inheritance diagram for sortie.data.funcgroups.light.GLIBase:
sortie.data.funcgroups.Behavior sortie.data.funcgroups.light.GLILight sortie.data.funcgroups.light.GLIMap sortie.data.funcgroups.light.GLIPoints sortie.data.funcgroups.light.QuadratGLILight sortie.data.funcgroups.light.SailLight

Public Member Functions

 GLIBase (GUIManager oManager, BehaviorTypeBase oParent, String sDescriptor, String sParFileTag, String sXMLRootString, String sHelpFileString) throws ModelException
 Constructor.
 
boolean isHookedBehavior ()
 
void unhook ()
 Unhooks the behavior if necessary.
 
void validateData (TreePopulation oPop) throws ModelException
 Validates the data.
 
BehaviorParameterDisplay formatDataForDisplay (TreePopulation oPop)
 Overridden to not include general light parameters.
 
void writeXML (BufferedWriter jOut, TreePopulation oPop) throws ModelException
 Overridden to write general light parameters only if hooked.
 
BehaviorParameterDisplay formatGeneralLightDataForDisplay (TreePopulation oPop)
 Formats the parameter table for general light.
 
ModelVector getLightTransmissionCoefficient ()
 
abstract void validateSubData (TreePopulation oPop) throws ModelException
 Validates the data.
 
- Public Member Functions inherited from sortie.data.funcgroups.Behavior
GUIManager getGUIManager ()
 
 Behavior (GUIManager oManager, BehaviorTypeBase oParent, String sDescriptor, String sParFileTag, String sXMLRootString, String sHelpFileString)
 Constructor.
 
int getNumberOfDataObjects ()
 Gets the number of managed data objects.
 
ModelData getDataObject (int iInd)
 Gets the managed data object at a particular index.
 
void validate () throws ModelException
 Behavior performs an internal check to make sure its settings are consistent and logical.
 
void setListPosition (int iListPosition)
 Sets the behavior list position.
 
int getListPosition ()
 Gets the behavior list position.
 
String getXMLParametersRoot ()
 Gets the XML parameter root string.
 
int getNumberNewDataMembers ()
 
DataMember getNewTreeDataMember (int iIndex) throws ModelException
 
void setCanApplyTo (int iType, boolean bCanApply)
 Sets whether this behavior can apply to a given tree type.
 
String getParameterFileBehaviorName ()
 Gets the parameter file name for this behavior.
 
double getVersion ()
 Gets behavior's parameter file version.
 
double getMinimumVersion ()
 Gets behavior's parameter file minimum version.
 
String getDescriptor ()
 Gets the descriptor string.
 
void setDescriptor (String s)
 Sets the descriptor string.
 
int getNumberOfCombos ()
 Gets the number of species/type combos to which this behavior applies.
 
int getNumberOfGrids ()
 Gets the number of grids to which this behavior applies.
 
void deleteSpeciesTypeCombo (int iIndex) throws ModelException
 Deletes the SpeciesTypeCombo at the given index.
 
void clearSpeciesTypeCombos ()
 Empties the species/type combo list.
 
SpeciesTypeCombo getSpeciesTypeCombo (int iIndex) throws ModelException
 Returns the SpeciesTypeCombo at the given index of the species/type combo list.
 
Grid getGrid (int iIndex) throws ModelException
 Returns the Grid at the given index of the grid applies to list.
 
ModelData getRequiredData (int iIndex)
 Returns the required data object at a given index.
 
int getNumberOfRequiredDataObjects ()
 Gets the number of required data objects for this behavior.
 
void addSpeciesTypeCombo (SpeciesTypeCombo oCombo) throws ModelException
 Adds a new species/type combo to the list to which this behavior applies.
 
void addGrid (Grid oGrid)
 Adds a new Grid to the list to which this behavior applies.
 
void addRequiredData (ModelData oData)
 Adds a piece of required data to the list.
 
boolean[] getWhichSpeciesUsed (TreePopulation oPop)
 Returns which species to which this behavior is applied.
 
boolean setVectorValueByXMLTag (String sXMLTag, String sXMLParentTag, Vector< String > p_oData, String[] p_sChildXMLTags, boolean[] p_bAppliesTo, Attributes oParentAttributes, Attributes[] p_oAttributes) throws ModelException
 Sets a data vector's value.
 
void setVectorValues (ModelVector oData, Float[] p_fValuesToSet, boolean[] p_bAppliesTo)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, Float[] p_fValuesToSet)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, Double[] p_fValuesToSet, boolean[] p_bAppliesTo)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, Double[] p_fValuesToSet)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, Integer[] p_iValuesToSet, boolean[] p_bAppliesTo)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, String[] p_sValuesToSet)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, String[] p_sValuesToSet, boolean[] p_bAppliesTo)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector oData, Integer[] p_iValuesToSet)
 Sets the values for vector variables.
 
void setVectorValues (ModelVector p_oData, Vector< String > p_oValuesToSet, boolean[] p_bAppliesTo) throws ModelException
 Sets the values for vector variables.
 
boolean setSingleValueByXMLTag (String sXMLTag, String sXMLParentTag, Attributes oAttributes, Object oData) throws ModelException
 Sets a data object's value.
 
ModelData findObjectByXMLTag (String sXMLTag)
 Finds an object based on its XML tag.
 
void copySpecies (int iSpeciesCopyFrom, int iSpeciesCopyTo) throws ModelException
 Copies one species to another.
 
void writeXML (BufferedWriter jOut, TreePopulation oPop) throws ModelException
 Writes the XML data to a parameter file for the behaviors owned by this object.
 
void writeSpeciesSpecificValue (BufferedWriter jOut, ModelVector p_oData, TreePopulation oPop) throws java.io.IOException, ModelException
 Writes a set of species-specific float values to a parameter file.
 
void writeSpeciesSpecificValue (BufferedWriter jOut, ModelVector p_oData, TreePopulation oPop, boolean[] p_bFlags) throws java.io.IOException, ModelException
 Writes a set of species-specific values to a parameter file for a certain subset of species.
 
void readXMLParentTag (String sXMLTag, Attributes oAttributes) throws ModelException
 Accepts an XML parent tag (empty, no data) from the parser.
 
void changeOfSpeciesName (String sOldSpecies, String sNewSpecies)
 Performs any necessary tasks associated with changing the name of a species.
 
void changeOfSpecies (int iOldNumSpecies, int[] p_iIndexer, String[] p_sNewSpecies) throws ModelException
 Triggered when there is a change in the species list.
 
boolean getAutoDisplayParameters ()
 Gets whether to auto-display this object's parameters.
 
ModelData findObjectByDescriptor (String sDescriptor)
 Finds an object based on its descriptor.
 
void writeBehaviorNode (BufferedWriter out, TreePopulation oPop) throws ModelException
 Writes behavior tags to the parameter file.
 
BehaviorParameterDisplay formatDataForDisplay (TreePopulation oPop)
 Formats data for display in a set of JTables.
 
void readDataFromDisplay (Vector< TableData > p_oData, TreePopulation oPop) throws ModelException
 Reads in data from the parameter display window.
 
boolean canBeDuplicated ()
 Whether or not this behavior can be duplicated in the run.
 
boolean canBeEditedAutomatically ()
 Whether or not this behavior can be edited with the automatic parameter retrieval and editing tools.
 
void endOfParameterFileRead ()
 Called at the end of the parameter file read process.
 
void changeOfPlotResolution (float fOldX, float fOldY, float fNewX, float fNewY) throws ModelException
 Performs any tasks associated with a change of plot resolution.
 

Static Public Member Functions

static void initialize ()
 Initializes the static members.
 
- Static Public Member Functions inherited from sortie.data.funcgroups.Behavior
static void writeDataToFile (BufferedWriter ojOut, ModelData oData) throws java.io. IOException
 Writes a piece of data to an XML file.
 
static Object[] formatBlankHeaderRow (Object[][] p_oTable)
 Creates a blank header row for a table.
 
static Object[][] formatDataAsComboBox (Object[][] p_oExisting, ModelEnum oToFormat)
 Adds a value with combo box formatting to an Object array for display in a JTable.
 
static String formatComboBoxString (ModelEnum oToFormat)
 Formats a combo box string from a ModelEnum.
 
static void addDataObjectToDisplayArrays (ModelData p_oDataObject, Vector< ModelData > p_oSingles, Vector< Vector< SpeciesSpecific >> p_oSpeciesSpecific, boolean[] p_bAppliesTo)
 Adds a data object to the arrays which will eventually display run parameters in a set of tables.
 
static Object[][] addDataToArray (Object[][] p_oExistingArray, Object[] p_oAddArray)
 Adds an Object array to an existing Object array.
 
static Object[][] formatDataForTable (Object[][] p_oExisting, ModelFloat oToFormat)
 Formats and adds a value into an Object array suitable for placing in a JTable.
 
static Object[][] formatDataForTable (Object[][] p_oExisting, ModelInt oToFormat)
 Formats and adds a value into an Object array suitable for placing in a JTable.
 
static Object[][] formatDataForTable (Object[][] p_oExisting, ModelString oToFormat)
 Formats and adds a value into an Object array suitable for placing in a JTable.
 
static Object[][] formatDataForTable (Object[][] p_oExisting, ModelVector oToFormat)
 Formats a vector of values into an object array and adds it to another Object array suitable for placing in a JTable.
 
static Object[][] formatDataForTable (Object[][] p_oExisting, ModelVector oToFormat, boolean[] p_bWhichSpecies)
 Formats a vector of values into a plain vector suitable for placing in a JTable and adds it to a vector of vectors at the end.
 
static Object[] formatSpeciesHeaderRow (boolean[] p_bUsed, TreePopulation oPop)
 Creates an object array of strings consisting of species names, suitable for including in the parameter entry table.
 

Static Public Attributes

static final String sGeneralLightDescriptor = "General Light"
 
static final String sGeneralLightParTag = "GeneralLight"
 
static final int MID_CROWN = 0
 Value for fisheye photo taken at mid-crown - MUST match the enum value from the C++ code.
 
static final int CROWN_TOP = 1
 Value for fisheye photo taken at crown top - MUST match the enum value from the C++ code.
 

Protected Attributes

boolean m_bHooked
 Whether this is the hooked behavior that will do this base class stuff.
 
- Protected Attributes inherited from sortie.data.funcgroups.Behavior
GUIManager m_oManager
 GUIManager object.
 
BehaviorTypeBase m_oParent
 Parent manager.
 
Vector< ModelDatamp_oAllData = new Vector<ModelData>()
 All data for this object.
 
Vector< SpeciesTypeCombomp_oTreesAppliesTo = new Vector<SpeciesTypeCombo>(0)
 A set of SpeciesTypeCombo objects to which this behavior is applied - or none if it is not applied to trees.
 
Vector< String > mp_oGridsAppliesTo = new Vector<String>(0)
 A set of strings with the name of Grids to which this behavior is applied - or none if it is not applied to grids.
 
Vector< DataMembermp_oNewTreeDataMembers = new Vector<DataMember>(0)
 The new tree data members that this behavior adds, above and beyond the basic tree population data members.
 
boolean m_bCanEditAutomatically = true
 Whether or not this behavior can be edited automatically (true) or must be edited with its own dialog (false)
 
boolean m_bCanBeDuplicated = true
 Whether or not this behavior can have multiple copies in a run or not.
 
boolean m_bAutoDisplayParameters = true
 Whether or not to auto-display this object's parameters.
 
String m_sDescriptor = ""
 This is what will be displayed as the name of a given behavior in the GUI.
 
String m_sParFileTag = ""
 String which is used to identify this behavior in the parameter file.
 
String m_sXMLRootString = ""
 XML tag to surround this behavior's data.
 
String m_sHelpFileString = ""
 Help file topic identifier string.
 
boolean[] mp_bCanApplyToTreeType
 For each tree type, whether or not this behavior can be applied to it.
 
double m_fVersion = 1.0
 Version of this behavior.
 
double m_fMinVersion = 1.0
 Minimum version of this behavior.
 
int m_iListPosition = -1
 This behavior's position in the behavior list.
 

Static Protected Attributes

static ModelVector mp_fLightTransmissionCoefficient
 Species-specific - amount of light transmission.
 
static ModelVector mp_fSnagClass1LightTransmissionCoefficient
 Species-specific - snag age class 1 amount of light transmission.
 
static ModelVector mp_fSnagClass2LightTransmissionCoefficient
 Species-specific - snag age class 2 light transmission coefficient.
 
static ModelVector mp_fSnagClass3LightTransmissionCoefficient
 Species-specific - snag age class 3 light transmission coefficient.
 
static ModelFloat m_fBeamFractionOfGlobalRadiation
 Beam fraction of global radiation.
 
static ModelFloat m_fClearSkyTransmissionCoefficient
 Clear sky transmission coefficient.
 
static ModelInt m_iJulianDayGrowthStarts
 Start of growing season as Julian day.
 
static ModelInt m_iJulianDayGrowthEnds
 End of growing season as Julian day.
 
static ModelInt m_iSnagAgeClass1
 Upper age limit of snag size class 1.
 
static ModelInt m_iSnagAgeClass2
 Upper age limit of snag size class 2.
 

Additional Inherited Members

- Public Attributes inherited from sortie.data.funcgroups.Behavior
boolean m_bMustHaveTrees = true
 If true, and a tree has no species/type combos, it automatically becomes disabled.
 
- Protected Member Functions inherited from sortie.data.funcgroups.Behavior
void setSingleValue (ModelData oDataMember, Object oData) throws ModelException
 Sets the value of a single data member.
 
BehaviorParameterDisplay formatTable (Vector< ModelData > p_oSingles, Vector< Vector< SpeciesSpecific >> p_oSpeciesSpecific, TreePopulation oPop)
 Turns vector groups of data objects into a set of tables for display.
 
- Static Protected Member Functions inherited from sortie.data.funcgroups.Behavior
static boolean boolArraysEqual (boolean[] p_bArrayOne, boolean[] p_bArrayTwo)
 Tests two boolean arrays for equality.
 

Detailed Description

Corresponds to the class.

Author
lora

Constructor & Destructor Documentation

sortie.data.funcgroups.light.GLIBase.GLIBase ( GUIManager  oManager,
BehaviorTypeBase  oParent,
String  sDescriptor,
String  sParFileTag,
String  sXMLRootString,
String  sHelpFileString 
) throws ModelException

Constructor.

Parameters
oManagerGUI manager.
oParentParent managing object.
sDescriptorThe name of the behavior for the user.
sParFileTagString which is used to identify this behavior in the parameter file.
sXMLRootStringXML tag to surround this behavior's data.
sHelpFileStringString matching this behavior's topic in the help

Member Function Documentation

BehaviorParameterDisplay sortie.data.funcgroups.light.GLIBase.formatDataForDisplay ( TreePopulation  oPop)

Overridden to not include general light parameters.

BehaviorParameterDisplay sortie.data.funcgroups.light.GLIBase.formatGeneralLightDataForDisplay ( TreePopulation  oPop)

Formats the parameter table for general light.

Parameters
oPop
Returns
ModelVector sortie.data.funcgroups.light.GLIBase.getLightTransmissionCoefficient ( )
static void sortie.data.funcgroups.light.GLIBase.initialize ( )
static

Initializes the static members.

boolean sortie.data.funcgroups.light.GLIBase.isHookedBehavior ( )
void sortie.data.funcgroups.light.GLIBase.unhook ( )

Unhooks the behavior if necessary.

void sortie.data.funcgroups.light.GLIBase.validateData ( TreePopulation  oPop) throws ModelException
virtual

Validates the data.

Parameters
oPopTreePopulation object
Exceptions
ModelExceptionin any of the following cases:
  • m_fClearSkyTransmissionCoefficient is 0.
  • mp_fLightTransmissionCoefficient for any species is not between 0 and 1.
  • If m_fBeamFractionOfGlobalRadiation is not a valid proportion.
  • If either m_iJulianDayGrowthStarts or m_iJulianDayGrowthEnds is not between 1 and 365 (inclusive).
  • If the run has snags in it and the values for the snag light transmission coefficients aren't proportions, or the snag age classes aren't positive numbers.

Implements sortie.data.funcgroups.Behavior.

abstract void sortie.data.funcgroups.light.GLIBase.validateSubData ( TreePopulation  oPop) throws ModelException
pure virtual
void sortie.data.funcgroups.light.GLIBase.writeXML ( BufferedWriter  jOut,
TreePopulation  oPop 
) throws ModelException

Overridden to write general light parameters only if hooked.

Member Data Documentation

final int sortie.data.funcgroups.light.GLIBase.CROWN_TOP = 1
static

Value for fisheye photo taken at crown top - MUST match the enum value from the C++ code.

boolean sortie.data.funcgroups.light.GLIBase.m_bHooked
protected

Whether this is the hooked behavior that will do this base class stuff.

ModelFloat sortie.data.funcgroups.light.GLIBase.m_fBeamFractionOfGlobalRadiation
staticprotected

Beam fraction of global radiation.

ModelFloat sortie.data.funcgroups.light.GLIBase.m_fClearSkyTransmissionCoefficient
staticprotected

Clear sky transmission coefficient.

ModelInt sortie.data.funcgroups.light.GLIBase.m_iJulianDayGrowthEnds
staticprotected

End of growing season as Julian day.

ModelInt sortie.data.funcgroups.light.GLIBase.m_iJulianDayGrowthStarts
staticprotected

Start of growing season as Julian day.

ModelInt sortie.data.funcgroups.light.GLIBase.m_iSnagAgeClass1
staticprotected

Upper age limit of snag size class 1.

ModelInt sortie.data.funcgroups.light.GLIBase.m_iSnagAgeClass2
staticprotected

Upper age limit of snag size class 2.

final int sortie.data.funcgroups.light.GLIBase.MID_CROWN = 0
static

Value for fisheye photo taken at mid-crown - MUST match the enum value from the C++ code.

ModelVector sortie.data.funcgroups.light.GLIBase.mp_fLightTransmissionCoefficient
staticprotected

Species-specific - amount of light transmission.

ModelVector sortie.data.funcgroups.light.GLIBase.mp_fSnagClass1LightTransmissionCoefficient
staticprotected

Species-specific - snag age class 1 amount of light transmission.

ModelVector sortie.data.funcgroups.light.GLIBase.mp_fSnagClass2LightTransmissionCoefficient
staticprotected

Species-specific - snag age class 2 light transmission coefficient.

ModelVector sortie.data.funcgroups.light.GLIBase.mp_fSnagClass3LightTransmissionCoefficient
staticprotected

Species-specific - snag age class 3 light transmission coefficient.

final String sortie.data.funcgroups.light.GLIBase.sGeneralLightDescriptor = "General Light"
static
final String sortie.data.funcgroups.light.GLIBase.sGeneralLightParTag = "GeneralLight"
static

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