SORTIE Java Interface  1
Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
sortie.data.simpletypes.ModelVector Class Reference

This class packages vector data with other pieces of information important to the model. More...

Inheritance diagram for sortie.data.simpletypes.ModelVector:
sortie.data.simpletypes.ModelData

Public Member Functions

String toString ()
 Required overridden method. More...
 
 ModelVector (String sDescriptor, String sXMLTag, String sXMLChildTag, int iSize, int iDesiredDataType)
 Constructor. More...
 
 ModelVector (String sDescriptor, String sXMLTag, String sXMLChildTag, int iSize, int iDesiredDataType, boolean bMustApplyToAllSpecies)
 Constructor. More...
 
String getChildXMLTag ()
 Gets the XML tag used to identify each piece of data in the vector. More...
 
boolean getMustApplyToAllSpecies ()
 Gets whether this vector must apply to all tree species, regardless of other factors controlling species. More...
 
boolean getIsSpeciesSpecific ()
 Gets whether this vector is for species-specific values. More...
 
void setIsSpeciesSpecific (boolean bIsSpeciesSpecific)
 Sets whether this vector is for species-specific values. More...
 
ArrayList< Object > getValue ()
 Gets the Vector values. More...
 
int getDataType ()
 Gets the data type desired for this ModelVector. More...
 
- Public Member Functions inherited from sortie.data.simpletypes.ModelData
 ModelData (String sDescriptor, String sXMLTag)
 Constructor. More...
 
String getDescriptor ()
 Returns the descriptor string. More...
 
void setDescriptor (String sDescriptor)
 Sets the descriptor string. More...
 
String getXMLTag ()
 Returns the XML tag associated with this piece of data. More...
 
abstract String toString ()
 String representation of the value. More...
 
void setXMLTag (String sXMLTag)
 Sets the XML tag associated with this piece of data. More...
 

Static Public Attributes

static final int INTEGER = 0
 This vector desires data of type Integer. More...
 
static final int FLOAT = 1
 This vector desires data of type Float. More...
 
static final int MODEL_ENUM = 2
 This vector desires data of type ModelEnum. More...
 
static final int STRING = 3
 This vector desires data of type String. More...
 
static final int DOUBLE = 4
 This vector desires data of type Float. More...
 

Protected Member Functions

Object clone ()
 Clone method. More...
 

Private Attributes

ArrayList< Object > mp_oData
 The data values. More...
 
String m_sXMLChildTag
 This is the XML tag of the individual values. More...
 
int m_iDataType
 Data type desired by this ModelVector. More...
 
boolean m_bIsForSpecies = true
 Whether this is a set of species-specific values - not all vectors are. More...
 
boolean m_bMustApplyToAllSpecies = false
 Whether or not this automatically applies to all species. More...
 

Additional Inherited Members

- Protected Attributes inherited from sortie.data.simpletypes.ModelData
String m_sDescriptor
 Descriptive string. More...
 

Detailed Description

This class packages vector data with other pieces of information important to the model.

This allows a vector of data to self-describe to error messages and display windows, and to identify the data that belongs to it in XML files being read and written.

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)
October 7, 2004: Added the m_bMustApplyToAllSpecies member (LEM)
January 22, 2005: Added the m_bIsForSpecies member (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)
October 29, 2010: Add support for Float
May 31, 2013: Added cloning

Constructor & Destructor Documentation

◆ ModelVector() [1/2]

sortie.data.simpletypes.ModelVector.ModelVector ( String  sDescriptor,
String  sXMLTag,
String  sXMLChildTag,
int  iSize,
int  iDesiredDataType 
)

Constructor.

Parameters
sDescriptorA descriptive name string for this value. This will appear in the data window and in error messages.
sXMLTagThe XML tag of the whole vector
sXMLChildTagThe XML tag of individual values within the vector
iSizeInitial size of the vector. 0 is always safe (since vectors grow to accommodate whatever data is placed in them).
iDesiredDataTypeDesired data type of this vector.

