datavisualizer.RelativeNeighborhoodDensityDataRequest Class Reference

Produces a line graph of Relative Neighborhood Density grid results. More...

Inheritance diagram for datavisualizer.RelativeNeighborhoodDensityDataRequest:

datavisualizer.DataRequest

List of all members.

Public Member Functions

 RelativeNeighborhoodDensityDataRequest (String sChartName, DetailedOutputFileManager oManager) throws ModelException
 Constructor.
void AddGridFloatData (String sGridName, int iX, int iY, int iCode, float fVal)
 This accepts float data.
boolean WantAnyGridFloats ()
 This wants floats.
void AddGridFloatDataMemberCode (String sGridName, String sLabel, int iCode)
 Accepts a grid float data member code for future reference when passed float data members.

Protected Member Functions

void WriteChartDataToFile (java.io.FileWriter jOut) throws java.io. IOException
 Writes the table's data to tab-delimited text.

Package Functions

ModelInternalFrame DrawChart (Legend oLegend, String sChartTitle) throws ModelException
 Creates a table of the results that have been collected.
void UpdateChart (Legend oLegend) throws ModelException
 Redraws the chart using the existing dataset.
void ClearData () throws ModelException
 Clears out existing data.

Private Member Functions

void SetupDataset ()
 This takes the mass of accumulated data from a first-time parse and sets up the structures that will give us a place to put it in the future.
DefaultXYDataset CreateChartingDataset (Legend oLegend) throws ModelException
 Creates the dataset suitable for charting.

Private Attributes

Vector< SpIncmp_oTempIndexer = new Vector<SpInc>(0)
 A collection of SpInc objects which say which species and increment belongs to a given float data code index.
Vector< ValCodemp_oTempDataset = new Vector<ValCode>(0)
 A place to put data as it's being parsed, before we know certain things about it.
float[][] mp_fDatasetValues = null
 The dataset values.
SpInc[] mp_oIndexer
String[] mp_sSpeciesNames
 Array of species names for display.
String m_sThisGrid
 Name of the grid from which the data will be collected.
float m_fMaxDistance = -1
 Maximum distance - from the grid itself if possible.
float m_fDistInc = -1
 Distance increment - from the grid itself if possible.
int m_iMaxDistanceCode = -1
 Grid code for the max distance.
int m_iDistIncCode = -1
 Grid code for the distance increment.
int m_iNumSpecies
 The number of species.

Classes

class  SpInc
 This class bundles together a species number and increment number. More...
class  ValCode
 This class bundles together a grid value and its associated grid data member code. More...


Detailed Description

Produces a line graph of Relative Neighborhood Density grid results.

This requires the detailed output file to have data saved from the "Relative Neighborhood Density" grid.

Copyright: Copyright (c) Charles D. Canham 2007 Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
September 19, 2007: Created (LEM)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Constructor & Destructor Documentation

datavisualizer.RelativeNeighborhoodDensityDataRequest.RelativeNeighborhoodDensityDataRequest ( String  sChartName,
DetailedOutputFileManager  oManager 
) throws ModelException

Constructor.

Parameters:
sChartName Name of the chart
oManager Detailed output file manager
Exceptions:
ModelException not really, but I have to declare this.


Member Function Documentation

void datavisualizer.RelativeNeighborhoodDensityDataRequest.WriteChartDataToFile ( java.io.FileWriter  jOut  )  throws java.io. IOException [protected, virtual]

Writes the table's data to tab-delimited text.

Parameters:
jOut java.io.FileWriter The file to write to.
Exceptions:
java.io.IOException if there's a problem writing the file.

Implements datavisualizer.DataRequest.

void datavisualizer.RelativeNeighborhoodDensityDataRequest.AddGridFloatData ( String  sGridName,
int  iX,
int  iY,
int  iCode,
float  fVal 
)

This accepts float data.

The index vector is consulted and the values added to the appropriate array location.

Parameters:
sGridName Name of the grid for this data
iX X number of the cell from which this value came
iY Y number of the cell from which this value came
iCode Data member code of this value.
fVal Value.

Reimplemented from datavisualizer.DataRequest.

boolean datavisualizer.RelativeNeighborhoodDensityDataRequest.WantAnyGridFloats (  ) 

This wants floats.

Returns:
True.

Reimplemented from datavisualizer.DataRequest.

void datavisualizer.RelativeNeighborhoodDensityDataRequest.AddGridFloatDataMemberCode ( String  sGridName,
String  sLabel,
int  iCode 
)

Accepts a grid float data member code for future reference when passed float data members.

Parameters:
sGridName Name of the grid
sLabel The label of the data member.
iCode The data member code.

Reimplemented from datavisualizer.DataRequest.

void datavisualizer.RelativeNeighborhoodDensityDataRequest.SetupDataset (  )  [private]

This takes the mass of accumulated data from a first-time parse and sets up the structures that will give us a place to put it in the future.

Until we have all of the grid's data, we may not know the distance or number of increments. This will find the number of increments (either directly from the applicable grid data members or by inference), set up mp_fDatasetValues, and make sure the indexes are sorted correctly.

DefaultXYDataset datavisualizer.RelativeNeighborhoodDensityDataRequest.CreateChartingDataset ( Legend  oLegend  )  throws ModelException [private]

Creates the dataset suitable for charting.

Parameters:
oLegend Legend for this chart.
Returns:
DefaultXYDataset that can be fed to the XY line graph functions.
Exceptions:
ModelException if there is a problem with the legend.

ModelInternalFrame datavisualizer.RelativeNeighborhoodDensityDataRequest.DrawChart ( Legend  oLegend,
String  sChartTitle 
) throws ModelException [package, virtual]

Creates a table of the results that have been collected.

Parameters:
oLegend The species legend.
sChartTitle The chart title.
Returns:
A JInternalFrame with the table present in it.
Exceptions:
datavisualizer.ModelException 

Implements datavisualizer.DataRequest.

void datavisualizer.RelativeNeighborhoodDensityDataRequest.UpdateChart ( Legend  oLegend  )  throws ModelException [package, virtual]

Redraws the chart using the existing dataset.

Parameters:
oLegend The legend for this chart.
Exceptions:
ModelException if anything goes wrong with the chart drawing.

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

Implements datavisualizer.DataRequest.

void datavisualizer.RelativeNeighborhoodDensityDataRequest.ClearData (  )  throws ModelException [package, virtual]

Clears out existing data.

Exceptions:
ModelException Doesn't throw an exception.

Implements datavisualizer.DataRequest.


Member Data Documentation

A collection of SpInc objects which say which species and increment belongs to a given float data code index.

A place to put data as it's being parsed, before we know certain things about it.

The dataset values.

The first index is number of species. The second index is number of increments.

Array of species names for display.

Name of the grid from which the data will be collected.

Maximum distance - from the grid itself if possible.

Distance increment - from the grid itself if possible.

Grid code for the max distance.

Grid code for the distance increment.

The number of species.


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

Generated on Wed Oct 28 14:01:17 2009 for SORTIE Java Interface by  doxygen 1.5.6