com.oopitis.weather.owm
Class OwmQueryHint

java.lang.Object
  extended by com.oopitis.weather.QueryHint
      extended by com.oopitis.weather.owm.OwmQueryHint

public class OwmQueryHint
extends QueryHint

A query hint for Open Weather Map. This extension is mainly to take advantage of the multilingual support Open Weather Map provides, although such implementation does not fit in the overall design. By design the multilingual support is provided by format(Locale) of a weather property. That requires the translations to be available after the weather reports are created, which is not possible because the translations of all possible keywords Open Weather Map supports is not available.


Nested Class Summary
static class OwmQueryHint.Language
          Languages that Open Weather Map supports.
 
Constructor Summary
OwmQueryHint()
          Constructs a query hint for Open Weather Map.
 
Method Summary
 OwmQueryHint.Language getLanguage()
          Returns the language set in this hint.
 void setLanguage(OwmQueryHint.Language lang)
          Sets the language to be used in the query.
 
Methods inherited from class com.oopitis.weather.QueryHint
exclude, getExcludedFeatures, getIncludedFeatures, getProperties, include, include
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwmQueryHint

public OwmQueryHint()
Constructs a query hint for Open Weather Map.

Method Detail

setLanguage

public void setLanguage(OwmQueryHint.Language lang)
Sets the language to be used in the query.

Parameters:
lang - the language; null if the language code should not appear in the query

getLanguage

public OwmQueryHint.Language getLanguage()
Returns the language set in this hint.

Returns:
the language set in this hint