Package ucar.unidata.metdata
Class NamedStationImpl
java.lang.Object
ucar.unidata.metdata.NamedStationImpl
- All Implemented Interfaces:
Serializable,Comparable,NamedStation,Station
- Direct Known Subclasses:
SoundingStation
A class to hold named location information, for a
landmark, city, observation point or station, data point, etc.
Name should be unique.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionA no-op ctor for unpersiting thisNamedStationImpl(String id, String name, double latitude, double longitude, double alt, Unit unit) Construct an object to hold and transfer settings for a landmark, city, observation point, etc.NamedStationImpl(String id, String name, List coords, Unit unit) _more_NamedStationImpl(String name, NamedLocationTuple in_nLT) Create a NamedStationImpl from the name and NamedLocation -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String key, Object value) Add an extra propertyintCompare this NamedStationImpl to another objectintCompare this NamedStationImpl to another NamedStationImpl.booleanSee if the Object in question is equal to this.Get the altitude as a real (value and unit)doubleReturn altitude in units of getAltitudeUnit().ReturnUnitof altitude_more_Create, if needed, and return the location of this stationgetID()Get the station ID.Get the identifier for this NamedLocation.doubleGet the latitude.doubleGet the longitude.getName()Get the station name.Get theNamedLocationfor this.Get the hashtable of extra propertiesgetProperty(String key, Object deflt) Get an extra propertyvoidsetAltitude(Real v) Set the alitude.voidSet the station ID.voidsetLatitude(double v) Set the latitude.voidsetLongitude(double v) Set the longitude.voidGet the station name.voidSet theNamedLocationfor this.voidHave this method here for backward compatibility with bundles.voidSet the table of extra propertiestoString()Return a String representation of this NamedLocation
-
Constructor Details
-
NamedStationImpl
public NamedStationImpl(String id, String name, double latitude, double longitude, double alt, Unit unit) throws VisADException, RemoteException Construct an object to hold and transfer settings for a landmark, city, observation point, etc.- Parameters:
id- typically a letter or number codename- some kind of name such as "Kansas City" - should be UNIQUE.latitude- latitude in decimal geographic degreeslongitude- longitude in decimal geographic degreesalt- VisAD Real for height above the geoid ("sea level")unit- VisAD Unit of the altitude- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
NamedStationImpl
public NamedStationImpl(String id, String name, List coords, Unit unit) throws VisADException, RemoteException _more_- Parameters:
id- _more_name- _more_coords- _more_unit- _more_- Throws:
RemoteException- _more_VisADException- _more_
-
NamedStationImpl
Create a NamedStationImpl from the name and NamedLocation- Parameters:
name- station namein_nLT- NamedLocation
-
NamedStationImpl
public NamedStationImpl()A no-op ctor for unpersiting this
-
-
Method Details
-
setNamedLocationTuple
Have this method here for backward compatibility with bundles. deprecated- Parameters:
v- new NamedLocationTuple
-
getCoords
_more_- Returns:
- _more_
-
getEarthLocation
Create, if needed, and return the location of this station- Returns:
- location
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getNamedLocation
Get theNamedLocationfor this. Used mostly by XML encoder.- Specified by:
getNamedLocationin interfaceNamedStation- Returns:
- NamedLocation
-
setNamedLocation
Set theNamedLocationfor this. Used mostly by XML encoder.- Specified by:
setNamedLocationin interfaceNamedStation- Parameters:
v- the NamedLocation
-
getLatitude
public double getLatitude()Get the latitude. Used mostly by XML encoding.- Specified by:
getLatitudein interfaceNamedStation- Specified by:
getLatitudein interfaceStation- Returns:
- latitude (degrees)
-
setLatitude
public void setLatitude(double v) Set the latitude. Used mostly by XML encoding.- Specified by:
setLatitudein interfaceNamedStation- Parameters:
v- latitude (degrees)
-
getLongitude
public double getLongitude()Get the longitude. Used mostly by XML encoding.- Specified by:
getLongitudein interfaceNamedStation- Specified by:
getLongitudein interfaceStation- Returns:
- longitude (degrees)
-
setLongitude
public void setLongitude(double v) Set the longitude. Used mostly by XML encoding.- Specified by:
setLongitudein interfaceNamedStation- Parameters:
v- longitude (degrees)
-
getAltitude
Get the altitude as a real (value and unit)- Specified by:
getAltitudein interfaceNamedStation- Returns:
- altitude
-
setAltitude
Set the alitude. Used mostly by XML encoder.- Specified by:
setAltitudein interfaceNamedStation- Parameters:
v- altitude
-
getID
Get the station ID. Used mostly by XML encoder.- Specified by:
getIDin interfaceNamedStation- Returns:
- the station ID
-
setID
Set the station ID. Used mostly by XML encoder.- Specified by:
setIDin interfaceNamedStation- Parameters:
v- the station ID
-
getName
Get the station name. Used mostly by XML encoder.- Specified by:
getNamein interfaceNamedStation- Returns:
- the station name
-
setName
Get the station name. Used mostly by XML encoder.- Specified by:
setNamein interfaceNamedStation- Parameters:
v- the station name
-
equals
See if the Object in question is equal to this.- Specified by:
equalsin interfaceNamedStation- Overrides:
equalsin classObject- Parameters:
o- Object in question- Returns:
- true if they are equal
-
getIdentifier
Get the identifier for this NamedLocation. It can either be the station ID, or the name if ID is null- Specified by:
getIdentifierin interfaceStation- Returns:
- identifier for this station
-
getAltitudeAsDouble
public double getAltitudeAsDouble()Return altitude in units of getAltitudeUnit().- Returns:
- altitude value
-
getAltitudeUnit
ReturnUnitof altitude- Returns:
- altitude Unit
-
getProperties
Get the hashtable of extra properties- Returns:
- extra properties
-
setProperties
Set the table of extra properties- Parameters:
v- extra properties
-
addProperty
Add an extra property- Parameters:
key- property namevalue- property value
-
getProperty
Get an extra property- Parameters:
key- property namedeflt- default value if property doesn't exist
-
toString
Return a String representation of this NamedLocation -
compareTo
Compare this NamedStationImpl to another NamedStationImpl. Comparison is on the unique identifying name.- Parameters:
stn- other NamedStationImpl to compare- Returns:
- comparative value
- See Also:
-
compareTo
Compare this NamedStationImpl to another object- Specified by:
compareToin interfaceComparable- Parameters:
oo- other object to compare- Returns:
- comparative value
-