net.agmodel.metBroker
Class RegionImpl

java.lang.Object
  extended bynet.agmodel.metBroker.RegionImpl
All Implemented Interfaces:
GeographicalArea, Serializable

public class RegionImpl
extends Object
implements Serializable, GeographicalArea

Provides persistent storage of region names and lists of weather stations under each region.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.agmodel.physical.GeographicalArea
EVEREST, METRESPERDEGREEOFLATITUDE, METRESPERDEGREEOFLONGATEQUATOR, METRESPERPIXEL
 
Constructor Summary
RegionImpl(String regionID, MultilingualString regionName)
           
 
Method Summary
 void addStation(ServerStationImpl station)
           
 boolean contains(GeographicalArea area)
          Indicate whether the area passed falls entirely within this area
 boolean contains(Location2D point)
          Indicate whether a point is within the area
 GeographicalBox getBoundingBox()
          Return a box which bounds the area.
 Region getRegion(String language)
           
 String getRegionID()
           
 String getRegionName(String language)
           
 ServerStationImpl[] getStations(SpatialMetRequest request)
           
 WeatherStation[] getStations(String language)
           
 boolean isUnknown()
          Indicates whether the bounds of this area are unknown.
 boolean overlapsWith(GeographicalArea area)
          Indicate whether the supplied area overlaps with this area.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionImpl

public RegionImpl(String regionID,
                  MultilingualString regionName)
Method Detail

getRegionName

public String getRegionName(String language)

getRegionID

public String getRegionID()

getStations

public WeatherStation[] getStations(String language)

getStations

public ServerStationImpl[] getStations(SpatialMetRequest request)

addStation

public void addStation(ServerStationImpl station)

getRegion

public Region getRegion(String language)

contains

public boolean contains(Location2D point)
Description copied from interface: GeographicalArea
Indicate whether a point is within the area

Specified by:
contains in interface GeographicalArea
Parameters:
point - the point of interest
Returns:
true if it is, and false if it isn't

contains

public boolean contains(GeographicalArea area)
Description copied from interface: GeographicalArea
Indicate whether the area passed falls entirely within this area

Specified by:
contains in interface GeographicalArea
Parameters:
area - the area of interest
Returns:
true if both areas are known, and the other area is entirely within the bounds of this area, false otherwise

getBoundingBox

public GeographicalBox getBoundingBox()
Description copied from interface: GeographicalArea
Return a box which bounds the area. This can be used as the basis of approximate implementations of overlapsWith for arbitrary shapes. If isUnknown() returns true for the area, then returns GeographicalBox.UNKNOWN

Specified by:
getBoundingBox in interface GeographicalArea
Returns:
a 3 dimensional bounding box

overlapsWith

public boolean overlapsWith(GeographicalArea area)
Description copied from interface: GeographicalArea
Indicate whether the supplied area overlaps with this area. See getBoundingBox for a way of approximately implementing this for arbitrary shapes. Suggestions for improvement welcome. If isUnknown() returns true for either or both areas, the result is false;

Specified by:
overlapsWith in interface GeographicalArea
Parameters:
area - the area of interest

isUnknown

public boolean isUnknown()
Description copied from interface: GeographicalArea
Indicates whether the bounds of this area are unknown.

Specified by:
isUnknown in interface GeographicalArea
Returns:
true if the bounds are unknown.


Copyright (C) NARC 2001 All Rights Reserved.