|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oopitis.weather.WeatherService<GeoLocation,QueryHint,WeatherReport>
com.oopitis.weather.fio.FioWeather
public class FioWeather
WeatherService implementation for forecast.io.
See http://forecast.io
for more information.
Supported Features:
WeatherService.ALERT (basic)WeatherService.CONDITIONS (basic)WeatherService.CONDITIONS_MINUTE (basic)WeatherService.CONDITIONS_HOUR (basic)WeatherService.CONDITIONS_DAY (basic)
| Field Summary | |
|---|---|
static WeatherProperty<java.lang.String> |
Icon
A machine-readable text summary of a data point. |
| Constructor Summary | |
|---|---|
protected |
FioWeather(FioData weatherData)
Constructs a FioWeather object with a data source. |
|
FioWeather(java.lang.String apiKey)
Constructs a FioWeather object. |
|
FioWeather(java.lang.String apiKey,
java.net.Proxy proxy)
Constructs a FioWeather object that retrieves data
via a 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. |
QueryHint |
newQueryHint()
Creates a new query hint. |
java.util.List<WeatherReport> |
query(GeoLocation location,
java.util.Date beginTime,
QueryHint hint)
Queries the data source about the weather in a location from a specific date onward. |
| 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 WeatherProperty<java.lang.String> Icon
| Constructor Detail |
|---|
public FioWeather(java.lang.String apiKey)
FioWeather object.
apiKey - the required API key
java.lang.NullPointerException - if the given API key is null
public FioWeather(java.lang.String apiKey,
java.net.Proxy proxy)
FioWeather object that retrieves data
via a proxy.
apiKey - the required API keyproxy - the proxy
java.lang.NullPointerException - if the given API key is nullprotected FioWeather(FioData weatherData)
FioWeather object with a data source.
weatherData - 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,
QueryHint hint)
WeatherService
query in class WeatherService<GeoLocation,QueryHint,WeatherReport>location - the locationbeginTime - the first date of the reporting period;
null if the report should start from the
current date. This argument is mostly used to retrieve
historical data. Since weather forecast cannot extend
indefinitely, giving a future date far from now is
impractical.
To get forecast data for a future date, pass
null for this argument, include appropriate
features such as CONDITIONS_DAY, and use
WeatherService.subList(List, Date, Date) to
filter the reports. A service provider may ignore this
argument if it cannot provide historical data.hint - the query hint; null if the data from the basic
features should be returned
public QueryHint newQueryHint()
WeatherService
newQueryHint in class WeatherService<GeoLocation,QueryHint,WeatherReport>public java.util.Set<Feature> getSupportedFeatures()
WeatherService
getSupportedFeatures in class WeatherService<GeoLocation,QueryHint,WeatherReport>public java.util.Set<Feature> getBasicFeatures()
WeatherService
getBasicFeatures in class WeatherService<GeoLocation,QueryHint,WeatherReport>public WeatherPropertySet getApplicableProperties(Feature f)
WeatherService
getApplicableProperties in class WeatherService<GeoLocation,QueryHint,WeatherReport>f - the feature
Feature.getProperties(WeatherService)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||