|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oopitis.weather.QueryHint
public class QueryHint
A hint about what should be returned for a query. The basic information in this class includes the weather properties of interest, the features to be included and the features to be excluded. A weather service examines this information and decides which weather reports to create. In general, the list of requested weather properties take precedence when determining which features to include, unless a feature is explicitly excluded. If a feature is explicitly included, it will be considered even though the feature may not be associated with the requested properties.
For example, when WeatherService.HumidityPercent is
included, a weather service may decide to create weather reports for both
WeatherService.CONDITIONS_HOUR and
WeatherService.CONDITIONS_DAY because both features contain
information about humidity. If WeatherService.CONDITIONS_DAY
is explicitly excluded in the hint, the weather service will create
weather reports only for WeatherService.CONDITIONS_HOUR. If
WeatherService.ALERT is explicitly included in the hint, the
weather service will also include weather alerts even though they may not
contain information about humidity.
Different service providers may interpret a hint differently, or extend this class to include more options specific to their services.
Feature| Constructor Summary | |
|---|---|
QueryHint()
Creates a hint. |
|
| Method Summary | |
|---|---|
void |
exclude(Feature... features)
Indicates that weather reports from a list of features must be excluded. |
Feature[] |
getExcludedFeatures()
Returns the list of excluded features. |
Feature[] |
getIncludedFeatures()
Returns the list of included features. |
WeatherProperty[] |
getProperties()
Returns the list of weather properties of interest. |
void |
include(Feature... features)
Indicates that weather reports from a list of features must be included. |
void |
include(Queryable... queryables)
Indicates that a weather report must be included if any property in the given list of queryables is applicable to the report. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryHint()
| Method Detail |
|---|
public void include(Feature... features)
features - the list of features to be included
java.lang.IllegalArgumentException - if the list contains null elementpublic void exclude(Feature... features)
features - the list of features to be excluded
java.lang.IllegalArgumentException - if the list contains null elementpublic void include(Queryable... queryables)
queryables - the list of queryables applicable to the reports
java.lang.IllegalArgumentException - if the list contains null elementpublic Feature[] getIncludedFeatures()
public Feature[] getExcludedFeatures()
public WeatherProperty[] getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||