|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.agmodel.weatherData.WeatherStation
A serializable representation of a place that weather data records are associated with. Sometimes weather stations are moved, but retain the same identifier, or are renamed. In this situation the most recent location or name are associated with the weather station. This is a compromise between accuracy and simplicity. The class is made final because it overrides the equals method. If any classes extend this and add a field then the equals method of this class is likely to not be transitive.
| Constructor Summary | |
WeatherStation(String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
Creates a new WeatherStation object in situations where the metSourceDetails are not available and the station isn't part of a region |
|
WeatherStation(String metSourceID,
String metSourceName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution)
Creates a new WeatherStation object |
|
WeatherStation(String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
Creates a new WeatherStation object in situations where the metSourceDetails are not available |
|
WeatherStation(String metSourceID,
String metSourceName,
String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution)
Creates a new WeatherStation object |
|
WeatherStation(String metSourceID,
String metSourceName,
String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
Creates a new WeatherStation object |
|
| Method Summary | |
int |
compareTo(Object a)
Stations are compared by location, and then by operational period (earlier first) |
boolean |
equals(Object o)
Tests whether two objects represent the same weather station. |
double |
getAltitude()
|
boolean[][] |
getCatalog()
Get a catalog indicating which elements the station has ever recorded, and at which resolution(s). |
String |
getHostID()
Deprecated. use getStationID() instead |
double |
getLatitude()
|
double |
getLongitude()
|
String |
getMetSourceID()
|
String |
getMetSourceName()
|
Period |
getOperational()
|
Place |
getPlace()
|
String |
getPlaceName()
|
String |
getRegionID()
|
String |
getRegionName()
|
Duration |
getShortestResolution()
|
String |
getStationID()
|
boolean |
hasElementAtResolution(MetElement element,
MetDuration resolution)
Whether a station has ever recorded an element at a particular resolution. |
int |
hashCode()
|
void |
setMetSourceDetails(String metSourceID,
String metSourceName)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public WeatherStation(String metSourceID,
String metSourceName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution)
metSourceID - an identifier for the host database that this station came frommetSourceName - the name of the database (in the client's preferred language)stationID - the identifier used for this station on its host databaseplaceName - the name of the place (in the client's preferred language)location - the station locationoperational - the period over which the station has operatedshortestResolution - the shortest resolution data recorded at the station
public WeatherStation(String metSourceID,
String metSourceName,
String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution)
metSourceID - an identifier for the host database that this station came frommetSourceName - the name of the database (in the client's preferred language)regionID - an identifier for the region within the host database, if any, that this station is part ofregionName - the name of the region (in the client's preferred language)stationID - the identifier used for this station on its host databaseplaceName - the name of the place (in the client's preferred language)location - the station locationoperational - the period over which the station has operatedshortestResolution - the shortest resolution data recorded at the station
public WeatherStation(String metSourceID,
String metSourceName,
String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
metSourceID - an identifier for the host database that this station came frommetSourceName - the name of the database (in the client's preferred language)regionID - an identifier for the region within the host database, if any, that this station is part ofregionName - the name of the region (in the client's preferred language)stationID - the identifier used for this station on its host databaseplaceName - the name of the place (in the client's preferred language)operational - the period over which the station has operatedshortestResolution - the shortest resolution data recorded at the stationcatalog - an array indicating which elements have ever been recorded and at what resolution. The first index corresponds to MetDuration.ord and the second to MetElement.ord
public WeatherStation(String regionID,
String regionName,
String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
regionID - an identifier for the region within the host database, if any, that this station is part ofregionName - the name of the region (in the client's preferred language)stationID - the identifier used for this station on its host databaseplaceName - the name of the place (in the client's preferred language)operational - the period over which the station has operatedshortestResolution - the shortest resolution data recorded at the stationcatalog - an array indicating which elements have ever been recorded and at what resolution. The first index corresponds to MetDuration.ord and the second to MetElement.ordfor a useful companion method.
public WeatherStation(String stationID,
String placeName,
Location location,
Period operational,
Duration shortestResolution,
boolean[][] catalog)
stationID - the identifier used for this station on its host databaseplaceName - the name of the place (in the client's preferred language)operational - the period over which the station has operatedshortestResolution - the shortest resolution data recorded at the stationcatalog - an array indicating which elements have ever been recorded and at what resolution. The first index corresponds to MetDuration.ord and the second to MetElement.ordfor a useful companion method.| Method Detail |
public Period getOperational()
public String getHostID()
public String getStationID()
public Duration getShortestResolution()
public String getRegionName()
public String getRegionID()
public int compareTo(Object a)
compareTo in interface Comparablepublic Place getPlace()
public double getLongitude()
public double getLatitude()
public double getAltitude()
public String getPlaceName()
public String toString()
toString in class Objectpublic boolean[][] getCatalog()
public boolean hasElementAtResolution(MetElement element,
MetDuration resolution)
element - the element of interestresolution - the resolution of interest
public void setMetSourceDetails(String metSourceID,
String metSourceName)
public String getMetSourceID()
public String getMetSourceName()
public boolean equals(Object o)
equals in class Objecto - the other object
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||