javawrapper::PlantingData Class Reference

This class encapsulates the data for a single planting event - being for one species, for one timestep. More...

List of all members.

Public Member Functions

 PlantingData ()
 Constructor.
int GetPlantSpacing ()
 Gets the plant spacing.
void SetPlantSpacing (int iSpacing) throws ModelException
 Sets the plant spacing.
int GetTimestep ()
 Gets the timestep for this planting event.
void RemoveSpecies (int iSpecies)
 Removes a species from the list to which to apply this harvest.
void ClearSpecies ()
 Clears the list of species.
void SetTimestep (int iTimestep) throws ModelException
 Sets the timestep for this planting event.
int GetNumberOfSpecies ()
 Gets the number of species to which this planting has been applied.
int GetSpecies (int iIndex) throws ModelException
 Gets a species at a certain index within the species list.
void AddSpecies (int iSpecies)
 Adds a new species to apply this planting to.
int GetNumberOfCells ()
 Gets the number of cells in the planting's area.
void AddCell (int iX, int iY, Plot oPlot) throws ModelException
 Adds a cell to the planting area.
void AddCell (Cell oNewCell)
 Adds a cell to the planting area.
Cell GetCell (int iIndex) throws ModelException
 Gets a cell in the planting's area.
float GetSpacingDistance ()
 Get the distance between trees for a gridded planting.
float GetDensity ()
 Gets the total density of trees for a random planting.
void SetSpacingDistance (float fSpace) throws ModelException
 Sets the distance between trees for a gridded planting.
void SetDensity (float fSpace) throws ModelException
 Sets the total tree density for a random planting.
void AddAbundance (int iSpecies, float fAbundance) throws ModelException
 Adds an abundance value for a given species.
float GetAbundance (int iSpecies) throws ModelException
 Gets an abundance value for a particular species.
void ValidatePlant (TreePopulation oPop, Plot oPlot) throws ModelException
 Validates the current set of data in this planting.

Private Attributes

Vector mp_iSpecies
 Species codes to which to apply this planting.
Vector mp_oCells
 The list of cells to which to apply this plant (vector of Cell objects).
Vector mp_oAbundance
 The amount of each species to plant.
float m_fDistanceOrDensity
 If planting is GRIDDED - distance between trees in m.
int m_iTimestep
 Timestep to which to apply this planting.
int m_iPlantSpacing
 The plant spacing - possible values come from PlantingBehaviors and are GRIDDED and RANDOM.

Classes

class  PlantingAbundance
 This encapsulates a species with its planting abundance. More...


Detailed Description

This class encapsulates the data for a single planting event - being for one species, for one timestep.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
November 19, 2005: Added species removal capacity (LEM)


Constructor & Destructor Documentation

javawrapper::PlantingData::PlantingData (  )  [inline]

Constructor.


Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Function Documentation

void javawrapper::PlantingData::AddAbundance ( int  iSpecies,
float  fAbundance 
) throws ModelException [inline]

Adds an abundance value for a given species.

If a value for that species already exists, then the value is replaced with the new value.

Parameters:
iSpecies The species number.
fAbundance The abundance value, as a percentage (between 0 and 100)
Exceptions:
ModelException if the abundance value is negative or not a percentage.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::AddCell ( Cell  oNewCell  )  [inline]

Adds a cell to the planting area.

Duplicates will not be added.

Parameters:
oNewCell Cell object to add.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::AddCell ( int  iX,
int  iY,
Plot  oPlot 
) throws ModelException [inline]

Adds a cell to the planting area.

Duplicates will not be added.

Parameters:
iX X cell number.
iY Y cell number.
oPlot a Plot object.
Exceptions:
ModelException if the cell coordinates are invalid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::AddSpecies ( int  iSpecies  )  [inline]

Adds a new species to apply this planting to.

If this species is already on the list, it is not added again.

Parameters:
iSpecies Species index.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

float javawrapper::PlantingData::GetAbundance ( int  iSpecies  )  throws ModelException [inline]

Gets an abundance value for a particular species.

Parameters:
iSpecies The species number.
Returns:
The abundance for the specified species.
Exceptions:
ModelException if the species doesn't exist.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Cell javawrapper::PlantingData::GetCell ( int  iIndex  )  throws ModelException [inline]

Gets a cell in the planting's area.

Parameters:
iIndex The index of the object.
Returns:
The cell object.
Exceptions:
ModelException If the index is not valid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

float javawrapper::PlantingData::GetDensity (  )  [inline]

Gets the total density of trees for a random planting.

Returns:
The density in stems/ha for all species.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::PlantingData::GetNumberOfCells (  )  [inline]

Gets the number of cells in the planting's area.

Returns:
Number of cells.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::PlantingData::GetNumberOfSpecies (  )  [inline]

Gets the number of species to which this planting has been applied.

Returns:
The number of species.

int javawrapper::PlantingData::GetPlantSpacing (  )  [inline]

Gets the plant spacing.

Possible values come from PlantingBehaviors and are GRIDDED, RANDOM, or -1 if the value has not yet been set.

Returns:
The plant spacing.

float javawrapper::PlantingData::GetSpacingDistance (  )  [inline]

Get the distance between trees for a gridded planting.

Returns:
The distance between trees, in m.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::PlantingData::GetSpecies ( int  iIndex  )  throws ModelException [inline]

Gets a species at a certain index within the species list.

Parameters:
iIndex The species index.
Returns:
The species value.
Exceptions:
ModelException If the index is not valid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::PlantingData::GetTimestep (  )  [inline]

Gets the timestep for this planting event.

Returns:
The timestep.

void javawrapper::PlantingData::RemoveSpecies ( int  iSpecies  )  [inline]

Removes a species from the list to which to apply this harvest.

If this species is not on the list, the function quietly exits.

Parameters:
iSpecies Species number (number identifying the species, NOT the index number in the vector).

void javawrapper::PlantingData::SetDensity ( float  fSpace  )  throws ModelException [inline]

Sets the total tree density for a random planting.

Parameters:
fSpace The total stems/ha for all species.
Exceptions:
ModelException if the value is negative.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::SetPlantSpacing ( int  iSpacing  )  throws ModelException [inline]

Sets the plant spacing.

Parameters:
iSpacing the plant spacing. Possible values come from PlantingBehaviors and are GRIDDED and RANDOM.
Exceptions:
ModelException if the spacing is unrecognized.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::SetSpacingDistance ( float  fSpace  )  throws ModelException [inline]

Sets the distance between trees for a gridded planting.

Parameters:
fSpace The spacing distance.
Exceptions:
ModelException if the value is negative.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::SetTimestep ( int  iTimestep  )  throws ModelException [inline]

Sets the timestep for this planting event.

Parameters:
iTimestep The timestep to set.
Exceptions:
ModelException if the timestep is less than 0.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::PlantingData::ValidatePlant ( TreePopulation  oPop,
Plot  oPlot 
) throws ModelException [inline]

Validates the current set of data in this planting.

This makes sure the following are all true:

Parameters:
oPop TreePopulation object, to help verify data
oPlot Plot object
Exceptions:
ModelException if any of the above conditions is not true

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Data Documentation

float javawrapper::PlantingData::m_fDistanceOrDensity [private]

If planting is GRIDDED - distance between trees in m.

If RANDOM, total number of trees/ha for all species


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:45:06 2006 for SORTIE Java Interface by  doxygen 1.4.7