de.cesr.sesamgim.util
Class GUpdatableContextStructure

java.lang.Object
  extended by de.cesr.sesamgim.util.GUpdatableContextStructure

public class GUpdatableContextStructure
extends Object

This class is the data storage back-end for a climate / weather data. It is adapted to Microm (R) Milieu data.

Date:
05.01.2009

Field Summary
protected  int numHHSizes
          Number of HH size classes
protected  int numMilieus
          number of different milieu types
protected  int numYears
          Number of data rows along time dimension
 
Constructor Summary
GUpdatableContextStructure()
          Initialize this cell structure
 
Method Summary
 double getAverrageHHSize(int year)
           
 int getDominantMilieu(int year)
           
 int getHH(Calendar cal, int milieuGroup, int hhSize)
          NOTE: To match a certain year in the data you need to specified the last day of that year for the cal object!
 int getHH(int year, int milieuGroup, int hhSize)
          Provides the number of households of the given household size of the given milieu group in the given year.
 void setHH(int year, int milieuGroup, int hhSize, int numHH)
          Set the data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numYears

protected int numYears
Number of data rows along time dimension


numMilieus

protected int numMilieus
number of different milieu types


numHHSizes

protected int numHHSizes
Number of HH size classes

Constructor Detail

GUpdatableContextStructure

public GUpdatableContextStructure()
Initialize this cell structure

Method Detail

setHH

public void setHH(int year,
                  int milieuGroup,
                  int hhSize,
                  int numHH)
Set the data

Parameters:
year -
milieu -
hhSize -
numHH -

getHH

public int getHH(int year,
                 int milieuGroup,
                 int hhSize)
Provides the number of households of the given household size of the given milieu group in the given year.

Parameters:
year -
milieuGroup -
hhSize -
Returns:

getHH

public int getHH(Calendar cal,
                 int milieuGroup,
                 int hhSize)
NOTE: To match a certain year in the data you need to specified the last day of that year for the cal object!

Parameters:
cal -
milieuGroup -
hhSize -
Returns:

getDominantMilieu

public int getDominantMilieu(int year)
Parameters:
year -
Returns:

getAverrageHHSize

public double getAverrageHHSize(int year)
Parameters:
year -
Returns:
the average household size in the given year