org.n52.operation.cropmodeling
Class AttributeData

java.lang.Object
  extended by org.n52.operation.cropmodeling.AttributeData
Direct Known Subclasses:
CropData, DayWeatherData, WeatherData

public abstract class AttributeData
extends java.lang.Object

The class is a base class for weatherdata and cropdata. Its purpose is to store all attributes that belong to another attributes e.g. the attribute day has temperature, percipatation etc.

Since:
1.0.0
Author:
willem

Field Summary
protected  java.util.Hashtable attributes
          AttributeData attributes field contains all attributes and their values
protected  java.lang.String name
          AttributeData name field
 
Constructor Summary
protected AttributeData()
          construct / initialize
 
Method Summary
 double getAttributeData(java.lang.String attributeName)
          get the value of the attribute with name attributeName
protected  java.lang.String[] getAttributes(java.io.BufferedReader reader)
           
 double getIndexedAttribute(java.lang.String attributeName, int index)
           
 void setAttributeData(java.lang.String attributeName, double attributeValue)
          set the (new) value for the attribute with name attributeName to attributeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
AttributeData name field


attributes

protected java.util.Hashtable attributes
AttributeData attributes field contains all attributes and their values

Constructor Detail

AttributeData

protected AttributeData()
construct / initialize

Method Detail

getAttributeData

public double getAttributeData(java.lang.String attributeName)
get the value of the attribute with name attributeName

Parameters:
attributeName - the name of the attribute
Returns:
the attribute value

setAttributeData

public void setAttributeData(java.lang.String attributeName,
                             double attributeValue)
set the (new) value for the attribute with name attributeName to attributeValue

Parameters:
attributeName - the attribute name
attributeValue - the (new) value

getIndexedAttribute

public double getIndexedAttribute(java.lang.String attributeName,
                                  int index)
Parameters:
attributeName -
index -
Returns:
NaN

getAttributes

protected java.lang.String[] getAttributes(java.io.BufferedReader reader)
Parameters:
reader -
Returns:
an array of attributes