Class WeatherDataBean
java.lang.Object
org.deltava.beans.wx.WeatherDataBean
- All Implemented Interfaces:
Serializable
,Comparable<WeatherDataBean>
,GeoLocation
,MapEntry
,MarkerMapEntry
,Cacheable
public abstract class WeatherDataBean
extends Object
implements MarkerMapEntry, Cacheable, Comparable<WeatherDataBean>
A bean to store weather data for a particular location.
- Since:
- 2.2
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enumeration to store valid weather data types. -
Field Summary
Fields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncacheKey()
Returns the cache key for this object.int
Compares two beans by comparing their effectve dates, creation dates and data types.static WeatherDataBean
Creates an arbitrary weather bean type.boolean
getCode()
Returns the observation station code.Returns the creation date of this weather object.getData()
Returns the weather data.getDate()
Returns the effective date of this weather data.Returns the text to display in this marker's infobox if displayed in a Google Map.double
Returns the latitude of this observation.double
Returns the longitude of this observation.getName()
Returns the observation station name.abstract WeatherDataBean.Type
getType()
Returns the data type.int
hashCode()
void
Sets the geographic location of this Observation station.void
Sets the geographic location of this Observation station.void
Updates the weather data.void
Sets the effective date of this weather data.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo
Methods inherited from interface org.deltava.beans.MarkerMapEntry
getIconColor
-
Constructor Details
-
WeatherDataBean
public WeatherDataBean()
-
-
Method Details
-
create
Creates an arbitrary weather bean type.- Parameters:
t
- the bean type- Returns:
- a WeatherDataBean, or null if unknown
-
getDate
Returns the effective date of this weather data.- Returns:
- the effective date/time
-
getCode
-
getName
-
getCreatedOn
Returns the creation date of this weather object.- Returns:
- the creation date/time
-
getData
-
getLatitude
public double getLatitude()Returns the latitude of this observation.- Specified by:
getLatitude
in interfaceGeoLocation
- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Returns the longitude of this observation.- Specified by:
getLongitude
in interfaceGeoLocation
- Returns:
- the longitude in degrees
-
getType
-
setDate
Sets the effective date of this weather data.- Parameters:
dt
- the effective date/time
-
setAirport
Sets the geographic location of this Observation station.- Parameters:
a
- an Airport bean
-
setData
-
getInfoBox
Description copied from interface:MapEntry
Returns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBox
in interfaceMapEntry
- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-
cacheKey
-
compareTo
Compares two beans by comparing their effectve dates, creation dates and data types.- Specified by:
compareTo
in interfaceComparable<WeatherDataBean>
-
hashCode
-
equals
-
toString
-