◆ ModelVector() [2/2]

sortie.data.simpletypes.ModelVector.ModelVector ( String  sDescriptor,
String  sXMLTag,
String  sXMLChildTag,
int  iSize,
int  iDesiredDataType,
boolean  bMustApplyToAllSpecies 
)

Constructor.

Parameters
sDescriptorA descriptive name string for this value. This will appear in the data window and in error messages.
sXMLTagThe XML tag of the whole vector
sXMLChildTagThe XML tag of individual values within the vector
iSizeInitial size of the vector. 0 is always safe (since vectors grow to accommodate whatever data is placed in them).
iDesiredDataTypeDesired data type of this vector.
bMustApplyToAllSpeciesWhether or not this vector automatically applies to all species, overriding any other method of determining which species it applies to.

Member Function Documentation

◆ clone()

Object sortie.data.simpletypes.ModelVector.clone ( )
protected

Clone method.

◆ getChildXMLTag()

String sortie.data.simpletypes.ModelVector.getChildXMLTag ( )

Gets the XML tag used to identify each piece of data in the vector.

Returns
The XML tag for this vector's data.

◆ getDataType()

int sortie.data.simpletypes.ModelVector.getDataType ( )

Gets the data type desired for this ModelVector.

Returns
The desired data type.

◆ getIsSpeciesSpecific()

boolean sortie.data.simpletypes.ModelVector.getIsSpeciesSpecific ( )

Gets whether this vector is for species-specific values.

Returns
boolean Whether this vector is for species-specific values.

◆ getMustApplyToAllSpecies()

boolean sortie.data.simpletypes.ModelVector.getMustApplyToAllSpecies ( )

Gets whether this vector must apply to all tree species, regardless of other factors controlling species.

Returns
boolean Whether this vector must apply to all species.

◆ getValue()

ArrayList<Object> sortie.data.simpletypes.ModelVector.getValue ( )

Gets the Vector values.

Returns
The Vector values.

◆ setIsSpeciesSpecific()

void sortie.data.simpletypes.ModelVector.setIsSpeciesSpecific ( boolean  bIsSpeciesSpecific)

Sets whether this vector is for species-specific values.

Parameters
bIsSpeciesSpecificboolean Whether this vector is for species- specific values.

◆ toString()

String sortie.data.simpletypes.ModelVector.toString ( )

Required overridden method.

Returns
null - this cannot be applied.

Member Data Documentation

◆ DOUBLE

final int sortie.data.simpletypes.ModelVector.DOUBLE = 4
static

This vector desires data of type Float.

◆ FLOAT

final int sortie.data.simpletypes.ModelVector.FLOAT = 1
static

This vector desires data of type Float.

◆ INTEGER

final int sortie.data.simpletypes.ModelVector.INTEGER = 0
static

This vector desires data of type Integer.

◆ m_bIsForSpecies

boolean sortie.data.simpletypes.ModelVector.m_bIsForSpecies = true
private

Whether this is a set of species-specific values - not all vectors are.

◆ m_bMustApplyToAllSpecies

boolean sortie.data.simpletypes.ModelVector.m_bMustApplyToAllSpecies = false
private

Whether or not this automatically applies to all species.

If false, then which species values are contained in this vector is controlled by such factors as what behaviors claim it and what species they apply to.

◆ m_iDataType

int sortie.data.simpletypes.ModelVector.m_iDataType
private

Data type desired by this ModelVector.

◆ m_sXMLChildTag

String sortie.data.simpletypes.ModelVector.m_sXMLChildTag
private

This is the XML tag of the individual values.

◆ MODEL_ENUM

final int sortie.data.simpletypes.ModelVector.MODEL_ENUM = 2
static

This vector desires data of type ModelEnum.

◆ mp_oData

ArrayList<Object> sortie.data.simpletypes.ModelVector.mp_oData
private

The data values.

◆ STRING

final int sortie.data.simpletypes.ModelVector.STRING = 3
static

This vector desires data of type String.


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