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 int
DMO_PUBLICATION_DELAY
static int
DMO_UPDATE_INTERVAL
static java.lang.String
EMPTY_TAG
static int
MOSMIX_PUBLICATION_DELAY
static int
MOSMIX_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.String
getCity(Context context)
java.lang.Integer
getConditionFromHourlyCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
Gets the most significant condition form the interval specified, or calculates it from other itemsjava.lang.Integer
getConditionFromHourlySignificantCondition(RawWeatherInfo rawWeatherInfo, int start, int stop)
java.lang.String
getHumanReadableIssueTime()
static java.lang.Integer
getMostSignificantCondition(java.util.ArrayList<java.lang.Integer> conditions)
long
getWhenNewServerDataExpected(Context context)
java.util.ArrayList<Weather.WindData>
getWindForecast(int number)
static java.lang.String
interpolateConditionFromHigherIntervals(int position, RawWeatherInfo rawWeatherInfo)
boolean
isNewServerDataExpected(Context context)
Checks if new Mosmix data can be expected on the DWD server.static java.lang.String
iteratePositions(java.lang.String[] stringArray, int position, int limit)
java.lang.Integer
setSunDurationFromClouds(Weather.WeatherInfo weatherInfo)
void
setToEmpty()
-
-
-
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()
-
-