org.eclipse.ohf.stem.ui.ge
Class GEData

java.lang.Object
  extended by org.eclipse.ohf.stem.ui.ge.GEData

public class GEData
extends java.lang.Object

Store info about a geographic location and SEIR status in STEM. It would represent an area such as a US county and contains an id and the border expressed as one or more list of points. The points are Longitude and latitude. Note that (perhaps for an island group) there may be more than 1 list of points. It also contains the values for various aspects relative to Population For SEIR diceases, these aspects would be Susceptible,Exposed, Infectious, and Recovered There may be more or less aspects. These are stored in a Map keyed by aspect code.


Constructor Summary
GEData(java.lang.String name, LatLong areas)
          Create an instance of GEData with LatLong
 
Method Summary
 java.awt.Rectangle getBBox()
           
 java.lang.String getCoordinatesAsString(int numArea)
          format needed by KML long,lat long,lat ...
 java.lang.String getId()
           
 java.lang.String getName()
           
 int getNumAreas()
          get the number of areas described by the geographic points.
 double getValue(Aspect aspect)
           
 java.util.Map<java.lang.String,java.lang.Double> getValueMap()
           
 java.lang.String getValuesAsString()
          Get the aspect values as a String
 void setId(java.lang.String id)
           
 void setName(java.lang.String name)
           
 void setValue(Aspect aspect, double value)
          Store the value in the data store for the area.
 java.lang.String toString()
          debug helper
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GEData

public GEData(java.lang.String name,
              LatLong areas)
Create an instance of GEData with LatLong

Parameters:
name -
areas -
Method Detail

getCoordinatesAsString

public java.lang.String getCoordinatesAsString(int numArea)
format needed by KML long,lat long,lat ... By default DecimalFormat will return doubles as nnnn.ddd

Parameters:
numArea - Normally 0 if just 1 contig area but it could be a set of islands or other multible areas.
Returns:
the coordinates as a String in the form long1,lat1 long2,lat2 ...

getValuesAsString

public java.lang.String getValuesAsString()
Get the aspect values as a String

Returns:
the values as a String in the form a1: v1 a2:v2 ...

getNumAreas

public int getNumAreas()
get the number of areas described by the geographic points.

Returns:
number of polygons described

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getId

public java.lang.String getId()
Returns:
the id

setId

public void setId(java.lang.String id)
Parameters:
id - the id to set

toString

public java.lang.String toString()
debug helper

Overrides:
toString in class java.lang.Object

getValueMap

public java.util.Map<java.lang.String,java.lang.Double> getValueMap()
Returns:
the valueMap for the specified area so we can store values into it.

getValue

public double getValue(Aspect aspect)
Parameters:
aspect -
Returns:
the value for the specified alpect

setValue

public void setValue(Aspect aspect,
                     double value)
Store the value in the data store for the area.

Parameters:
aspect - The aspect that this value is for.
value - the value for the specified aspect

getBBox

public java.awt.Rectangle getBBox()
Returns:
the bBox