Class CurrentWeatherInfo
- java.lang.Object
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.CurrentWeatherInfo
-
public class CurrentWeatherInfo extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intDMO_PUBLICATION_DELAYstatic intDMO_UPDATE_INTERVALstatic java.lang.StringEMPTY_TAGstatic intMOSMIX_PUBLICATION_DELAYstatic intMOSMIX_UPDATE_INTERVAL
-
Constructor Summary
Constructors Constructor Description CurrentWeatherInfo()CurrentWeatherInfo(Context context, RawWeatherInfo rawWeatherInfo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCity(Context context)java.lang.IntegergetConditionFromHourlyCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)Gets the most significant condition form the interval specified, or calculates it from other itemsjava.lang.IntegergetConditionFromHourlySignificantCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)java.lang.StringgetHumanReadableIssueTime()static java.lang.IntegergetMostSignificantCondition(java.util.ArrayList<java.lang.Integer> conditions)longgetWhenNewServerDataExpected(Context context)java.util.ArrayList<Weather.WindData>getWindForecast(int number)static java.lang.StringinterpolateConditionFromHigherIntervals(int position, RawWeatherInfo rawWeatherInfo)booleanisNewServerDataExpected(Context context)Checks if new Mosmix data can be expected on the DWD server.static java.lang.StringiteratePositions(java.lang.String[] stringArray, int position, int limit)java.lang.IntegersetSunDurationFromClouds(Weather.WeatherInfo weatherInfo)voidsetToEmpty()
-
-
-
Field Detail
-
EMPTY_TAG
public static final java.lang.String EMPTY_TAG
- See Also:
- Constant Field Values
-
MOSMIX_UPDATE_INTERVAL
public static final int MOSMIX_UPDATE_INTERVAL
- See Also:
- Constant Field Values
-
MOSMIX_PUBLICATION_DELAY
public static final int MOSMIX_PUBLICATION_DELAY
- See Also:
- Constant Field Values
-
DMO_UPDATE_INTERVAL
public static final int DMO_UPDATE_INTERVAL
- See Also:
- Constant Field Values
-
DMO_PUBLICATION_DELAY
public static final int DMO_PUBLICATION_DELAY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CurrentWeatherInfo
public CurrentWeatherInfo()
-
CurrentWeatherInfo
public CurrentWeatherInfo(Context context, RawWeatherInfo rawWeatherInfo)
-
-
Method Detail
-
setToEmpty
public void setToEmpty()
-
getCity
public java.lang.String getCity(Context context)
-
getWindForecast
public java.util.ArrayList<Weather.WindData> getWindForecast(int number)
-
setSunDurationFromClouds
public java.lang.Integer setSunDurationFromClouds(Weather.WeatherInfo weatherInfo)
-
iteratePositions
public static java.lang.String iteratePositions(java.lang.String[] stringArray, int position, int limit)
-
interpolateConditionFromHigherIntervals
public static java.lang.String interpolateConditionFromHigherIntervals(int position, RawWeatherInfo rawWeatherInfo)
-
getConditionFromHourlyCondition
public java.lang.Integer getConditionFromHourlyCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
Gets the most significant condition form the interval specified, or calculates it from other items- Parameters:
rawWeatherInfo-start-stop-- Returns:
- true if condition could be determined, otherwise false
-
getConditionFromHourlySignificantCondition
public java.lang.Integer getConditionFromHourlySignificantCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
-
getMostSignificantCondition
public static java.lang.Integer getMostSignificantCondition(java.util.ArrayList<java.lang.Integer> conditions)
-
isNewServerDataExpected
public boolean isNewServerDataExpected(Context context)
Checks if new Mosmix data can be expected on the DWD server.- Returns:
- true, if new data can be expected.
-
getWhenNewServerDataExpected
public long getWhenNewServerDataExpected(Context context)
-
getHumanReadableIssueTime
public java.lang.String getHumanReadableIssueTime()
-
-