diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..74c5741 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,9 @@ +Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.pdf b/README.pdf new file mode 100644 index 0000000..e70f7b2 Binary files /dev/null and b/README.pdf differ diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html new file mode 100644 index 0000000..9e6f1f3 --- /dev/null +++ b/javadoc/allclasses-frame.html @@ -0,0 +1,54 @@ + + + + + + +All Classes (OpenWeatherMap.org JAPIs) + + + + +

All Classes

+
+ +
+ + diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html new file mode 100644 index 0000000..bf640e7 --- /dev/null +++ b/javadoc/allclasses-noframe.html @@ -0,0 +1,54 @@ + + + + + + +All Classes (OpenWeatherMap.org JAPIs) + + + + +

All Classes

+
+ +
+ + diff --git a/javadoc/constant-values.html b/javadoc/constant-values.html new file mode 100644 index 0000000..cf1237a --- /dev/null +++ b/javadoc/constant-values.html @@ -0,0 +1,835 @@ + + + + + + +Constant Field Values (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

net.aksingh.*

+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/deprecated-list.html b/javadoc/deprecated-list.html new file mode 100644 index 0000000..27e4a84 --- /dev/null +++ b/javadoc/deprecated-list.html @@ -0,0 +1,114 @@ + + + + + + +Deprecated List (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/javadoc/help-doc.html b/javadoc/help-doc.html new file mode 100644 index 0000000..c74fab7 --- /dev/null +++ b/javadoc/help-doc.html @@ -0,0 +1,215 @@ + + + + + + +API Help (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-1.html b/javadoc/index-files/index-1.html new file mode 100644 index 0000000..85f6f21 --- /dev/null +++ b/javadoc/index-files/index-1.html @@ -0,0 +1,202 @@ + + + + + + +A-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

A

+
+
AbstractWeatherData - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for CurrentWeatherData + and ForecastWeatherData classes.
+
+
AbstractWeatherData() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Non-parameterized constructor
+
+
AbstractWeatherData(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
AbstractWeatherData.Clouds - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for Clouds.
+
+
AbstractWeatherData.Clouds() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Non-parameterized constructor
+
+
AbstractWeatherData.Clouds(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
AbstractWeatherData.Coord - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for Coord.
+
+
AbstractWeatherData.Coord() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Non-parameterized constructor
+
+
AbstractWeatherData.Coord(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
AbstractWeatherData.Main - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for Main.
+
+
AbstractWeatherData.Main() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Non-parameterized constructor
+
+
AbstractWeatherData.Main(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
AbstractWeatherData.Weather - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for Weather.
+
+
AbstractWeatherData.Weather() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Non-parameterized constructor
+
+
AbstractWeatherData.Weather(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
AbstractWeatherData.Wind - Class in net.aksingh.java.api.owm
+
+
This class provides default implementations for Wind.
+
+
AbstractWeatherData.Wind() - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Non-parameterized constructor
+
+
AbstractWeatherData.Wind(JSONObject) - Constructor for class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-10.html b/javadoc/index-files/index-10.html new file mode 100644 index 0000000..35335a4 --- /dev/null +++ b/javadoc/index-files/index-10.html @@ -0,0 +1,394 @@ + + + + + + +J-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

J

+
+
JSON_BASE - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON variable Base
+
+
JSON_CITY - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Key for JSON object - City
+
+
JSON_CITY - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Key for JSON object - City
+
+
JSON_CITY_COORD - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Key for JSON object - Coordinates
+
+
JSON_CITY_COORD - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Key for JSON object - Coordinates
+
+
JSON_CITY_COUNTRY_CODE - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Key for JSON variable Country code of city
+
+
JSON_CITY_COUNTRY_CODE - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Key for JSON variable Country code of city
+
+
JSON_CITY_ID - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON variable City code (ID)
+
+
JSON_CITY_ID - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Key for JSON variable City code (ID)
+
+
JSON_CITY_ID - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Key for JSON variable City code (ID)
+
+
JSON_CITY_NAME - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON variable City name
+
+
JSON_CITY_NAME - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Key for JSON variable City name
+
+
JSON_CITY_NAME - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Key for JSON variable City name
+
+
JSON_CITY_POPULATION - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Key for JSON variable Population of city
+
+
JSON_CITY_POPULATION - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Key for JSON variable Population of city
+
+
JSON_CLOUDS - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON object - Clouds
+
+
JSON_CLOUDS_ALL - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Key for JSON variable Clouds -> All + (percentage of all clouds)
+
+
JSON_COORD - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON object - Coordinates (Geographic coordinates)
+
+
JSON_COORD_LATITUDE - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Key for JSON variable Coord -> Latitude
+
+
JSON_COORD_LONGITUDE - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Key for JSON variable Coord -> Longitude
+
+
JSON_DATE_TIME - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON variable Date-Time (date & time of the weather)
+
+
JSON_DATE_TIME_TEXT - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Key for JSON variable Date time text
+
+
JSON_FORECAST_CLOUDS - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON variable Percentage of clouds
+
+
JSON_FORECAST_HUMIDITY - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON variable Humidity
+
+
JSON_FORECAST_LIST - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Key for JSON object - List of forecasts
+
+
JSON_FORECAST_LIST - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Key for JSON object - List of forecasts
+
+
JSON_FORECAST_PRESSURE - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON variable Pressure
+
+
JSON_FORECAST_WIND_DEGREE - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON variable Wind degree
+
+
JSON_FORECAST_WIND_SPEED - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON variable Wind speed
+
+
JSON_MAIN - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON object - Main (Temperature, pressure, etc.)
+
+
JSON_MAIN_GRND_LEVEL - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Key for JSON variable Main -> Ground level
+
+
JSON_MAIN_HUMIDITY - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Key for JSON variable Main -> Humidity
+
+
JSON_MAIN_PRESSURE - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Key for JSON variable Main -> Pressure
+
+
JSON_MAIN_SEA_LEVEL - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Key for JSON variable Main -> Sea level
+
+
JSON_MAIN_TEMP - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Key for JSON variable Main -> Temperature
+
+
JSON_MAIN_TEMP_MAX - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Key for JSON variable Main -> Maximum temperature
+
+
JSON_MAIN_TEMP_MIN - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Key for JSON variable Main -> Minimum temperature
+
+
JSON_MAIN_TMP_KF - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Key for JSON variable Main -> Temperature KF
+
+
JSON_RAIN - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON object - Rain
+
+
JSON_RAIN_3HOURS - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
+
Key for JSON variable Rain -> Rain per 3 hours
+
+
JSON_RESPONSE_CODE - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON variable Response code
+
+
JSON_RESPONSE_CODE - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Key for JSON variable Response code
+
+
JSON_RESPONSE_CODE - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Key for JSON variable Response code
+
+
JSON_RESPONSE_FORECAST_COUNT - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Key for JSON variable Forecast count
+
+
JSON_RESPONSE_FORECAST_COUNT - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Key for JSON variable Forecast count
+
+
JSON_RESPONSE_TIME - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Key for JSON variable Response time
+
+
JSON_RESPONSE_TIME - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Key for JSON variable Response time
+
+
JSON_SYS - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Key for JSON object - Sys
+
+
JSON_SYS - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Key for JSON object - Sys (pod, etc.)
+
+
JSON_SYS_COUNTRY_CODE - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Key for JSON variable Sys -> Country
+
+
JSON_SYS_POD - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
+
Key for JSON variable Sys -> Pod
+
+
JSON_SYS_SUNRISE - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Key for JSON variable Sys -> Sunrise
+
+
JSON_SYS_SUNSET - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Key for JSON variable Sys -> Sunset
+
+
JSON_TEMP - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Key for JSON object - Temperature
+
+
JSON_TEMP_DAY - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Day
+
+
JSON_TEMP_EVENING - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Evening
+
+
JSON_TEMP_MAX - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Maximum
+
+
JSON_TEMP_MIN - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Minimum
+
+
JSON_TEMP_MORNING - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Morning
+
+
JSON_TEMP_NIGHT - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Key for JSON variable Temp -> Night
+
+
JSON_WEATHER - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON array - Weather (Weather name, description, etc.)
+
+
JSON_WEATHER_DESCRIPTION - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Key for JSON variable Weather -> Description
+
+
JSON_WEATHER_ICON - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Key for JSON variable in array Weather -> Icon
+
+
JSON_WEATHER_ID - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Key for JSON variable in array Weather -> ID
+
+
JSON_WEATHER_MAIN - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Key for JSON variable in array Weather -> Main (name of weather)
+
+
JSON_WIND - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Key for JSON object - Wind
+
+
JSON_WIND_DEGREE - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Key for JSON variable Wind -> Degree
+
+
JSON_WIND_GUST - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
+
Key for JSON variable Wind -> Gust
+
+
JSON_WIND_SPEED - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Key for JSON variable Wind -> Speed
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-11.html b/javadoc/index-files/index-11.html new file mode 100644 index 0000000..be83700 --- /dev/null +++ b/javadoc/index-files/index-11.html @@ -0,0 +1,125 @@ + + + + + + +L-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

L

+
+
lat - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Latitude
+
+
lon - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Longitude
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-12.html b/javadoc/index-files/index-12.html new file mode 100644 index 0000000..30725f1 --- /dev/null +++ b/javadoc/index-files/index-12.html @@ -0,0 +1,141 @@ + + + + + + +M-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

M

+
+
main - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
main - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
maxTemp - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Maximum temperature
+
+
maxTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Maximum temperature
+
+
minTemp - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Minimum temperature
+
+
minTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Minimum temperature
+
+
mornTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Morning temperature
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-13.html b/javadoc/index-files/index-13.html new file mode 100644 index 0000000..bfc002c --- /dev/null +++ b/javadoc/index-files/index-13.html @@ -0,0 +1,127 @@ + + + + + + +N-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

N

+
+
name - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Weather name
+
+
net.aksingh.java.api.owm - package net.aksingh.java.api.owm
+
 
+
nightTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Night temperature
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-14.html b/javadoc/index-files/index-14.html new file mode 100644 index 0000000..0ef1ec8 --- /dev/null +++ b/javadoc/index-files/index-14.html @@ -0,0 +1,146 @@ + + + + + + +O-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

O

+
+
OpenWeatherMap - Class in net.aksingh.java.api.owm
+
+
Provides methods to get weather, forecast, and other data from + OpenWeatherMap.org
+
+
OpenWeatherMap(String) - Constructor for class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
OpenWeatherMap(OpenWeatherMap.OWM_URL, String) - Constructor for class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
OpenWeatherMap.OWM_Response - Class in net.aksingh.java.api.owm
+
 
+
OpenWeatherMap.OWM_Response(String) - Constructor for class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
OpenWeatherMap.OWM_Response(OpenWeatherMap.OWM_URL, String) - Constructor for class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
OpenWeatherMap.OWM_URL - Enum in net.aksingh.java.api.owm
+
 
+
OpenWeatherMap.OWM_URL(String) - Constructor for enum net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL
+
 
+
OWM_APPID_VALUE - Variable in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
OWM_MODE_VALUE - Variable in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
OWM_UNITS_VALUE - Variable in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
owmResponse - Variable in class net.aksingh.java.api.owm.OpenWeatherMap
+
+
Declaring this class
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-15.html b/javadoc/index-files/index-15.html new file mode 100644 index 0000000..65b1970 --- /dev/null +++ b/javadoc/index-files/index-15.html @@ -0,0 +1,141 @@ + + + + + + +P-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

P

+
+
percentOfClouds - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Percentage of all clouds
+
+
pod - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
+
Pod
+
+
population - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Population of city
+
+
population - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Population of city
+
+
pressure - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Pressure
+
+
pressure - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Pressure
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-16.html b/javadoc/index-files/index-16.html new file mode 100644 index 0000000..e006140 --- /dev/null +++ b/javadoc/index-files/index-16.html @@ -0,0 +1,151 @@ + + + + + + +R-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

R

+
+
rain - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
rain3h - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
+
Rain per 3 hours
+
+
responseCode - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Response code
+
+
responseCode - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Response code
+
+
responseCode - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Response code
+
+
responseForecastCount - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Forecast count
+
+
responseForecastCount - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Forecast count
+
+
responseTime - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Response time
+
+
responseTime - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Response time
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-17.html b/javadoc/index-files/index-17.html new file mode 100644 index 0000000..aacf383 --- /dev/null +++ b/javadoc/index-files/index-17.html @@ -0,0 +1,142 @@ + + + + + + +S-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

S

+
+
seaLevel - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Sea level
+
+
speed - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Wind speed
+
+
strictAddress(String) - Static method in class net.aksingh.java.api.owm.Tools.HTML
+
+
Stricts a non-strict or non-compliant web address + to a proper URL.
+
+
sunrise - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Sunrise time
+
+
sunset - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Sunset time
+
+
sys - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
sys - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-18.html b/javadoc/index-files/index-18.html new file mode 100644 index 0000000..b1bf241 --- /dev/null +++ b/javadoc/index-files/index-18.html @@ -0,0 +1,152 @@ + + + + + + +T-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

T

+
+
temp - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Temperature
+
+
temp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
tempKF - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Temperature KF
+
+
Tools - Class in net.aksingh.java.api.owm
+
+
Provides various tools, which help doing tasks in this application.
+
+
Tools() - Constructor for class net.aksingh.java.api.owm.Tools
+
 
+
Tools.Convertor - Class in net.aksingh.java.api.owm
+
+
Provides methods to do conversions.
+
+
Tools.Convertor() - Constructor for class net.aksingh.java.api.owm.Tools.Convertor
+
 
+
Tools.Downloader - Class in net.aksingh.java.api.owm
+
+
Provides methods to download data or files from the Internet.
+
+
Tools.Downloader() - Constructor for class net.aksingh.java.api.owm.Tools.Downloader
+
 
+
Tools.HTML - Class in net.aksingh.java.api.owm
+
+
Provides functions to handle HTML, e.g., correcting + non-compliant or non-strict web addresses, etc.
+
+
Tools.HTML() - Constructor for class net.aksingh.java.api.owm.Tools.HTML
+
 
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-19.html b/javadoc/index-files/index-19.html new file mode 100644 index 0000000..2dab80d --- /dev/null +++ b/javadoc/index-files/index-19.html @@ -0,0 +1,128 @@ + + + + + + +V-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

V

+
+
value - Variable in enum net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL
+
 
+
valueOf(String) - Static method in enum net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-2.html b/javadoc/index-files/index-2.html new file mode 100644 index 0000000..06e2b6f --- /dev/null +++ b/javadoc/index-files/index-2.html @@ -0,0 +1,121 @@ + + + + + + +B-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

B

+
+
base - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Base
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-20.html b/javadoc/index-files/index-20.html new file mode 100644 index 0000000..2dff3c2 --- /dev/null +++ b/javadoc/index-files/index-20.html @@ -0,0 +1,153 @@ + + + + + + +W-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

W

+
+
weatherList - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
List of weather information (code, name, etc.)
+
+
weatherList - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
List of weather information (code, name, etc.)
+
+
weatherList - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
List of weather information (code, name, etc.)
+
+
weatherListCount - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Count (number) of elements in list of weather information
+
+
weatherListCount - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Count (number) of elements in list of weather information
+
+
weatherListCount - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Count (number) of elements in list of weather information
+
+
wind - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
wind - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
windDegree - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Wind degree
+
+
windSpeed - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Wind speed
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-3.html b/javadoc/index-files/index-3.html new file mode 100644 index 0000000..6264871 --- /dev/null +++ b/javadoc/index-files/index-3.html @@ -0,0 +1,308 @@ + + + + + + +C-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

C

+
+
city - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
city - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
cityID - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
City code (ID)
+
+
cityID - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
City code (ID)
+
+
cityID - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
City code (ID)
+
+
cityName - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
+
City name
+
+
cityName - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
City name
+
+
cityName - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
City name
+
+
clouds - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
clouds - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
cloudsPercent - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Percentage of clouds
+
+
convertDegree2Direction(float) - Method in class net.aksingh.java.api.owm.Tools.Convertor
+
+
Converts degree to direction.
+
+
coord - Variable in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
coord - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
coord - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
countryCode - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Country code for the city
+
+
countryCode - Variable in class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Country code of city
+
+
countryCode - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Country code of city
+
+
currentWeatherByCityCode(long) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
currentWeatherByCityCode(long) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
currentWeatherByCityName(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
currentWeatherByCityName(String, String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
currentWeatherByCityName(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
currentWeatherByCityName(String, String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
currentWeatherByCoordinates(float, float) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
currentWeatherByCoordinates(float, float) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
CurrentWeatherData - Class in net.aksingh.java.api.owm
+
+
Parses current weather data (from the JSON data) and provides methods + to get/access the information about current weather.
+
+
CurrentWeatherData(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Clouds - Class in net.aksingh.java.api.owm
+
+
Parses data about clouds (from the JSON data) and provides methods + to get/access the information.
+
+
CurrentWeatherData.Clouds() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Clouds
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Clouds(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Clouds
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Coord - Class in net.aksingh.java.api.owm
+
+
Parses data about geographic coordinates (from the JSON data) + and provides methods to get/access the information.
+
+
CurrentWeatherData.Coord() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Coord
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Coord(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Coord
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Main - Class in net.aksingh.java.api.owm
+
+
Parses data about main weather elements (from the JSON data) and + provides methods to get/access the information.
+
+
CurrentWeatherData.Main() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Main
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Main(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Main
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Rain - Class in net.aksingh.java.api.owm
+
+
Parses data about rain (from the JSON data) and provides methods + to get/access the information.
+
+
CurrentWeatherData.Rain() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Rain(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Sys - Class in net.aksingh.java.api.owm
+
+
Parses data about country, sunrise, and sunset (from the JSON data) + and provides methods to get/access the information.
+
+
CurrentWeatherData.Sys() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Sys(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Weather - Class in net.aksingh.java.api.owm
+
+
Parses data about weather code, name, etc.
+
+
CurrentWeatherData.Weather() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Weather
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Weather(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Weather
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
CurrentWeatherData.Wind - Class in net.aksingh.java.api.owm
+
+
Parses data about winds (from the JSON data) and provides methods + to get/access the information.
+
+
CurrentWeatherData.Wind() - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
+
Non-parameterized constructor
+
+
CurrentWeatherData.Wind(JSONObject) - Constructor for class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
currentWeatherFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-4.html b/javadoc/index-files/index-4.html new file mode 100644 index 0000000..ee92aed --- /dev/null +++ b/javadoc/index-files/index-4.html @@ -0,0 +1,245 @@ + + + + + + +D-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

D

+
+
dailyForecastByCityCode(long, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
dailyForecastByCityCode(long, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
dailyForecastByCityName(String, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
dailyForecastByCityName(String, String, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
dailyForecastByCityName(String, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
dailyForecastByCityName(String, String, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
dailyForecastByCoordinates(float, float, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
dailyForecastByCoordinates(float, float, byte) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
DailyForecastData - Class in net.aksingh.java.api.owm
+
+
Parses daily forecast data (from the JSON data) and provides methods + to get/access the information about daily forecasted weather.
+
+
DailyForecastData(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
DailyForecastData.City - Class in net.aksingh.java.api.owm
+
+
Parses data about city (from the JSON data) + and provides methods to get/access the information.
+
+
DailyForecastData.City() - Constructor for class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Non-parameterized constructor
+
+
DailyForecastData.City(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData.City
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
DailyForecastData.City.Coord - Class in net.aksingh.java.api.owm
+
+
Parses data about geographic coordinates (from the JSON data) + and provides methods to get/access the information.
+
+
DailyForecastData.City.Coord() - Constructor for class net.aksingh.java.api.owm.DailyForecastData.City.Coord
+
+
Non-parameterized constructor
+
+
DailyForecastData.City.Coord(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData.City.Coord
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
DailyForecastData.Forecast - Class in net.aksingh.java.api.owm
+
+
Parses data about forecasts (from the JSON data) + and provides methods to get/access the information.
+
+
DailyForecastData.Forecast() - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Non-parameterized constructor
+
+
DailyForecastData.Forecast(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
DailyForecastData.Forecast.Temperature - Class in net.aksingh.java.api.owm
+
+
Parses data about temperature (from the JSON data) + and provides methods to get/access the information.
+
+
DailyForecastData.Forecast.Temperature() - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Non-parameterized constructor
+
+
DailyForecastData.Forecast.Temperature(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
DailyForecastData.Forecast.Weather - Class in net.aksingh.java.api.owm
+
+
Parses data about weather (from the JSON data) + and provides methods to get/access the information.
+
+
DailyForecastData.Forecast.Weather() - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast.Weather
+
+
Non-parameterized constructor
+
+
DailyForecastData.Forecast.Weather(JSONObject) - Constructor for class net.aksingh.java.api.owm.DailyForecastData.Forecast.Weather
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
dailyForecastFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
dateTime - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Date and time of the weather.
+
+
dateTimeText - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Date time text
+
+
dayTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Day temperature
+
+
degree - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Wind degree (direction of wind)
+
+
description - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Weather description
+
+
downloadPage(String) - Static method in class net.aksingh.java.api.owm.Tools.Downloader
+
+
Downloads a page/content from the Internet.
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-5.html b/javadoc/index-files/index-5.html new file mode 100644 index 0000000..b7657a5 --- /dev/null +++ b/javadoc/index-files/index-5.html @@ -0,0 +1,121 @@ + + + + + + +E-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

E

+
+
eveTemp - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
+
Evening temperature
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-6.html b/javadoc/index-files/index-6.html new file mode 100644 index 0000000..92a70b3 --- /dev/null +++ b/javadoc/index-files/index-6.html @@ -0,0 +1,282 @@ + + + + + + +F-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

F

+
+
forecastList - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
List of forecast information
+
+
forecastList - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
List of forecast information
+
+
forecastListCount - Variable in class net.aksingh.java.api.owm.DailyForecastData
+
+
Count (number) of elements in list of forecast information
+
+
forecastListCount - Variable in class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Count (number) of elements in list of forecast information
+
+
forecastWeatherByCityCode(long) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
forecastWeatherByCityCode(long) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
forecastWeatherByCityName(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
forecastWeatherByCityName(String, String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
forecastWeatherByCityName(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
forecastWeatherByCityName(String, String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
forecastWeatherByCoordinates(float, float) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
forecastWeatherByCoordinates(float, float) - Method in class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
+
 
+
ForecastWeatherData - Class in net.aksingh.java.api.owm
+
+
Parses forecast weather data (from the JSON data) and provides methods + to get/access the information about forecasted weather.
+
+
ForecastWeatherData(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.City - Class in net.aksingh.java.api.owm
+
+
Parses data about city (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.City() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.City(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.City
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.City.Coord - Class in net.aksingh.java.api.owm
+
+
Parses data about geographic coordinates (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.City.Coord() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.City.Coord
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.City.Coord(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.City.Coord
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast - Class in net.aksingh.java.api.owm
+
+
Parses data about forecasts (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast.Clouds - Class in net.aksingh.java.api.owm
+
+
Parses data about clouds (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast.Clouds() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Clouds
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast.Clouds(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Clouds
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast.Main - Class in net.aksingh.java.api.owm
+
+
Parses data about main weather elements (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast.Main() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast.Main(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast.Sys - Class in net.aksingh.java.api.owm
+
+
Parses data about main weather elements (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast.Sys() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast.Sys(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast.Weather - Class in net.aksingh.java.api.owm
+
+
Parses data about weather (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast.Weather() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Weather
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast.Weather(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Weather
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
ForecastWeatherData.Forecast.Wind - Class in net.aksingh.java.api.owm
+
+
Parses data about wind (from the JSON data) + and provides methods to get/access the information.
+
+
ForecastWeatherData.Forecast.Wind() - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Wind
+
+
Non-parameterized constructor
+
+
ForecastWeatherData.Forecast.Wind(JSONObject) - Constructor for class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Wind
+
+
Parameterized constructor + + Initializes variables from values from the given JSON object.
+
+
forecastWeatherFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
+
 
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-7.html b/javadoc/index-files/index-7.html new file mode 100644 index 0000000..e185ecf --- /dev/null +++ b/javadoc/index-files/index-7.html @@ -0,0 +1,317 @@ + + + + + + +G-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

G

+
+
getBaseStation() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getCity_Object() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getCity_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getCityCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getCityCode() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
getCityCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
getCityName() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getCityName() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
getCityName() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
getCityPopulation() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
getCityPopulation() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
getClouds_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getClouds_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getCoordinates_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getCoordinates_Object() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
getCoordinates_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
getCountryCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
getCountryCode() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
getCountryCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
getDateTime() - Method in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Returns data for date and time of this weather.
+
+
getDateTimeText() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getDayTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getEveningTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getForecast_List() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getForecast_List() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getForecast_List_Count() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getForecast_List_Count() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getGroundLevel() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
getHumidity() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Returns data for humidity of the city.
+
+
getHumidity() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getLatitude() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Returns data for latitude of the city.
+
+
getLongitude() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Returns data for longitude of the city.
+
+
getMainData_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getMainData_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getMaximumTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getMaxTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Returns data for maximum temperature of the city.
+
+
getMinimumTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getMinTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Returns data for minimum temperature of the city.
+
+
getMorningTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getNightTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
getParameter() - Method in enum net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL
+
+
Returns the parameter.
+
+
getPercentageOfClouds() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Returns data for percentage of all clouds.
+
+
getPercentageOfClouds() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getPod() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
 
+
getPressure() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Returns data for pressure of the city.
+
+
getPressure() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getRain3Hours() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
 
+
getRain_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getResponseCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getResponseCode() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getResponseCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getResponseForecastCount() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getResponseForecastCount() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getResponseTime() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
getResponseTime() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
getSeaLevel() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
getSunriseTime() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
getSunsetTime() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
getSysData_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getSysData_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Returns data for temperature of the city.
+
+
getTemperature_Object() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getTempKF() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
getWeather_List() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getWeather_List() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getWeather_List() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getWeather_List_Count() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getWeather_List_Count() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getWeather_List_Count() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getWeatherCode() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Returns data for code for weather of the city.
+
+
getWeatherDescription() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Returns data for description for weather of the city.
+
+
getWeatherIconName() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Returns data for name of icon for weather of the city.
+
+
getWeatherName() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Returns data for name for weather of the city.
+
+
getWind_Object() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
getWind_Object() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
getWindDegree() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Returns data for degree of wind in the city.
+
+
getWindDegree() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
getWindGust() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
 
+
getWindSpeed() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Returns data for speed of wind in the city.
+
+
getWindSpeed() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
groundLevel - Variable in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
+
Ground level
+
+
gust - Variable in class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
+
Wind gust
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-8.html b/javadoc/index-files/index-8.html new file mode 100644 index 0000000..f0c38a8 --- /dev/null +++ b/javadoc/index-files/index-8.html @@ -0,0 +1,274 @@ + + + + + + +H-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

H

+
+
hasBaseStation() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
hasCityCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
hasCityCode() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
hasCityCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
hasCityName() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
hasCityName() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
hasCityName() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
hasCityPopulation() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
hasCityPopulation() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
hasCountryCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
hasCountryCode() - Method in class net.aksingh.java.api.owm.DailyForecastData.City
+
 
+
hasCountryCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.City
+
 
+
hasDateTime() - Method in class net.aksingh.java.api.owm.AbstractWeatherData
+
+
Tells if the data for date and time of this weather is available or not.
+
+
hasDateTimeText() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
hasDayTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasEveningTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasForecast_List() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
hasForecast_List() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
hasGroundLevel() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
hasHumidity() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Tells if the data for humidity of the city is available or not.
+
+
hasHumidity() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
hasLatitude() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Tells if the data for latitude of the city is available or not.
+
+
hasLongitude() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Coord
+
+
Tells if the data for longitude of the city is available or not.
+
+
hasMaximumTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasMaxTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Tells if the data for maximum temperature of the city is available or not.
+
+
hasMinimumTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasMinTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Tells if the data for minimum temperature of the city is available or not.
+
+
hasMorningTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasNightTemperature() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
+
 
+
hasPercentageOfClouds() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Clouds
+
+
Tells if the data for percentage of all clouds is available or not.
+
+
hasPercentageOfClouds() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
hasPod() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
+
 
+
hasPressure() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Tells if the data for pressure of the city is available or not.
+
+
hasPressure() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
hasRain3Hours() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Rain
+
 
+
hasResponseCode() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
hasResponseCode() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
hasResponseCode() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
hasResponseForecastCount() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
hasResponseForecastCount() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
hasResponseTime() - Method in class net.aksingh.java.api.owm.DailyForecastData
+
 
+
hasResponseTime() - Method in class net.aksingh.java.api.owm.ForecastWeatherData
+
 
+
hasSeaLevel() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
hasSunriseTime() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
hasSunsetTime() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Sys
+
 
+
hasTemperature() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Tells if the data for temperature of the city is available or not.
+
+
hasTempKF() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main
+
 
+
hasWeather_List() - Method in class net.aksingh.java.api.owm.CurrentWeatherData
+
 
+
hasWeather_List() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
hasWeather_List() - Method in class net.aksingh.java.api.owm.ForecastWeatherData.Forecast
+
 
+
hasWeatherCode() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Tells if the data for weather's code is available or not.
+
+
hasWeatherDescription() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Tells if the data for weather's description is available or not.
+
+
hasWeatherIconName() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Tells if the data for name of weather's icon is available or not.
+
+
hasWeatherName() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Tells if the data for weather's name is available or not.
+
+
hasWindDegree() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Tells if the data for degree (degree gives direction) of wind + in the city is available or not.
+
+
hasWindDegree() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
hasWindGust() - Method in class net.aksingh.java.api.owm.CurrentWeatherData.Wind
+
 
+
hasWindSpeed() - Method in class net.aksingh.java.api.owm.AbstractWeatherData.Wind
+
+
Tells if the data for speed of wind in the city is available or not.
+
+
hasWindSpeed() - Method in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
 
+
humidity - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Main
+
+
Humidity
+
+
humidity - Variable in class net.aksingh.java.api.owm.DailyForecastData.Forecast
+
+
Humidity
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index-files/index-9.html b/javadoc/index-files/index-9.html new file mode 100644 index 0000000..db16e71 --- /dev/null +++ b/javadoc/index-files/index-9.html @@ -0,0 +1,125 @@ + + + + + + +I-Index (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
A B C D E F G H I J L M N O P R S T V W  + + +

I

+
+
icon - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Weather icon
+
+
id - Variable in class net.aksingh.java.api.owm.AbstractWeatherData.Weather
+
+
Weather ID
+
+
+A B C D E F G H I J L M N O P R S T V W 
+ +
+ + + + + +
+ + + + diff --git a/javadoc/index.html b/javadoc/index.html new file mode 100644 index 0000000..77fec28 --- /dev/null +++ b/javadoc/index.html @@ -0,0 +1,31 @@ + + + + + + +OpenWeatherMap.org JAPIs + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="net/aksingh/java/api/owm/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Clouds.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Clouds.html new file mode 100644 index 0000000..c099cfc --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Clouds.html @@ -0,0 +1,382 @@ + + + + + + +AbstractWeatherData.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData.Clouds

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html new file mode 100644 index 0000000..ed7e74b --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html @@ -0,0 +1,446 @@ + + + + + + +AbstractWeatherData.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData.Coord

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html new file mode 100644 index 0000000..0706ad8 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html @@ -0,0 +1,653 @@ + + + + + + +AbstractWeatherData.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData.Main

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html new file mode 100644 index 0000000..e418063 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html @@ -0,0 +1,584 @@ + + + + + + +AbstractWeatherData.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData.Weather

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html new file mode 100644 index 0000000..0c9a434 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html @@ -0,0 +1,450 @@ + + + + + + +AbstractWeatherData.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData.Wind

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html new file mode 100644 index 0000000..fd035f7 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html @@ -0,0 +1,508 @@ + + + + + + +AbstractWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class AbstractWeatherData

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html new file mode 100644 index 0000000..dcd7fe1 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html @@ -0,0 +1,294 @@ + + + + + + +CurrentWeatherData.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Clouds

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html new file mode 100644 index 0000000..8d91a32 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html @@ -0,0 +1,294 @@ + + + + + + +CurrentWeatherData.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Coord

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html new file mode 100644 index 0000000..416f838 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html @@ -0,0 +1,295 @@ + + + + + + +CurrentWeatherData.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Main

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html new file mode 100644 index 0000000..0531bef --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html @@ -0,0 +1,379 @@ + + + + + + +CurrentWeatherData.Rain (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Rain

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html new file mode 100644 index 0000000..f62688b --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html @@ -0,0 +1,498 @@ + + + + + + +CurrentWeatherData.Sys (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Sys

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html new file mode 100644 index 0000000..6b9d44b --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html @@ -0,0 +1,294 @@ + + + + + + +CurrentWeatherData.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Weather

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html new file mode 100644 index 0000000..0554ce8 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html @@ -0,0 +1,391 @@ + + + + + + +CurrentWeatherData.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData.Wind

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html new file mode 100644 index 0000000..cc62158 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html @@ -0,0 +1,874 @@ + + + + + + +CurrentWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class CurrentWeatherData

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html new file mode 100644 index 0000000..f1652eb --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html @@ -0,0 +1,294 @@ + + + + + + +DailyForecastData.City.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData.City.Coord

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html new file mode 100644 index 0000000..747432d --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html @@ -0,0 +1,622 @@ + + + + + + +DailyForecastData.City (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData.City

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html new file mode 100644 index 0000000..0423900 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html @@ -0,0 +1,675 @@ + + + + + + +DailyForecastData.Forecast.Temperature (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData.Forecast.Temperature

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html new file mode 100644 index 0000000..01d2d30 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html @@ -0,0 +1,295 @@ + + + + + + +DailyForecastData.Forecast.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData.Forecast.Weather

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html new file mode 100644 index 0000000..b384b81 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html @@ -0,0 +1,784 @@ + + + + + + +DailyForecastData.Forecast (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData.Forecast

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.html new file mode 100644 index 0000000..7228912 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/DailyForecastData.html @@ -0,0 +1,633 @@ + + + + + + +DailyForecastData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class DailyForecastData

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html new file mode 100644 index 0000000..e09d23f --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html @@ -0,0 +1,294 @@ + + + + + + +ForecastWeatherData.City.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.City.Coord

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html new file mode 100644 index 0000000..c07cb6c --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html @@ -0,0 +1,622 @@ + + + + + + +ForecastWeatherData.City (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.City

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html new file mode 100644 index 0000000..b240382 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html @@ -0,0 +1,294 @@ + + + + + + +ForecastWeatherData.Forecast.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast.Clouds

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Main.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Main.html new file mode 100644 index 0000000..0701ba6 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Main.html @@ -0,0 +1,511 @@ + + + + + + +ForecastWeatherData.Forecast.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast.Main

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html new file mode 100644 index 0000000..58b8fb4 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html @@ -0,0 +1,381 @@ + + + + + + +ForecastWeatherData.Forecast.Sys (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast.Sys

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html new file mode 100644 index 0000000..f3d36a3 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html @@ -0,0 +1,296 @@ + + + + + + +ForecastWeatherData.Forecast.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast.Weather

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html new file mode 100644 index 0000000..ebaecf3 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html @@ -0,0 +1,294 @@ + + + + + + +ForecastWeatherData.Forecast.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast.Wind

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html new file mode 100644 index 0000000..4bb7a01 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html @@ -0,0 +1,647 @@ + + + + + + +ForecastWeatherData.Forecast (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData.Forecast

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html new file mode 100644 index 0000000..a45dc10 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html @@ -0,0 +1,633 @@ + + + + + + +ForecastWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class ForecastWeatherData

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html new file mode 100644 index 0000000..6ff51e9 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html @@ -0,0 +1,558 @@ + + + + + + +OpenWeatherMap.OWM_Response (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class OpenWeatherMap.OWM_Response

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html new file mode 100644 index 0000000..4802863 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html @@ -0,0 +1,545 @@ + + + + + + +OpenWeatherMap.OWM_URL (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Enum OpenWeatherMap.OWM_URL

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html new file mode 100644 index 0000000..12dba28 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html @@ -0,0 +1,646 @@ + + + + + + +OpenWeatherMap (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class OpenWeatherMap

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html b/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html new file mode 100644 index 0000000..202649f --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html @@ -0,0 +1,274 @@ + + + + + + +Tools.Convertor (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class Tools.Convertor

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html b/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html new file mode 100644 index 0000000..d97be95 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html @@ -0,0 +1,282 @@ + + + + + + +Tools.Downloader (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class Tools.Downloader

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/Tools.HTML.html b/javadoc/net/aksingh/java/api/owm/Tools.HTML.html new file mode 100644 index 0000000..b225645 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/Tools.HTML.html @@ -0,0 +1,278 @@ + + + + + + +Tools.HTML (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class Tools.HTML

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/Tools.html b/javadoc/net/aksingh/java/api/owm/Tools.html new file mode 100644 index 0000000..e197a1e --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/Tools.html @@ -0,0 +1,275 @@ + + + + + + +Tools (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + + +
+
net.aksingh.java.api.owm
+

Class Tools

+
+
+ +
+ +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Clouds.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Clouds.html new file mode 100644 index 0000000..fb461a9 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Clouds.html @@ -0,0 +1,149 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData.Clouds

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Coord.html new file mode 100644 index 0000000..43c8ed8 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Coord.html @@ -0,0 +1,156 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData.Coord

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Main.html new file mode 100644 index 0000000..62037a9 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Main.html @@ -0,0 +1,149 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData.Main

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Weather.html new file mode 100644 index 0000000..f6da4c7 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Weather.html @@ -0,0 +1,155 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData.Weather

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Wind.html new file mode 100644 index 0000000..bf598db --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Wind.html @@ -0,0 +1,149 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData.Wind

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.html b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.html new file mode 100644 index 0000000..5839d98 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.html @@ -0,0 +1,156 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.AbstractWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.AbstractWeatherData

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Clouds.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Clouds.html new file mode 100644 index 0000000..1a0634a --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Clouds.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Clouds

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Coord.html new file mode 100644 index 0000000..ef174cf --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Coord.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Coord

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Main.html new file mode 100644 index 0000000..4a8ed56 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Main.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Main

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Rain.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Rain.html new file mode 100644 index 0000000..ed1c63a --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Rain.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Rain (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Rain

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Sys.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Sys.html new file mode 100644 index 0000000..d662b72 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Sys.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Sys (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Sys

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Weather.html new file mode 100644 index 0000000..147caac --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Weather.html @@ -0,0 +1,154 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Weather

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Wind.html new file mode 100644 index 0000000..a2e6e13 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Wind.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData.Wind

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.html b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.html new file mode 100644 index 0000000..571a3ee --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.html @@ -0,0 +1,157 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.CurrentWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.CurrentWeatherData

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.Coord.html new file mode 100644 index 0000000..7d60d17 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.Coord.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData.City.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData.City.Coord

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.html new file mode 100644 index 0000000..a6b41a5 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData.City (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData.City

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Temperature.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Temperature.html new file mode 100644 index 0000000..1560fff --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Temperature.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Weather.html new file mode 100644 index 0000000..fec4dcf --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Weather.html @@ -0,0 +1,154 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData.Forecast.Weather

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.html new file mode 100644 index 0000000..2ed7396 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.html @@ -0,0 +1,154 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData.Forecast

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.html b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.html new file mode 100644 index 0000000..d196950 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.html @@ -0,0 +1,161 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.DailyForecastData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.DailyForecastData

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.Coord.html new file mode 100644 index 0000000..0d0ba34 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.Coord.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.City.Coord (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.City.Coord

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.html new file mode 100644 index 0000000..84c179f --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.City (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.City

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Clouds.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Clouds.html new file mode 100644 index 0000000..9a8fdac --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Clouds.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Clouds (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Clouds

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Main.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Main.html new file mode 100644 index 0000000..bec95e3 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Main.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Sys.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Sys.html new file mode 100644 index 0000000..2104b3b --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Sys.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Weather.html new file mode 100644 index 0000000..5498569 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Weather.html @@ -0,0 +1,154 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Weather (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Weather

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Wind.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Wind.html new file mode 100644 index 0000000..1599b42 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Wind.html @@ -0,0 +1,152 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Wind (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Wind

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.html new file mode 100644 index 0000000..3a6c7cd --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.html @@ -0,0 +1,154 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData.Forecast

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.html b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.html new file mode 100644 index 0000000..58aaf12 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.html @@ -0,0 +1,157 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.ForecastWeatherData (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.ForecastWeatherData

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_Response.html b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_Response.html new file mode 100644 index 0000000..b208be5 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_Response.html @@ -0,0 +1,141 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_URL.html b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_URL.html new file mode 100644 index 0000000..b1bbfbe --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_URL.html @@ -0,0 +1,164 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.html b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.html new file mode 100644 index 0000000..a8fe557 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.OpenWeatherMap (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.OpenWeatherMap

+
+
No usage of net.aksingh.java.api.owm.OpenWeatherMap
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/Tools.Convertor.html b/javadoc/net/aksingh/java/api/owm/class-use/Tools.Convertor.html new file mode 100644 index 0000000..cb5e751 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/Tools.Convertor.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.Tools.Convertor (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.Tools.Convertor

+
+
No usage of net.aksingh.java.api.owm.Tools.Convertor
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/Tools.Downloader.html b/javadoc/net/aksingh/java/api/owm/class-use/Tools.Downloader.html new file mode 100644 index 0000000..681ddfe --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/Tools.Downloader.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.Tools.Downloader (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.Tools.Downloader

+
+
No usage of net.aksingh.java.api.owm.Tools.Downloader
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/Tools.HTML.html b/javadoc/net/aksingh/java/api/owm/class-use/Tools.HTML.html new file mode 100644 index 0000000..91492ae --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/Tools.HTML.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.Tools.HTML (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.Tools.HTML

+
+
No usage of net.aksingh.java.api.owm.Tools.HTML
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/class-use/Tools.html b/javadoc/net/aksingh/java/api/owm/class-use/Tools.html new file mode 100644 index 0000000..c861c46 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/class-use/Tools.html @@ -0,0 +1,114 @@ + + + + + + +Uses of Class net.aksingh.java.api.owm.Tools (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Class
net.aksingh.java.api.owm.Tools

+
+
No usage of net.aksingh.java.api.owm.Tools
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/package-frame.html b/javadoc/net/aksingh/java/api/owm/package-frame.html new file mode 100644 index 0000000..02b0c9f --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/package-frame.html @@ -0,0 +1,58 @@ + + + + + + +net.aksingh.java.api.owm (OpenWeatherMap.org JAPIs) + + + + +

net.aksingh.java.api.owm

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/javadoc/net/aksingh/java/api/owm/package-summary.html b/javadoc/net/aksingh/java/api/owm/package-summary.html new file mode 100644 index 0000000..1d23993 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/package-summary.html @@ -0,0 +1,376 @@ + + + + + + +net.aksingh.java.api.owm (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Package net.aksingh.java.api.owm

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/package-tree.html b/javadoc/net/aksingh/java/api/owm/package-tree.html new file mode 100644 index 0000000..1b97798 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/package-tree.html @@ -0,0 +1,187 @@ + + + + + + +net.aksingh.java.api.owm Class Hierarchy (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For Package net.aksingh.java.api.owm

+
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/net/aksingh/java/api/owm/package-use.html b/javadoc/net/aksingh/java/api/owm/package-use.html new file mode 100644 index 0000000..bc0fb77 --- /dev/null +++ b/javadoc/net/aksingh/java/api/owm/package-use.html @@ -0,0 +1,303 @@ + + + + + + +Uses of Package net.aksingh.java.api.owm (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Uses of Package
net.aksingh.java.api.owm

+
+
+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/overview-tree.html b/javadoc/overview-tree.html new file mode 100644 index 0000000..62e266e --- /dev/null +++ b/javadoc/overview-tree.html @@ -0,0 +1,191 @@ + + + + + + +Class Hierarchy (OpenWeatherMap.org JAPIs) + + + + + + + +
+ + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + +
+ + + + diff --git a/javadoc/package-list b/javadoc/package-list new file mode 100644 index 0000000..ad480da --- /dev/null +++ b/javadoc/package-list @@ -0,0 +1 @@ +net.aksingh.java.api.owm diff --git a/javadoc/resources/background.gif b/javadoc/resources/background.gif new file mode 100644 index 0000000..f471940 Binary files /dev/null and b/javadoc/resources/background.gif differ diff --git a/javadoc/resources/tab.gif b/javadoc/resources/tab.gif new file mode 100644 index 0000000..1a73a83 Binary files /dev/null and b/javadoc/resources/tab.gif differ diff --git a/javadoc/resources/titlebar.gif b/javadoc/resources/titlebar.gif new file mode 100644 index 0000000..17443b3 Binary files /dev/null and b/javadoc/resources/titlebar.gif differ diff --git a/javadoc/resources/titlebar_end.gif b/javadoc/resources/titlebar_end.gif new file mode 100644 index 0000000..3ad78d4 Binary files /dev/null and b/javadoc/resources/titlebar_end.gif differ diff --git a/javadoc/stylesheet.css b/javadoc/stylesheet.css new file mode 100644 index 0000000..0aeaa97 --- /dev/null +++ b/javadoc/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/lib/JSON.jar b/lib/JSON.jar new file mode 100644 index 0000000..f51e9de Binary files /dev/null and b/lib/JSON.jar differ diff --git a/src/net/aksingh/java/api/owm/AbstractWeatherData.java b/src/net/aksingh/java/api/owm/AbstractWeatherData.java new file mode 100644 index 0000000..b9c029b --- /dev/null +++ b/src/net/aksingh/java/api/owm/AbstractWeatherData.java @@ -0,0 +1,633 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.util.Date; +import org.json.JSONObject; + +/** + * This class provides default implementations for {@link net.aksingh.java.api.owm.CurrentWeatherData} + * and {@link net.aksingh.java.api.owm.ForecastWeatherData} classes. + * Standard behaviors like the has and the get + * methods for information about weather or forecast (for example, + * temperature, pressure, weather, clouds, wind, etc.) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/26 + * @since 2.5.0.1 + */ +abstract public class AbstractWeatherData { + /** Key for JSON object - Clouds */ + protected final String JSON_CLOUDS = "clouds"; + /** Key for JSON object - Coordinates (Geographic coordinates) */ + protected final String JSON_COORD = "coord"; + /** Key for JSON object - Main (Temperature, pressure, etc.) */ + protected final String JSON_MAIN = "main"; + /** Key for JSON array - Weather (Weather name, description, etc.) */ + protected final String JSON_WEATHER = "weather"; + /** Key for JSON object - Wind */ + protected final String JSON_WIND = "wind"; + + + /* + ************************ + * Defining sub-classes + ************************ + */ + + /** + * This class provides default implementations for Clouds. + * Standard behaviors like the has and the get + * methods for information about clouds (for example, percentage of + * clouds, etc.) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/27 + * @since 2.5.0.1 + */ + abstract public static class Clouds { + /** + * Key for JSON variable Clouds -> All + * (percentage of all clouds) + */ + private final String JSON_CLOUDS_ALL = "all"; + + /** Percentage of all clouds */ + private final float percentOfClouds; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Clouds() { + this.percentOfClouds = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public Clouds(JSONObject jsonObj) { + this.percentOfClouds = (float) jsonObj.optDouble(this.JSON_CLOUDS_ALL, Double.NaN); + } + + /** + * Tells if the data for percentage of all clouds is available or not. + * @return true if data available, otherwise false + */ + public boolean hasPercentageOfClouds() { + return (this.percentOfClouds != Float.NaN); + } + + /** + * Returns data for percentage of all clouds. + * @return Percentage of all clouds if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getPercentageOfClouds() { + return this.percentOfClouds; + } + } + + + /** + * This class provides default implementations for Coord. + * Standard behaviors like the has and the get + * methods for information about geographic coordinates (latitude + * and longitude) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/28 + */ + abstract public static class Coord { + /** Key for JSON variable Coord -> Latitude */ + private final String JSON_COORD_LATITUDE = "lat"; + /** Key for JSON variable Coord -> Longitude */ + private final String JSON_COORD_LONGITUDE = "lon"; + + /** Latitude */ + private final float lat; + /** Longitude */ + private final float lon; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Coord() { + this.lat = Float.NaN; + this.lon = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about coordinates + */ + public Coord(JSONObject jsonObj) { + this.lat = (float) jsonObj.optDouble(this.JSON_COORD_LATITUDE, Double.NaN); + this.lon = (float) jsonObj.optDouble(this.JSON_COORD_LONGITUDE, Double.NaN); + } + + /** + * Tells if the data for latitude of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasLatitude() { + return (this.lat != Float.NaN); + } + + /** + * Tells if the data for longitude of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasLongitude() { + return (this.lon != Float.NaN); + } + + /** + * Returns data for latitude of the city. + * @return Latitude of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getLatitude() { + return this.lat; + } + + /** + * Returns data for longitude of the city. + * @return Longitude of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getLongitude() { + return this.lon; + } + } + + + /** + * This class provides default implementations for Main. + * Standard behaviors like the has and the get + * methods for information about main weather elements (for example, + * temperature, pressure, humidity, etc.) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/28 + * @since 2.5.0.1 + */ + abstract public static class Main { + /** Key for JSON variable Main -> Temperature */ + private final String JSON_MAIN_TEMP = "temp"; + /** Key for JSON variable Main -> Minimum temperature */ + private final String JSON_MAIN_TEMP_MIN = "temp_min"; + /** Key for JSON variable Main -> Maximum temperature */ + private final String JSON_MAIN_TEMP_MAX = "temp_max"; + /** Key for JSON variable Main -> Pressure */ + private final String JSON_MAIN_PRESSURE = "pressure"; + /** Key for JSON variable Main -> Humidity */ + private final String JSON_MAIN_HUMIDITY = "humidity"; + + /** Temperature */ + private final float temp; + /** Minimum temperature */ + private final float minTemp; + /** Maximum temperature */ + private final float maxTemp; + /** Pressure */ + private final float pressure; + /** Humidity */ + private final float humidity; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Main() { + this.temp = Float.NaN; + this.minTemp = Float.NaN; + this.maxTemp = Float.NaN; + this.pressure = Float.NaN; + this.humidity = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about main weather + * elements. For example, temperature, pressure, etc. + */ + public Main(JSONObject jsonObj) { + this.temp = (float) jsonObj.optDouble(this.JSON_MAIN_TEMP, Double.NaN); + this.minTemp = (float) jsonObj.optDouble(this.JSON_MAIN_TEMP_MIN, Double.NaN); + this.maxTemp = (float) jsonObj.optDouble(this.JSON_MAIN_TEMP_MAX, Double.NaN); + this.pressure = (float) jsonObj.optDouble(this.JSON_MAIN_PRESSURE, Double.NaN); + this.humidity = (float) jsonObj.optDouble(this.JSON_MAIN_HUMIDITY, Double.NaN); + } + + /** + * Tells if the data for temperature of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasTemperature() { + return (this.temp != Float.NaN); + } + + /** + * Tells if the data for minimum temperature of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasMinTemperature() { + return (this.minTemp != Float.NaN); + } + + /** + * Tells if the data for maximum temperature of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasMaxTemperature() { + return (this.maxTemp != Float.NaN); + } + + /** + * Tells if the data for pressure of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasPressure() { + return (this.pressure != Float.NaN); + } + + /** + * Tells if the data for humidity of the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasHumidity() { + return (this.humidity != Float.NaN); + } + + /** + * Returns data for temperature of the city. + * @return Temperature of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getTemperature() { + return this.temp; + } + + /** + * Returns data for minimum temperature of the city. + * @return Minimum temperature of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getMinTemperature() { + return this.minTemp; + } + + /** + * Returns data for maximum temperature of the city. + * @return Maximum temperature of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getMaxTemperature() { + return this.maxTemp; + } + + /** + * Returns data for pressure of the city. + * @return Pressure of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getPressure() { + return this.pressure; + } + + /** + * Returns data for humidity of the city. + * @return Humidity of the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getHumidity() { + return this.humidity; + } + } + + + /** + * This class provides default implementations for Weather. + * Standard behaviors like the has and the get + * methods for information about weather (for example, id, name, + * description, icon, etc.) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/28 + * @since 2.5.0.1 + */ + abstract public static class Weather { + /** Key for JSON variable in array Weather -> ID */ + private final String JSON_WEATHER_ID = "id"; + /** Key for JSON variable in array Weather -> Main (name of weather) */ + private final String JSON_WEATHER_MAIN = "main"; + /** Key for JSON variable Weather -> Description */ + private final String JSON_WEATHER_DESCRIPTION = "description"; + /** Key for JSON variable in array Weather -> Icon */ + private final String JSON_WEATHER_ICON = "icon"; + + /** Weather ID */ + private final int id; + /** Weather name */ + private final String name; + /** Weather description */ + private final String description; + /** Weather icon */ + private final String icon; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Weather() { + this.id = Integer.MIN_VALUE; + this.name = null; + this.description = null; + this.icon = null; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about weather id, name, etc. + */ + public Weather(JSONObject jsonObj) { + this.id = jsonObj.optInt(this.JSON_WEATHER_ID, Integer.MIN_VALUE); + this.name = jsonObj.optString(this.JSON_WEATHER_MAIN, null); + this.description = jsonObj.optString(this.JSON_WEATHER_DESCRIPTION, null); + this.icon = jsonObj.optString(this.JSON_WEATHER_ICON, null); + } + + /** + * Tells if the data for weather's code is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWeatherCode() { + return (this.id != Integer.MIN_VALUE); + } + + /** + * Tells if the data for weather's name is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWeatherName() { + return (this.name != null); + } + + /** + * Tells if the data for weather's description is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWeatherDescription() { + return (this.description != null); + } + + /** + * Tells if the data for name of weather's icon is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWeatherIconName() { + return (this.icon != null); + } + + /** + * Returns data for code for weather of the city. + * @return Code for weather of the city if available, + * otherwise Integer.MIN_VALUE + */ + public int getWeatherCode() { + return this.id; + } + + /** + * Returns data for name for weather of the city. + * @return Name for weather of the city if available, + * otherwise null + */ + public String getWeatherName() { + return this.name; + } + + /** + * Returns data for description for weather of the city. + * @return Description for weather of the city if available, + * otherwise null + */ + public String getWeatherDescription() { + return this.description; + } + + /** + * Returns data for name of icon for weather of the city. + * @return Name of icon for weather of the city if available, + * otherwise null + */ + public String getWeatherIconName() { + return this.icon; + } + } + + + /** + * This class provides default implementations for Wind. + * Standard behaviors like the has and the get + * methods for information about wind (for example, speed, degree, + * etc.) are defined here. + * + * @author Ashutosh Kumar Singh + * @version 2013/07/28 + * @since 2.5.0.1 + */ + abstract public static class Wind { + /** Key for JSON variable Wind -> Speed */ + private final String JSON_WIND_SPEED = "speed"; + /** Key for JSON variable Wind -> Degree */ + private final String JSON_WIND_DEGREE = "deg"; + + /** Wind speed */ + private final float speed; + /** Wind degree (direction of wind) */ + private final float degree; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Wind() { + this.speed = Float.NaN; + this.degree = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about wind + */ + public Wind(JSONObject jsonObj) { + this.speed = (float) jsonObj.optDouble(this.JSON_WIND_SPEED, Double.NaN); + this.degree = (float) jsonObj.optDouble(this.JSON_WIND_DEGREE, Double.NaN); + } + + /** + * Tells if the data for speed of wind in the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWindSpeed() { + return (this.speed != Float.NaN); + } + + /** + * Tells if the data for degree (degree gives direction) of wind + * in the city is available or not. + * @return true if data available, otherwise false + */ + public boolean hasWindDegree() { + return (this.hasWindSpeed() && (this.degree != Float.NaN)); + } + + /** + * Returns data for speed of wind in the city. + * @return Speed of wind in the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getWindSpeed() { + return this.speed; + } + + /** + * Returns data for degree of wind in the city. + * @return Degree of wind in the city if available, + * otherwise Float.NaN, i.e., Not a Number. + */ + public float getWindDegree() { + return this.degree; + } + } + + + /* + *********************** + * Declaring this class + *********************** + */ + + /** Key for JSON variable Date-Time (date & time of the weather) */ + private final String JSON_DATE_TIME = "dt"; + + /** + * Date and time of the weather. This is answer for the question that + * when is/will be this weather. + */ + private final Date dateTime; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public AbstractWeatherData() { + this.dateTime = null; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing weather data + */ + public AbstractWeatherData(JSONObject jsonObj) { + // getting seconds from the data + long sec = (jsonObj != null) ? jsonObj.optLong(this.JSON_DATE_TIME, Long.MIN_VALUE) : Long.MIN_VALUE; + + // converting seconds to Date object + if (sec != Long.MIN_VALUE) { + this.dateTime = new Date(sec); + } else { + this.dateTime = null; + } + } + + /** + * Tells if the data for date and time of this weather is available or not. + * @return true if data available, otherwise false + */ + public boolean hasDateTime() { + return (this.dateTime != null); + } + + /** + * Returns data for date and time of this weather. + * @return Date and time (in object of {@link java.util.Date}) if available, + * otherwise null + */ + public Date getDateTime() { + return this.dateTime; + } +} diff --git a/src/net/aksingh/java/api/owm/CurrentWeatherData.java b/src/net/aksingh/java/api/owm/CurrentWeatherData.java new file mode 100644 index 0000000..3caa8ca --- /dev/null +++ b/src/net/aksingh/java/api/owm/CurrentWeatherData.java @@ -0,0 +1,656 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import org.json.JSONArray; +import org.json.JSONObject; + +/** + * Parses current weather data (from the JSON data) and provides methods + * to get/access the information about current weather. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ +public class CurrentWeatherData extends AbstractWeatherData { + /** Key for JSON object - Rain */ + private final String JSON_RAIN = "rain"; + /** Key for JSON object - Sys */ + private final String JSON_SYS = "sys"; + + + /* + ************************ + * Declaring sub-classes + ************************ + */ + + /** + * Parses data about clouds (from the JSON data) and provides methods + * to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Clouds extends AbstractWeatherData.Clouds { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Clouds() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public Clouds(JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** + * Parses data about geographic coordinates (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Coord extends AbstractWeatherData.Coord { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Coord() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about coordinates + */ + public Coord(JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** + * Parses data about main weather elements (from the JSON data) and + * provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Main extends AbstractWeatherData.Main { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Main() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about main + * weather elements (temperature, pressure, etc.) + */ + public Main(JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** + * Parses data about rain (from the JSON data) and provides methods + * to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Rain { + /** Key for JSON variable Rain -> Rain per 3 hours */ + private final String JSON_RAIN_3HOURS = "3h"; + + /** Rain per 3 hours */ + private final float rain3h; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Rain() { + this.rain3h = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about rain + */ + public Rain(JSONObject jsonObj) { + this.rain3h = (float) jsonObj.optDouble(this.JSON_RAIN_3HOURS, Double.NaN); + } + + public boolean hasRain3Hours() { + return (this.rain3h != Float.NaN); + } + + public float getRain3Hours() { + return this.rain3h; + } + } + + + /** + * Parses data about country, sunrise, and sunset (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Sys { + /** Key for JSON variable Sys -> Country */ + private final String JSON_SYS_COUNTRY_CODE = "country"; + /** Key for JSON variable Sys -> Sunrise */ + private final String JSON_SYS_SUNRISE = "sunrise"; + /** Key for JSON variable Sys -> Sunset */ + private final String JSON_SYS_SUNSET = "sunset"; + + /** Country code for the city */ + private final String countryCode; + /** Sunrise time */ + private final Date sunrise; + /** Sunset time */ + private final Date sunset; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Sys() { + this.countryCode = null; + this.sunrise = null; + this.sunset = null; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about country, sunrise, + * and sunset. + */ + public Sys(JSONObject jsonObj) { + this.countryCode = jsonObj.optString(this.JSON_SYS_COUNTRY_CODE, null); + + long sr_secs = jsonObj.optLong(this.JSON_SYS_SUNRISE, Long.MIN_VALUE); + if (sr_secs != Long.MIN_VALUE) { + this.sunrise = new Date(sr_secs); + } else { + this.sunrise = null; + } + + long ss_secs = jsonObj.optLong(this.JSON_SYS_SUNSET, Long.MIN_VALUE); + if (ss_secs != Long.MIN_VALUE) { + this.sunset = new Date(ss_secs); + } else { + this.sunset = null; + } + } + + public boolean hasCountryCode() { + return (this.countryCode != null); + } + + public boolean hasSunriseTime() { + return (this.sunrise != null); + } + + public boolean hasSunsetTime() { + return (this.sunset != null); + } + + public String getCountryCode() { + return this.countryCode; + } + + public Date getSunriseTime() { + return this.sunrise; + } + + public Date getSunsetTime() { + return this.sunset; + } + } + + + /** + * Parses data about weather code, name, etc. (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Weather extends AbstractWeatherData.Weather { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Weather () { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about weather id, name, etc. + */ + public Weather (JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** + * Parses data about winds (from the JSON data) and provides methods + * to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Wind extends AbstractWeatherData.Wind { + /** Key for JSON variable Wind -> Gust */ + private final String JSON_WIND_GUST = "gust"; + + /** Wind gust */ + private final float gust; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Wind () { + super (); + + this.gust = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about wind + */ + public Wind (JSONObject jsonObj) { + super (jsonObj); + + this.gust = (float) jsonObj.optDouble(this.JSON_WIND_GUST, Double.NaN); + } + + public boolean hasWindGust() { + return (this.gust != Float.NaN); + } + + public float getWindGust() { + return this.gust; + } + } + + + /* + *********************** + * Declaring this class + *********************** + */ + + /** Key for JSON variable Base */ + private final String JSON_BASE = "base"; + /** Key for JSON variable City code (ID) */ + private final String JSON_CITY_ID = "id"; + /** Key for JSON variable City name */ + private final String JSON_CITY_NAME = "name"; + /** Key for JSON variable Response code */ + private final String JSON_RESPONSE_CODE = "cod"; + + /** Base */ + private final String base; + /** City code (ID) */ + private final long cityID; + /** City name */ + private final String cityName; + /** Response code */ + private final int responseCode; + + private final Clouds clouds; + private final Coord coord; + private final Main main; + private final Rain rain; + private final Sys sys; + private final Wind wind; + + /** List of weather information (code, name, etc.) */ + private final List weatherList; + /** Count (number) of elements in list of weather information */ + private final int weatherListCount; + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing current weather data + */ + public CurrentWeatherData(JSONObject jsonObj) { + super(jsonObj); + + this.base = (jsonObj != null) ? jsonObj.optString(this.JSON_BASE, null) : null; + this.cityID = (jsonObj != null) ? jsonObj.optLong(this.JSON_CITY_ID, Long.MIN_VALUE) : Long.MIN_VALUE; + this.cityName = (jsonObj != null) ? jsonObj.optString(this.JSON_CITY_NAME, null) : null; + this.responseCode = (jsonObj != null) ? jsonObj.optInt(this.JSON_RESPONSE_CODE, Integer.MIN_VALUE) : Integer.MIN_VALUE; + + JSONObject jsonObjClouds = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CLOUDS) : null; + this.clouds = (jsonObjClouds != null) ? new Clouds(jsonObjClouds) : new Clouds(); + + JSONObject jsonObjCoord = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_COORD) : null; + this.coord = (jsonObjCoord != null) ? new Coord(jsonObjCoord) : new Coord(); + + JSONObject jsonObjMain = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_MAIN) : null; + this.main = (jsonObjMain != null) ? new Main(jsonObjMain) : new Main(); + + JSONObject jsonObjRain = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_RAIN) : null; + this.rain = (jsonObjRain != null) ? new Rain(jsonObjRain) : new Rain(); + + JSONObject jsonObjSys = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_SYS) : null; + this.sys = (jsonObjSys != null) ? new Sys(jsonObjSys) : new Sys(); + + JSONArray jsonArrWeather = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_WEATHER) : null; + this.weatherList = (jsonArrWeather != null) ? new ArrayList(jsonArrWeather.length()) : Collections.EMPTY_LIST; + if (this.weatherList != Collections.EMPTY_LIST) { + for (int i = 0; i < jsonArrWeather.length(); i++) { + JSONObject jsonObjWeather = jsonArrWeather.optJSONObject (i); + if (jsonObjWeather != null) { + this.weatherList.add(new Weather(jsonObjWeather)); + } + } + } + this.weatherListCount = this.weatherList.size(); + + JSONObject jsonObjWind = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_WIND) : null; + this.wind = (jsonObjWind != null) ? new Wind(jsonObjWind) : new Wind(); + } + + public boolean hasBaseStation() { + return (this.base != null); + } + + public boolean hasCityCode() { + return (this.cityID != Long.MIN_VALUE); + } + + public boolean hasCityName() { + return (this.cityName != null); + } + + public boolean hasResponseCode() { + return (this.responseCode != Integer.MIN_VALUE); + } + + public String getBaseStation() { + return this.base; + } + + public long getCityCode() { + return this.cityID; + } + + public String getCityName() { + return this.cityName; + } + + public int getResponseCode() { + return this.responseCode; + } + + // Objects + + public Clouds getClouds_Object() { + return this.clouds; + } + + public Coord getCoordinates_Object() { + return this.coord; + } + + public Main getMainData_Object() { + return this.main; + } + + public Rain getRain_Object() { + return this.rain; + } + + public Sys getSysData_Object() { + return this.sys; + } + + public Wind getWind_Object() { + return this.wind; + } + + // Lists + + public boolean hasWeather_List() { + return (this.weatherListCount != 0); + } + + public int getWeather_List_Count() { + return this.weatherListCount; + } + + public List getWeather_List() { + return this.weatherList; + } +} diff --git a/src/net/aksingh/java/api/owm/DailyForecastData.java b/src/net/aksingh/java/api/owm/DailyForecastData.java new file mode 100644 index 0000000..7d8a049 --- /dev/null +++ b/src/net/aksingh/java/api/owm/DailyForecastData.java @@ -0,0 +1,707 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.json.JSONArray; +import org.json.JSONObject; + +/** + * Parses daily forecast data (from the JSON data) and provides methods + * to get/access the information about daily forecasted weather. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Objects: Data initialized with default/non-parameterized constructor
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ +public class DailyForecastData { + /** Key for JSON object - City */ + private final String JSON_CITY = "city"; + /** Key for JSON object - List of forecasts */ + private final String JSON_FORECAST_LIST = "list"; + + + /* + ************************ + * Declaring sub-classes + ************************ + */ + + /** + * Parses data about city (from the JSON data) + * and provides methods to get/access the information. + * For example, city name, coordinates, country name, population, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class City { + /** Key for JSON object - Coordinates */ + private final String JSON_CITY_COORD = "coord"; + + + /** + * Parses data about geographic coordinates (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Coord extends AbstractWeatherData.Coord { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Coord() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public Coord(JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** Key for JSON variable City code (ID) */ + private final String JSON_CITY_ID = "id"; + /** Key for JSON variable City name */ + private final String JSON_CITY_NAME = "name"; + /** Key for JSON variable Country code of city */ + private final String JSON_CITY_COUNTRY_CODE = "country"; + /** Key for JSON variable Population of city */ + private final String JSON_CITY_POPULATION = "population"; + + /** City code (ID) */ + private final long cityID; + /** City name */ + private final String cityName; + /** Country code of city */ + private final String countryCode; + /** Population of city */ + private final long population; + + private final Coord coord; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public City() { + this.cityID = Long.MIN_VALUE; + this.cityName = null; + this.countryCode = null; + this.population = Long.MIN_VALUE; + + this.coord = new Coord(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about city + */ + public City(JSONObject jsonObj) { + this.cityID = (jsonObj != null) ? jsonObj.optLong(this.JSON_CITY_ID, Long.MIN_VALUE) : Long.MIN_VALUE; + this.cityName = (jsonObj != null) ? jsonObj.optString(this.JSON_CITY_NAME, null) : null; + this.countryCode = (jsonObj != null) ? jsonObj.optString(this.JSON_CITY_COUNTRY_CODE, null) : null; + this.population = (jsonObj != null) ? jsonObj.optLong(this.JSON_CITY_POPULATION, Long.MIN_VALUE) : Long.MIN_VALUE; + + JSONObject jsonObjCoord = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CITY_COORD) : null; + this.coord = (jsonObjCoord != null) ? new Coord(jsonObjCoord) : new Coord(); + } + + public boolean hasCityCode() { + return (this.cityID != Long.MIN_VALUE); + } + + public boolean hasCityName() { + return (this.cityName != null); + } + + public boolean hasCountryCode() { + return (this.countryCode != null); + } + + public boolean hasCityPopulation() { + return (this.population != Long.MIN_VALUE); + } + + public long getCityCode() { + return this.cityID; + } + + public String getCityName() { + return this.cityName; + } + + public String getCountryCode() { + return this.countryCode; + } + + public long getCityPopulation() { + return this.population; + } + + // Objects + + public Coord getCoordinates_Object() { + return this.coord; + } + } + + + /** + * Parses data about forecasts (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Forecast extends AbstractWeatherData { + /** Key for JSON object - Temperature */ + public final String JSON_TEMP = "temp"; + + /* + *************************** + * Declaring sub-sub-classes + *************************** + */ + + /** + * Parses data about weather (from the JSON data) + * and provides methods to get/access the information. + * For example, weather id, name, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Weather extends AbstractWeatherData.Weather { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Weather () { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about weather + */ + public Weather (JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + * Parses data about temperature (from the JSON data) + * and provides methods to get/access the information. + * For example, weather id, name, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Temperature { + /** Key for JSON variable Temp -> Day */ + public final String JSON_TEMP_DAY = "day"; + /** Key for JSON variable Temp -> Minimum */ + public final String JSON_TEMP_MIN = "min"; + /** Key for JSON variable Temp -> Maximum */ + public final String JSON_TEMP_MAX = "max"; + /** Key for JSON variable Temp -> Night */ + public final String JSON_TEMP_NIGHT = "night"; + /** Key for JSON variable Temp -> Evening */ + public final String JSON_TEMP_EVENING = "eve"; + /** Key for JSON variable Temp -> Morning */ + public final String JSON_TEMP_MORNING = "morn"; + + /** Day temperature */ + private final float dayTemp; + /** Minimum temperature */ + private final float minTemp; + /** Maximum temperature */ + private final float maxTemp; + /** Night temperature */ + private final float nightTemp; + /** Evening temperature */ + private final float eveTemp; + /** Morning temperature */ + private final float mornTemp; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Temperature() { + this.dayTemp = Float.NaN; + this.minTemp = Float.NaN; + this.maxTemp = Float.NaN; + this.nightTemp = Float.NaN; + this.eveTemp = Float.NaN; + this.mornTemp = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about temperature + */ + public Temperature(JSONObject jsonObj) { + this.dayTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_DAY, Double.NaN) : Float.NaN; + this.minTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_MIN, Double.NaN) : Float.NaN; + this.maxTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_MAX, Double.NaN) : Float.NaN; + this.nightTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_NIGHT, Double.NaN) : Float.NaN; + this.eveTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_EVENING, Double.NaN) : Float.NaN; + this.mornTemp = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_TEMP_MORNING, Double.NaN) : Float.NaN; + } + + public boolean hasDayTemperature() { + return (this.dayTemp != Float.NaN); + } + + public boolean hasMinimumTemperature() { + return (this.minTemp != Float.NaN); + } + + public boolean hasMaximumTemperature() { + return (this.maxTemp != Float.NaN); + } + + public boolean hasNightTemperature() { + return (this.nightTemp != Float.NaN); + } + + public boolean hasEveningTemperature() { + return (this.eveTemp != Float.NaN); + } + + public boolean hasMorningTemperature() { + return (this.mornTemp != Float.NaN); + } + + public float getDayTemperature() { + return this.dayTemp; + } + + public float getMinimumTemperature() { + return this.minTemp; + } + + public float getMaximumTemperature() { + return this.maxTemp; + } + + public float getNightTemperature() { + return this.nightTemp; + } + + public float getEveningTemperature() { + return this.eveTemp; + } + + public float getMorningTemperature() { + return this.mornTemp; + } + } + + /* + ************************ + * Declaring this sub-class + ************************ + */ + + /** Key for JSON variable Pressure */ + private final String JSON_FORECAST_PRESSURE = "pressure"; + /** Key for JSON variable Humidity */ + private final String JSON_FORECAST_HUMIDITY = "humidity"; + /** Key for JSON variable Wind speed */ + private final String JSON_FORECAST_WIND_SPEED = "speed"; + /** Key for JSON variable Wind degree */ + private final String JSON_FORECAST_WIND_DEGREE = "deg"; + /** Key for JSON variable Percentage of clouds */ + private final String JSON_FORECAST_CLOUDS = "clouds"; + + /** Pressure */ + private final float pressure; + /** Humidity */ + private final float humidity; + /** Wind speed */ + private final float windSpeed; + /** Wind degree */ + private final float windDegree; + /** Percentage of clouds */ + private final float cloudsPercent; + + private final Temperature temp; + + /** List of weather information (code, name, etc.) */ + private final List weatherList; + /** Count (number) of elements in list of weather information */ + private final int weatherListCount; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Forecast() { + super(); + + this.pressure = Float.NaN; + this.humidity = Float.NaN; + this.windSpeed = Float.NaN; + this.windDegree = Float.NaN; + this.cloudsPercent = Float.NaN; + + this.temp = new Temperature(); + + this.weatherList = Collections.EMPTY_LIST; + this.weatherListCount = this.weatherList.size(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about forecasts + */ + public Forecast(JSONObject jsonObj) { + super(jsonObj); + + JSONObject jsonObjTemp = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_TEMP) : null; + this.temp = (jsonObjTemp != null) ? new Temperature(jsonObjTemp) : new Temperature(); + + this.humidity = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_HUMIDITY, Double.NaN) : Float.NaN; + this.pressure = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_PRESSURE, Double.NaN) : Float.NaN; + this.windSpeed = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_WIND_SPEED, Double.NaN) : Float.NaN; + this.windDegree = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_WIND_DEGREE, Double.NaN) : Float.NaN; + this.cloudsPercent = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_CLOUDS, Double.NaN) : Float.NaN; + + JSONArray jsonArrWeather = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_WEATHER) : null; + this.weatherList = (jsonArrWeather != null) ? new ArrayList(jsonArrWeather.length()) : Collections.EMPTY_LIST; + if (this.weatherList != Collections.EMPTY_LIST) { + for (int i = 0; i < jsonArrWeather.length (); i++) { + JSONObject jsonObjWeather = jsonArrWeather.optJSONObject (i); + if (jsonObjWeather != null) { + this.weatherList.add(new Weather(jsonObjWeather)); + } + } + } + this.weatherListCount = this.weatherList.size(); + } + + public boolean hasHumidity() { + return (this.humidity != Float.NaN); + } + + public boolean hasPressure() { + return (this.pressure != Float.NaN); + } + + public boolean hasWindSpeed() { + return (this.windSpeed != Float.NaN); + } + + public boolean hasWindDegree() { + return (this.windDegree != Float.NaN); + } + + public boolean hasPercentageOfClouds() { + return (this.cloudsPercent != Float.NaN); + } + + public float getHumidity() { + return this.humidity; + } + + public float getPressure() { + return this.pressure; + } + + public float getWindSpeed() { + return this.windSpeed; + } + + public float getWindDegree() { + return this.windDegree; + } + + public float getPercentageOfClouds() { + return this.cloudsPercent; + } + + // Objects + + public Temperature getTemperature_Object() { + return this.temp; + } + + // Lists + + public boolean hasWeather_List() { + return (this.weatherListCount != 0); + } + + public int getWeather_List_Count() { + return this.weatherListCount; + } + + public List getWeather_List() { + return this.weatherList; + } + } + + + /* + *********************** + * Declaring this class + *********************** + */ + + /** Key for JSON variable Response code */ + private final String JSON_RESPONSE_CODE = "cod"; + /** Key for JSON variable Response time */ + private final String JSON_RESPONSE_TIME = "message"; + /** Key for JSON variable Forecast count */ + private final String JSON_RESPONSE_FORECAST_COUNT = "cnt"; + + /** Response code */ + private final String responseCode; + /** Response time */ + private final float responseTime; + /** Forecast count */ + private final int responseForecastCount; + + private final City city; + + /** List of forecast information */ + private final List forecastList; + /** Count (number) of elements in list of forecast information */ + private final int forecastListCount; + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about daily forecasts + */ + public DailyForecastData(JSONObject jsonObj) { + this.responseCode = (jsonObj != null) ? jsonObj.optString(this.JSON_RESPONSE_CODE, null) : null; + this.responseTime = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_RESPONSE_TIME, Double.NaN) : Float.NaN; + this.responseForecastCount = (jsonObj != null) ? jsonObj.optInt(this.JSON_RESPONSE_FORECAST_COUNT, Integer.MIN_VALUE) : Integer.MIN_VALUE; + + JSONObject jsonObjCity = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CITY) : null; + this.city = (jsonObjCity != null) ? new City(jsonObjCity) : new City(); + + JSONArray jsonArrForecast = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_FORECAST_LIST) : null; + this.forecastList = (jsonArrForecast != null) ? new ArrayList(jsonArrForecast.length()) : Collections.EMPTY_LIST; + if (this.forecastList != Collections.EMPTY_LIST) { + for (int i = 0; i < jsonArrForecast.length(); i++) { + JSONObject jsonObjWeather = jsonArrForecast.optJSONObject(i); + if (jsonObjWeather != null) { + this.forecastList.add(new Forecast(jsonObjWeather)); + } + } + } + this.forecastListCount = this.forecastList.size(); + } + + public boolean hasResponseCode() { + return (this.responseCode != null); + } + + public boolean hasResponseTime() { + return (this.responseTime != Float.NaN); + } + + public boolean hasResponseForecastCount() { + return (this.responseForecastCount != Integer.MIN_VALUE); + } + + public String getResponseCode() { + return this.responseCode; + } + + public float getResponseTime() { + return this.responseTime; + } + + public int getResponseForecastCount() { + return this.responseForecastCount; + } + + // Objects + + public City getCity_Object() { + return this.city; + } + + // Lists + + public boolean hasForecast_List() { + return (this.forecastListCount != 0); + } + + public int getForecast_List_Count() { + return this.forecastListCount; + } + + public List getForecast_List() { + return this.forecastList; + } +} diff --git a/src/net/aksingh/java/api/owm/ForecastWeatherData.java b/src/net/aksingh/java/api/owm/ForecastWeatherData.java new file mode 100644 index 0000000..53dfeb6 --- /dev/null +++ b/src/net/aksingh/java/api/owm/ForecastWeatherData.java @@ -0,0 +1,803 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.json.JSONArray; +import org.json.JSONObject; + +/** + * Parses forecast weather data (from the JSON data) and provides methods + * to get/access the information about forecasted weather. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Objects: Data initialized with default/non-parameterized constructor
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ +public class ForecastWeatherData { + /** Key for JSON object - City */ + private final String JSON_CITY = "city"; + /** Key for JSON object - List of forecasts */ + private final String JSON_FORECAST_LIST = "list"; + + + /* + ************************ + * Declaring sub-classes + ************************ + */ + + /** + * Parses data about city (from the JSON data) + * and provides methods to get/access the information. + * For example, city name, coordinates, country name, population, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class City { + /** Key for JSON object - Coordinates */ + private final String JSON_CITY_COORD = "coord"; + + /** + * Parses data about geographic coordinates (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Coord extends AbstractWeatherData.Coord { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Coord() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public Coord(JSONObject jsonObj) { + super(jsonObj); + } + } + + + /** Key for JSON variable City code (ID) */ + private final String JSON_CITY_ID = "id"; + /** Key for JSON variable City name */ + private final String JSON_CITY_NAME = "name"; + /** Key for JSON variable Country code of city */ + private final String JSON_CITY_COUNTRY_CODE = "country"; + /** Key for JSON variable Population of city */ + private final String JSON_CITY_POPULATION = "population"; + + /** City code (ID) */ + private final long cityID; + /** City name */ + private final String cityName; + /** Country code of city */ + private final String countryCode; + /** Population of city */ + private final long population; + + private final Coord coord; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public City() { + this.cityID = Long.MIN_VALUE; + this.cityName = null; + this.countryCode = null; + this.population = Long.MIN_VALUE; + + this.coord = new Coord(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about city + */ + public City(JSONObject jsonObj) { + this.cityID = (jsonObj != null) ? jsonObj.optLong(this.JSON_CITY_ID, Long.MIN_VALUE) : Long.MIN_VALUE; + this.cityName = (jsonObj != null) ? jsonObj.optString(this.JSON_CITY_NAME, null) : null; + this.countryCode = (jsonObj != null) ? jsonObj.optString(this.JSON_CITY_COUNTRY_CODE, null) : null; + this.population = (jsonObj != null) ? jsonObj.optLong(this.JSON_CITY_POPULATION, Long.MIN_VALUE) : Long.MIN_VALUE; + + JSONObject jsonObjCoord = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CITY_COORD) : null; + this.coord = (jsonObjCoord != null) ? new Coord(jsonObjCoord) : new Coord(); + } + + public boolean hasCityCode() { + return (this.cityID != Long.MIN_VALUE); + } + + public boolean hasCityName() { + return (this.cityName != null); + } + + public boolean hasCountryCode() { + return (this.countryCode != null); + } + + public boolean hasCityPopulation() { + return (this.population != Long.MIN_VALUE); + } + + public long getCityCode() { + return this.cityID; + } + + public String getCityName() { + return this.cityName; + } + + public String getCountryCode() { + return this.countryCode; + } + + public long getCityPopulation() { + return this.population; + } + + // Objects + + public Coord getCoordinates_Object() { + return this.coord; + } + } + + + /** + * Parses data about forecasts (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Forecast extends AbstractWeatherData { + /** Key for JSON object - Sys (pod, etc.) */ + private final String JSON_SYS = "sys"; + + /* + *************************** + * Declaring sub-sub-classes + *************************** + */ + + /** + * Parses data about clouds (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Clouds extends AbstractWeatherData.Clouds { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Clouds() { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public Clouds(JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + * Parses data about main weather elements (from the JSON data) + * and provides methods to get/access the information. + * For example, temperature, pressure, sea level, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Main extends AbstractWeatherData.Main { + /** Key for JSON variable Main -> Sea level */ + private final String JSON_MAIN_SEA_LEVEL = "sea_level"; + /** Key for JSON variable Main -> Ground level */ + private final String JSON_MAIN_GRND_LEVEL = "grnd_level"; + /** Key for JSON variable Main -> Temperature KF */ + private final String JSON_MAIN_TMP_KF = "temp_kf"; + + /** Sea level */ + private final float seaLevel; + /** Ground level */ + private final float groundLevel; + /** Temperature KF */ + private final float tempKF; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Main() { + super(); + + this.seaLevel = Float.NaN; + this.groundLevel = Float.NaN; + this.tempKF = Float.NaN; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about main + * weather elements + */ + public Main(JSONObject jsonObj) { + super(jsonObj); + + this.seaLevel = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_MAIN_SEA_LEVEL, Float.NaN) : Float.NaN; + this.groundLevel = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_MAIN_GRND_LEVEL, Float.NaN) : Float.NaN; + this.tempKF = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_MAIN_TMP_KF, Float.NaN) : Float.NaN; + } + + public boolean hasSeaLevel() { + return (this.seaLevel != Float.NaN); + } + + public boolean hasGroundLevel() { + return (this.groundLevel != Float.NaN); + } + + public boolean hasTempKF() { + return (this.tempKF != Float.NaN); + } + + public float getSeaLevel() { + return this.seaLevel; + } + + public float getGroundLevel() { + return this.groundLevel; + } + + public float getTempKF() { + return this.tempKF; + } + } + + /** + * Parses data about main weather elements (from the JSON data) + * and provides methods to get/access the information. + * For example, temperature, pressure, sea level, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Sys { + /** Key for JSON variable Sys -> Pod */ + private final String JSON_SYS_POD = "pod"; + + /** Pod */ + private final String pod; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Sys() { + this.pod = null; + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about sys. + * For example, pod, etc. + */ + public Sys(JSONObject jsonObj) { + this.pod = (jsonObj != null) ? jsonObj.optString(this.JSON_SYS_POD, null) : null; + } + + public boolean hasPod() { + return (this.pod != null); + } + + public String getPod() { + return this.pod; + } + } + + /** + * Parses data about weather (from the JSON data) + * and provides methods to get/access the information. + * For example, weather id, name, etc. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Weather extends AbstractWeatherData.Weather { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Weather () { + super(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about weather + * code, name, etc. + */ + public Weather (JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + * Parses data about wind (from the JSON data) + * and provides methods to get/access the information. + * This class provides has and get methods + * to access the information. + * + *

has methods can be used to check + * if the data exists, i.e., if the data was available (successfully + * downloaded) and was parsed correctly. + * + *

get methods can be used to access the data, if the data + * exists, otherwise get methods will give value as per + * following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ * + * @author Ashutosh Kumar Singh + * @version 2013/08/07 + * @since 2.5.0.1 + */ + public static class Wind extends AbstractWeatherData.Wind { + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Wind () { + super (); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about wind + */ + public Wind (JSONObject jsonObj) { + super (jsonObj); + } + } + + /* + ************************ + * Declaring this sub-class + ************************ + */ + + + /** Key for JSON variable Date time text */ + private final String JSON_DATE_TIME_TEXT = "dt_txt"; + + /** Date time text */ + private final String dateTimeText; + + private final Clouds clouds; + private final Main main; + private final Sys sys; + private final Wind wind; + + /** List of weather information (code, name, etc.) */ + private final List weatherList; + /** Count (number) of elements in list of weather information */ + private final int weatherListCount; + + /** + * Non-parameterized constructor + * + *

Initializes variables as per following basis:
+ * Boolean: false
+ * Integral: Minimum value (MIN_VALUE)
+ * Floating point: Not a number (NaN)
+ * Others: null
+ */ + public Forecast() { + super(); + + this.dateTimeText = null; + + this.clouds = new Clouds(); + this.main = new Main(); + this.sys = new Sys(); + this.weatherList = Collections.EMPTY_LIST; + this.weatherListCount = this.weatherList.size(); + this.wind = new Wind(); + } + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about forecasts + */ + public Forecast(JSONObject jsonObj) { + super(jsonObj); + + this.dateTimeText = (jsonObj != null) ? jsonObj.optString(this.JSON_DATE_TIME_TEXT, null) : null; + + JSONObject jsonObjClouds = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CLOUDS) : null; + this.clouds = (jsonObjClouds != null) ? new Clouds(jsonObjClouds) : new Clouds(); + + JSONObject jsonObjMain = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_MAIN) : null; + this.main = (jsonObjMain != null) ? new Main(jsonObjMain) : new Main(); + + JSONObject jsonObjSys = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_SYS) : null; + this.sys = (jsonObjSys != null) ? new Sys(jsonObjSys) : new Sys(); + + JSONArray jsonArrWeather = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_WEATHER) : null; + this.weatherList = (jsonArrWeather != null) ? new ArrayList(jsonArrWeather.length()) : Collections.EMPTY_LIST; + if (this.weatherList != Collections.EMPTY_LIST) { + for (int i = 0; i < jsonArrWeather.length (); i++) { + JSONObject jsonObjWeather = jsonArrWeather.optJSONObject (i); + if (jsonObjWeather != null) { + this.weatherList.add(new Weather(jsonObjWeather)); + } + } + } + this.weatherListCount = this.weatherList.size(); + + JSONObject jsonObjWind = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_WIND) : null; + this.wind = (jsonObjWind != null) ? new Wind(jsonObjWind) : new Wind(); + } + + public boolean hasDateTimeText() { + return (this.dateTimeText != null); + } + + public String getDateTimeText() { + return this.dateTimeText; + } + + // Objects + + public Clouds getClouds_Object() { + return this.clouds; + } + + public Main getMainData_Object() { + return this.main; + } + + public Sys getSysData_Object() { + return this.sys; + } + + public Wind getWind_Object() { + return this.wind; + } + + // Lists + + public boolean hasWeather_List() { + return (this.weatherListCount != 0); + } + + public int getWeather_List_Count() { + return this.weatherListCount; + } + + public List getWeather_List() { + return this.weatherList; + } + } + + + /* + *********************** + * Declaring this class + *********************** + */ + + /** Key for JSON variable Response code */ + private final String JSON_RESPONSE_CODE = "cod"; + /** Key for JSON variable Response time */ + private final String JSON_RESPONSE_TIME = "message"; + /** Key for JSON variable Forecast count */ + private final String JSON_RESPONSE_FORECAST_COUNT = "cnt"; + + /** Response code */ + private final String responseCode; + /** Response time */ + private final float responseTime; + /** Forecast count */ + private final int responseForecastCount; + + private final City city; + + /** List of forecast information */ + private final List forecastList; + /** Count (number) of elements in list of forecast information */ + private final int forecastListCount; + + /** + * Parameterized constructor + * + * Initializes variables from values from the given JSON object. + * + * @param jsonObj JSON object containing data about clouds + */ + public ForecastWeatherData(JSONObject jsonObj) { + this.responseCode = (jsonObj != null) ? jsonObj.optString(this.JSON_RESPONSE_CODE, null) : null; + this.responseTime = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_RESPONSE_TIME, Double.NaN) : Float.NaN; + this.responseForecastCount = (jsonObj != null) ? jsonObj.optInt(this.JSON_RESPONSE_FORECAST_COUNT, Integer.MIN_VALUE) : Integer.MIN_VALUE; + + JSONObject jsonObjCity = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CITY) : null; + this.city = (jsonObjCity != null) ? new City(jsonObjCity) : new City(); + + JSONArray jsonArrForecast = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_FORECAST_LIST) : null; + this.forecastList = (jsonArrForecast != null) ? new ArrayList(jsonArrForecast.length()) : Collections.EMPTY_LIST; + if (this.forecastList != Collections.EMPTY_LIST) { + for (int i = 0; i < jsonArrForecast.length(); i++) { + JSONObject jsonObjWeather = jsonArrForecast.optJSONObject(i); + if (jsonObjWeather != null) { + this.forecastList.add(new Forecast(jsonObjWeather)); + } + } + } + this.forecastListCount = this.forecastList.size(); + } + + public boolean hasResponseCode() { + return (this.responseCode != null); + } + + public boolean hasResponseTime() { + return (this.responseTime != Float.NaN); + } + + public boolean hasResponseForecastCount() { + return (this.responseForecastCount != Integer.MIN_VALUE); + } + + public String getResponseCode() { + return this.responseCode; + } + + public float getResponseTime() { + return this.responseTime; + } + + public int getResponseForecastCount() { + return this.responseForecastCount; + } + + // Objects + + public City getCity_Object() { + return this.city; + } + + // Lists + + public boolean hasForecast_List() { + return (this.forecastListCount != 0); + } + + public int getForecast_List_Count() { + return this.forecastListCount; + } + + public List getForecast_List() { + return this.forecastList; + } +} diff --git a/src/net/aksingh/java/api/owm/OpenWeatherMap.java b/src/net/aksingh/java/api/owm/OpenWeatherMap.java new file mode 100644 index 0000000..a2d7f4c --- /dev/null +++ b/src/net/aksingh/java/api/owm/OpenWeatherMap.java @@ -0,0 +1,551 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.io.IOException; +import java.net.MalformedURLException; +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Provides methods to get weather, forecast, and other data from + * OpenWeatherMap.org + * + * @author Ashutosh Kumar Singh + * @version 2013/08/05 + * @since 2.5.0.1 + */ +public class OpenWeatherMap { + + public static enum OWM_URL { + // Base URL for OpenWeatherMap.org API 2.5 + + BASE_URL ("http://api.openweathermap.org/data/2.5/"), + + // Parameters + + PARAMETER_CURRENT_WEATHER ("weather?"), + PARAMETER_FORECAST_WEATHER ("forecast?"), + PARAMETER_DAILY_FORECAST ("forecast/daily?"), + PARAMETER_SEARCH_CITY ("find?"), + + PARAMETER_COUNT ("cnt="), + + PARAMETER_CITY_NAME ("q="), + PARAMETER_CITY_ID ("id="), + PARAMETER_LATITUDE ("lat="), + PARAMETER_LONGITUDE ("lon="), + + PARAMETER_MODE ("mode="), + PARAMETER_UNITS ("units="), + PARAMETER_APPID ("APPID="), + + // Possible values of parameters + + PARAMETER_MODE_VALUE_JSON ("json"), + PARAMETER_UNITS_VALUE_IMPERIAL ("imperial"), + PARAMETER_UNITS_VALUE_METRIC ("metric"); + + + private final String value; + + private OWM_URL(String val) { + this.value = val; + } + + /** + * Returns the parameter. + * @return Parameter + */ + public String getParameter() { + return this.value; + } + } + + + public static class OWM_Response { + private final String OWM_MODE_VALUE; + private final String OWM_UNITS_VALUE; + private final String OWM_APPID_VALUE; + + public OWM_Response(String apiKey) { + this(OWM_URL.PARAMETER_UNITS_VALUE_IMPERIAL, apiKey); + } + + public OWM_Response(OWM_URL unit, String apiKey) { + this.OWM_MODE_VALUE = OWM_URL.PARAMETER_MODE_VALUE_JSON.getParameter(); + this.OWM_UNITS_VALUE = unit.getParameter(); + this.OWM_APPID_VALUE = apiKey; + } + + public String currentWeatherByCityName(String cityName) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String currentWeatherByCityName(String cityName, String countryCode) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + + "," + countryCode + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String currentWeatherByCityCode(long cityCode) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_ID.getParameter() + + Long.toString(cityCode) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String currentWeatherByCoordinates(float latitude, float longitude) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() + + OWM_URL.PARAMETER_LATITUDE.getParameter() + + Float.toString(latitude) + "&" + + OWM_URL.PARAMETER_LONGITUDE.getParameter() + + Float.toString(longitude) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String forecastWeatherByCityName(String cityName) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String forecastWeatherByCityName(String cityName, String countryCode) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + + "," + countryCode + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String forecastWeatherByCityCode(long cityCode) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() + + OWM_URL.PARAMETER_CITY_ID.getParameter() + + Long.toString(cityCode) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String forecastWeatherByCoordinates(float latitude, float longitude) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() + + OWM_URL.PARAMETER_LATITUDE.getParameter() + + Float.toString(latitude) + "&" + + OWM_URL.PARAMETER_LONGITUDE.getParameter() + + Float.toString(longitude) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String dailyForecastByCityName(String cityName, byte count) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + "&" + + OWM_URL.PARAMETER_COUNT.getParameter() + + Byte.toString(count) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String dailyForecastByCityName(String cityName, String countryCode, byte count) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() + + OWM_URL.PARAMETER_CITY_NAME.getParameter() + + Tools.HTML.strictAddress(cityName) + + "," + countryCode + "&" + + OWM_URL.PARAMETER_COUNT.getParameter() + + Byte.toString(count) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String dailyForecastByCityCode(long cityCode, byte count) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() + + OWM_URL.PARAMETER_CITY_ID.getParameter() + + Long.toString(cityCode) + "&" + + OWM_URL.PARAMETER_COUNT.getParameter() + + Byte.toString(count) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + + public String dailyForecastByCoordinates(float latitude, float longitude, byte count) + throws MalformedURLException, IOException { + String url; + String response; + + url = OWM_URL.BASE_URL.getParameter() + + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() + + OWM_URL.PARAMETER_LATITUDE.getParameter() + + Float.toString(latitude) + "&" + + OWM_URL.PARAMETER_COUNT.getParameter() + + Byte.toString(count) + "&" + + OWM_URL.PARAMETER_LONGITUDE.getParameter() + + Float.toString(longitude) + "&" + + OWM_URL.PARAMETER_MODE.getParameter() + + this.OWM_MODE_VALUE + "&" + + OWM_URL.PARAMETER_UNITS.getParameter() + + this.OWM_UNITS_VALUE + "&" + + OWM_URL.PARAMETER_APPID.getParameter() + + this.OWM_APPID_VALUE; + + response = Tools.Downloader.downloadPage(url); + + return response; + } + } + + + /*********************** + * Declaring this class + ***********************/ + + private final OWM_Response owmResponse; + + public OpenWeatherMap(String apiKey) { + this(OWM_URL.PARAMETER_UNITS_VALUE_IMPERIAL, apiKey); + } + + public OpenWeatherMap(OWM_URL unit, String apiKey) { + this.owmResponse = new OWM_Response(unit, apiKey); + } + + public CurrentWeatherData currentWeatherByCityName(String cityName) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + CurrentWeatherData cwd; + + jsonResponse = owmResponse.currentWeatherByCityName(cityName); + cwd = this.currentWeatherFromResponse(jsonResponse); + + return cwd; + } + + public CurrentWeatherData currentWeatherByCityName(String cityName, String countryCode) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + CurrentWeatherData cwd; + + jsonResponse = owmResponse.currentWeatherByCityName(cityName, countryCode); + cwd = this.currentWeatherFromResponse(jsonResponse); + + return cwd; + } + + public CurrentWeatherData currentWeatherByCityCode(long cityCode) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + CurrentWeatherData cwd; + + jsonResponse = owmResponse.currentWeatherByCityCode(cityCode); + cwd = this.currentWeatherFromResponse(jsonResponse); + + return cwd; + } + + public CurrentWeatherData currentWeatherByCoordinates(float latitude, float longitude) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + CurrentWeatherData cwd; + + jsonResponse = owmResponse.currentWeatherByCoordinates(latitude, longitude); + cwd = this.currentWeatherFromResponse(jsonResponse); + + return cwd; + } + + public CurrentWeatherData currentWeatherFromResponse(String jsonResponse) + throws MalformedURLException, IOException, JSONException { + JSONObject jsonObj; + CurrentWeatherData cwd; + + jsonObj = (jsonResponse != null) ? new JSONObject(jsonResponse) : null; + cwd = new CurrentWeatherData(jsonObj); + + return cwd; + } + + public ForecastWeatherData forecastWeatherByCityName(String cityName) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + ForecastWeatherData fwd; + + jsonResponse = owmResponse.forecastWeatherByCityName(cityName); + fwd = this.forecastWeatherFromResponse(jsonResponse); + + return fwd; + } + + public ForecastWeatherData forecastWeatherByCityName(String cityName, String countryCode) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + ForecastWeatherData fwd; + + jsonResponse = owmResponse.forecastWeatherByCityName(cityName, countryCode); + fwd = this.forecastWeatherFromResponse(jsonResponse); + + return fwd; + } + + public ForecastWeatherData forecastWeatherByCityCode(long cityCode) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + ForecastWeatherData fwd; + + jsonResponse = owmResponse.forecastWeatherByCityCode(cityCode); + fwd = this.forecastWeatherFromResponse(jsonResponse); + + return fwd; + } + + public ForecastWeatherData forecastWeatherByCoordinates(float latitude, float longitude) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + ForecastWeatherData fwd; + + jsonResponse = owmResponse.forecastWeatherByCoordinates(latitude, longitude); + fwd = this.forecastWeatherFromResponse(jsonResponse); + + return fwd; + } + + public ForecastWeatherData forecastWeatherFromResponse(String jsonResponse) + throws MalformedURLException, IOException, JSONException { + JSONObject jsonObj; + ForecastWeatherData fwd; + + jsonObj = (jsonResponse != null) ? new JSONObject(jsonResponse) : null; + fwd = new ForecastWeatherData(jsonObj); + + return fwd; + } + + public DailyForecastData dailyForecastByCityName(String cityName, byte count) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + DailyForecastData dfd; + + jsonResponse = owmResponse.dailyForecastByCityName(cityName, count); + dfd = this.dailyForecastFromResponse(jsonResponse); + + return dfd; + } + + public DailyForecastData dailyForecastByCityName(String cityName, String countryCode, byte count) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + DailyForecastData dfd; + + jsonResponse = owmResponse.dailyForecastByCityName(cityName, countryCode, count); + dfd = this.dailyForecastFromResponse(jsonResponse); + + return dfd; + } + + public DailyForecastData dailyForecastByCityCode(long cityCode, byte count) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + DailyForecastData dfd; + + jsonResponse = owmResponse.dailyForecastByCityCode(cityCode, count); + dfd = this.dailyForecastFromResponse(jsonResponse); + + return dfd; + } + + public DailyForecastData dailyForecastByCoordinates(float latitude, float longitude, byte count) + throws MalformedURLException, IOException, JSONException { + String jsonResponse; + DailyForecastData dfd; + + jsonResponse = owmResponse.dailyForecastByCoordinates(latitude, longitude, count); + dfd = this.dailyForecastFromResponse(jsonResponse); + + return dfd; + } + + public DailyForecastData dailyForecastFromResponse(String jsonResponse) + throws MalformedURLException, IOException, JSONException { + JSONObject jsonObj; + DailyForecastData dfd; + + jsonObj = (jsonResponse != null) ? new JSONObject(jsonResponse) : null; + dfd = new DailyForecastData(jsonObj); + + return dfd; + } +} diff --git a/src/net/aksingh/java/api/owm/Tools.java b/src/net/aksingh/java/api/owm/Tools.java new file mode 100644 index 0000000..cd9464a --- /dev/null +++ b/src/net/aksingh/java/api/owm/Tools.java @@ -0,0 +1,209 @@ +/* + * Copyright (C)2013 Ashutosh Kumar Singh [me@AKSingh.net] + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * The Software shall be used for Good, not Evil. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +package net.aksingh.java.api.owm; + +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Scanner; + +/** + * Provides various tools, which help doing tasks in this application. + * For example, tool for downloading content from the Internet, tool for + * correcting and stricting web addresses, etc. + * + *

Note: This class directly do not provide any functions, but has + * static sub-classes which provide various + * related tools, i.e., this class only behaves as the container for those + * classes. + * + * @author Ashutosh Kumar Singh + * @version 2013-08-05 + * @since 2.5.0.1 + */ +public class Tools { + + /** + * Provides methods to download data or files from the Internet. + * + * @author Ashutosh Kumar Singh + * @version 2013-07-24 + * @since 2.5.0.1 + */ + public static class Downloader { + + /** + * Downloads a page/content from the Internet. + * This method gets the content of the web page, whose URL is given by + * the pageAddress. + * + *

NOTE: pageAddress should be a correct URL, else + * this method will throw {@link MalformedURLException}. + * + * @param pageAddress + * Address of the web page to get from the Internet. + * + * @return Content of the web page + * + * @throws MalformedURLException + * Address of the web page is not correct. + * + * @throws IOException + * Error while loading the page from the Internet or connection + * got disconnected. + */ + public static String downloadPage(String pageAddress) + throws MalformedURLException, IOException { + String webPage = null; + + URL url = new URL(pageAddress); + InputStream iStream = url.openStream(); + + if (iStream != null) { + // converting InputStream to String (as we require String) + webPage = (new Scanner(iStream)).useDelimiter("\\A").next(); + } + iStream.close(); + + return webPage; + } + } + + + /** + * Provides functions to handle HTML, e.g., correcting + * non-compliant or non-strict web addresses, etc. + * + * @author Ashutosh Kumar Singh + * @version 2013/08/05 + * @since 2.5.0.1 + */ + public static class HTML { + + /** + * Stricts a non-strict or non-compliant web address + * to a proper URL. + * + *

Note: This function checks and stricts only some parts of the + * URL, which are necessary to be corrected for accessing data from + * the OpenWeatherMap.org + * + * @param inputString String to be converted to strict HTML address + * @return HTML standards-followed and stricted URL + */ + public static String strictAddress(String inputString) { + String outputString = ""; + + if (inputString != null) { + outputString = inputString.replace(" ", "%20").replace(".", "%2E"); + } + + return outputString; + } + } + + + /** + * Provides methods to do conversions. + * For example, converting degree to direction, etc. + * + * @author Ashutosh Kumar Singh + * @version 2013/08/05 + * @since 2.5.0.1 + */ + public static class Convertor { + + /** + * Converts degree to direction. + * @return Direction + * + * @throws IllegalArgumentException + * Degree should be between 0 and 360. + */ + public String convertDegree2Direction(float degree) + throws IllegalArgumentException{ + String direction; + + // degree should be between 0 and 360 + if ((degree < 0.0f) || (degree > 360.0f)) { + throw new IllegalArgumentException("Degree cannot be less than 0 or more than 360."); + } + + if (degree <= 11.25f) { + direction = "N"; + } + else if (degree <= 33.75f) { + direction = "NNE"; + } + else if (degree <= 56.25f) { + direction = "NE"; + } + else if (degree <= 78.75f) { + direction = "ENE"; + } + else if (degree <= 101.25f) { + direction = "E"; + } + else if (degree <= 123.75f) { + direction = "ESE"; + } + else if (degree <= 146.25f) { + direction = "SE"; + } + else if (degree <= 168.75f) { + direction = "SSE"; + } + else if (degree <= 191.25f) { + direction = "S"; + } + else if (degree <= 213.75f) { + direction = "SSW"; + } + else if (degree <= 236.25f) { + direction = "SW"; + } + else if (degree <= 258.75f) { + direction = "WSW"; + } + else if (degree <= 281.25f) { + direction = "W"; + } + else if (degree <= 303.75f) { + direction = "WNW"; + } + else if (degree <= 326.25f) { + direction = "NW"; + } + else if (degree <= 348.75f) { + direction = "NNW"; + } + else { + direction = "N"; + } + + return direction; + } + } +} \ No newline at end of file