net.agmodel.metBroker
Class ServerStationImpl

java.lang.Object
  extended bynet.agmodel.metBroker.ServerStationImpl
All Implemented Interfaces:
Comparable, Serializable

public class ServerStationImpl
extends Object
implements Serializable, Comparable

Holds details about a met data source's weather stations which are used by both client-side and database-side classes via their respective interfaces.

Author:
Matthew Laurenson
See Also:
Serialized Form

Method Summary
 boolean checkMetElementCatalog(MetElement element, Duration resolution, Period period)
          Check whether a station has recorded an element at a particular resolution over the period.
 int compareTo(Object a)
           
 Location getLocation()
          Get the weather station's position on the globe.
 String getName(String language)
           
 Period getOperational()
          Get the period of operation of the weather station
 String getRegionID()
          Get the ID that the host database uses to refer to the region.
 Duration getShortestResolution()
           
 String getStationID()
          Get the ID that the host database uses to refer to the station.
 WeatherStation getWeatherStation(String language)
           
 boolean metCatalogCardExists(MetElement element, Duration resolution)
          Check whether a station has ever recorded an element at a particular resolution.
 void recordElementStatus(MetElement element, Duration resolution, Period period, boolean status)
          Record that a station measured or didn't measure an element at a particular resolution over a period.
 String report(String language)
          Provide a description of the station and the data it holds
 void setShortestResolution(Duration shortestResolution)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

recordElementStatus

public void recordElementStatus(MetElement element,
                                Duration resolution,
                                Period period,
                                boolean status)
Record that a station measured or didn't measure an element at a particular resolution over a period. Used to initially specify the data holding of a station, and update it based on the results of queries.

Parameters:
element - the meteorological element
period - the period of time (which might not have an end specified)
resolution - the temporal resolution. There are useful constants in weatherData.MetDuration
status - true if the element was recorded over the period, false if it wasn't

getStationID

public String getStationID()
Get the ID that the host database uses to refer to the station.

Returns:
the ID

getRegionID

public String getRegionID()
Get the ID that the host database uses to refer to the region.

Returns:
the ID

metCatalogCardExists

public boolean metCatalogCardExists(MetElement element,
                                    Duration resolution)
Check whether a station has ever recorded an element at a particular resolution.

Returns:
true if it has recorded the element, false if it hasn't.

checkMetElementCatalog

public boolean checkMetElementCatalog(MetElement element,
                                      Duration resolution,
                                      Period period)
Check whether a station has recorded an element at a particular resolution over the period.

Returns:
true if it has recorded the element, false if it hasn't.

report

public String report(String language)
Provide a description of the station and the data it holds

Returns:
a summary of the station's metadata

getOperational

public Period getOperational()
Get the period of operation of the weather station

Returns:
the date when the station began operating, and, if it has closed, the date when it closed.

getLocation

public Location getLocation()
Get the weather station's position on the globe.

Returns:
the location of the station (latitude, longitude and altitude)

toString

public String toString()

getName

public String getName(String language)

getWeatherStation

public WeatherStation getWeatherStation(String language)

setShortestResolution

public void setShortestResolution(Duration shortestResolution)

getShortestResolution

public Duration getShortestResolution()

compareTo

public int compareTo(Object a)
Specified by:
compareTo in interface Comparable


Copyright (C) NARC 2001 All Rights Reserved.