|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oopitis.weather.WeatherService<GeoLocation,OwmQueryHint,WeatherReport>
com.oopitis.weather.owm.OwmWeather
public class OwmWeather
WeathherService implementation for Open Weather Map. See
http://openweathermap.org
for more information.
Supported Features:
WeatherService.CONDITIONS (basic)WeatherService.CONDITIONS_HOUR (every 3 hours)WeatherService.CONDITIONS_DAY (7 days)OwmWeather.CONDITIONS_14DAYSOwmWeather.CONDITIONS_MULTILOCATION
| Field Summary | |
|---|---|
static Feature |
CONDITIONS_14DAYS
Weather conditions for the next 14 days. |
static Feature |
CONDITIONS_MULTILOCATION
This feature corresponds to the "city search" function. |
static WeatherPropertySet |
DailyTemperature
A property set that contains the following properties: TempMorningCelsius TempDayCelsius TempEveningCelsius TempNightCelsius |
protected OwmData |
data
The data source. |
static WeatherProperty<java.lang.Float> |
TempDayCelsius
Daytime temperature. |
static WeatherProperty<java.lang.Float> |
TempEveningCelsius
Evening temperature. |
static WeatherProperty<java.lang.Float> |
TempMorningCelsius
Morning temperature. |
static WeatherProperty<java.lang.Float> |
TempNightCelsius
Nighttime temperature. |
static WeatherProperty<OwmSummary> |
WeatherSummary
This property corresponds to the weather object in the data. |
| Constructor Summary | |
|---|---|
|
OwmWeather()
Constructs an OwmWeather object. |
protected |
OwmWeather(OwmData data)
Constructs an OwmWeather with a data source. |
|
OwmWeather(java.lang.String apiKey)
Constructs an OwmWeather object with an API key. |
|
OwmWeather(java.lang.String apiKey,
java.net.Proxy proxy)
Constructs an OwmWeather object with an API key and a
network proxy. |
| Method Summary | |
|---|---|
WeatherPropertySet |
getApplicableProperties(Feature f)
Gets the set of properties applicable to a feature. |
java.util.Set<Feature> |
getBasicFeatures()
Returns the set of features for which the weather reports are created when the query hint does not exist or does not specify properties of interest or features to include. |
java.util.Set<Feature> |
getSupportedFeatures()
Gets all features this service supports. |
OwmQueryHint |
newQueryHint()
Creates a new query hint. |
java.util.List<WeatherReport> |
query(GeoLocation location,
java.util.Date beginTime,
OwmQueryHint hint)
Queries the data source about the weather in a location. |
| Methods inherited from class com.oopitis.weather.WeatherService |
|---|
getApplicableFeatures, listFeatures, print, query, query, query, query, query, subList, subList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Feature CONDITIONS_MULTILOCATION
public static final Feature CONDITIONS_14DAYS
public static final WeatherProperty<OwmSummary> WeatherSummary
weather object in the data.
public static final WeatherProperty<java.lang.Float> TempDayCelsius
public static final WeatherProperty<java.lang.Float> TempNightCelsius
public static final WeatherProperty<java.lang.Float> TempEveningCelsius
public static final WeatherProperty<java.lang.Float> TempMorningCelsius
public static final WeatherPropertySet DailyTemperature
protected final OwmData data
| Constructor Detail |
|---|
public OwmWeather()
OwmWeather object.
public OwmWeather(java.lang.String apiKey)
OwmWeather object with an API key.
apiKey - the API key
public OwmWeather(java.lang.String apiKey,
java.net.Proxy proxy)
OwmWeather object with an API key and a
network proxy.
apiKey - the API keyproxy - the proxyprotected OwmWeather(OwmData data)
OwmWeather with a data source.
data - the data source
java.lang.NullPointerException - if the given data source is null| Method Detail |
|---|
public java.util.List<WeatherReport> query(GeoLocation location,
java.util.Date beginTime,
OwmQueryHint hint)
query in class WeatherService<GeoLocation,OwmQueryHint,WeatherReport>location - the locationbeginTime - this argument is not supported.hint - the query hint; null if the data from the basic
features should be returned
java.lang.NullPointerException - if the given location is nullpublic OwmQueryHint newQueryHint()
WeatherService
newQueryHint in class WeatherService<GeoLocation,OwmQueryHint,WeatherReport>public java.util.Set<Feature> getSupportedFeatures()
WeatherService
getSupportedFeatures in class WeatherService<GeoLocation,OwmQueryHint,WeatherReport>public java.util.Set<Feature> getBasicFeatures()
WeatherService
getBasicFeatures in class WeatherService<GeoLocation,OwmQueryHint,WeatherReport>public WeatherPropertySet getApplicableProperties(Feature f)
WeatherService
getApplicableProperties in class WeatherService<GeoLocation,OwmQueryHint,WeatherReport>f - the feature
Feature.getProperties(WeatherService)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||