From a573686f24d54aa17bf296688434f11a62c9b1b2 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Singh Date: Sun, 28 Dec 2014 15:31:23 +0530 Subject: [PATCH] v2.5.0.3 - Lots of new features and changes. It's exciting. :) --- .gitignore | 6 +- LICENSE.txt | 4 +- README.md | 97 +- README.pdf | Bin 54876 -> 0 bytes build.gradle | 23 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 51017 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 164 ++ gradlew.bat | 90 + javadoc/allclasses-frame.html | 53 - javadoc/allclasses-noframe.html | 53 - javadoc/constant-values.html | 244 --- javadoc/deprecated-list.html | 114 -- javadoc/help-doc.html | 215 --- javadoc/index-files/index-1.html | 191 -- javadoc/index-files/index-10.html | 135 -- javadoc/index-files/index-11.html | 126 -- javadoc/index-files/index-2.html | 238 --- javadoc/index-files/index-3.html | 213 --- javadoc/index-files/index-4.html | 248 --- javadoc/index-files/index-5.html | 309 ---- javadoc/index-files/index-6.html | 268 --- javadoc/index-files/index-7.html | 165 -- javadoc/index-files/index-8.html | 119 -- javadoc/index-files/index-9.html | 134 -- javadoc/index.html | 65 - .../api/owm/AbstractWeatherData.Clouds.html | 328 ---- .../api/owm/AbstractWeatherData.Coord.html | 364 ---- .../api/owm/AbstractWeatherData.Main.html | 485 ----- .../api/owm/AbstractWeatherData.Weather.html | 443 ----- .../api/owm/AbstractWeatherData.Wind.html | 368 ---- .../java/api/owm/AbstractWeatherData.html | 478 ----- .../api/owm/CurrentWeatherData.Clouds.html | 296 --- .../api/owm/CurrentWeatherData.Coord.html | 296 --- .../java/api/owm/CurrentWeatherData.Main.html | 297 ---- .../java/api/owm/CurrentWeatherData.Rain.html | 325 ---- .../java/api/owm/CurrentWeatherData.Sys.html | 378 ---- .../api/owm/CurrentWeatherData.Weather.html | 297 ---- .../java/api/owm/CurrentWeatherData.Wind.html | 337 ---- .../java/api/owm/CurrentWeatherData.html | 583 ------ .../api/owm/DailyForecastData.City.Coord.html | 297 ---- .../java/api/owm/DailyForecastData.City.html | 439 ----- ...ailyForecastData.Forecast.Temperature.html | 581 ------ .../DailyForecastData.Forecast.Weather.html | 297 ---- .../api/owm/DailyForecastData.Forecast.html | 576 ------ .../java/api/owm/DailyForecastData.html | 433 ----- .../owm/ForecastWeatherData.City.Coord.html | 297 ---- .../api/owm/ForecastWeatherData.City.html | 439 ----- .../ForecastWeatherData.Forecast.Clouds.html | 296 --- .../ForecastWeatherData.Forecast.Main.html | 392 ---- .../owm/ForecastWeatherData.Forecast.Sys.html | 328 ---- .../ForecastWeatherData.Forecast.Weather.html | 298 ---- .../ForecastWeatherData.Forecast.Wind.html | 296 --- .../api/owm/ForecastWeatherData.Forecast.html | 500 ------ .../java/api/owm/ForecastWeatherData.html | 432 ----- .../api/owm/OpenWeatherMap.OWM_Response.html | 496 ------ .../java/api/owm/OpenWeatherMap.OWM_URL.html | 510 ------ .../aksingh/java/api/owm/OpenWeatherMap.html | 608 ------- .../aksingh/java/api/owm/Tools.Convertor.html | 278 --- .../java/api/owm/Tools.Downloader.html | 289 --- javadoc/net/aksingh/java/api/owm/Tools.html | 269 --- .../class-use/AbstractWeatherData.Clouds.html | 149 -- .../class-use/AbstractWeatherData.Coord.html | 156 -- .../class-use/AbstractWeatherData.Main.html | 149 -- .../AbstractWeatherData.Weather.html | 155 -- .../class-use/AbstractWeatherData.Wind.html | 149 -- .../owm/class-use/AbstractWeatherData.html | 156 -- .../class-use/CurrentWeatherData.Clouds.html | 139 -- .../class-use/CurrentWeatherData.Coord.html | 139 -- .../class-use/CurrentWeatherData.Main.html | 139 -- .../class-use/CurrentWeatherData.Rain.html | 139 -- .../owm/class-use/CurrentWeatherData.Sys.html | 139 -- .../class-use/CurrentWeatherData.Weather.html | 139 -- .../class-use/CurrentWeatherData.Wind.html | 139 -- .../api/owm/class-use/CurrentWeatherData.html | 157 -- .../DailyForecastData.City.Coord.html | 139 -- .../owm/class-use/DailyForecastData.City.html | 139 -- ...ailyForecastData.Forecast.Temperature.html | 139 -- .../DailyForecastData.Forecast.Weather.html | 139 -- .../class-use/DailyForecastData.Forecast.html | 139 -- .../api/owm/class-use/DailyForecastData.html | 161 -- .../ForecastWeatherData.City.Coord.html | 139 -- .../class-use/ForecastWeatherData.City.html | 139 -- .../ForecastWeatherData.Forecast.Clouds.html | 139 -- .../ForecastWeatherData.Forecast.Main.html | 139 -- .../ForecastWeatherData.Forecast.Sys.html | 139 -- .../ForecastWeatherData.Forecast.Weather.html | 139 -- .../ForecastWeatherData.Forecast.Wind.html | 139 -- .../ForecastWeatherData.Forecast.html | 139 -- .../owm/class-use/ForecastWeatherData.html | 157 -- .../OpenWeatherMap.OWM_Response.html | 114 -- .../owm/class-use/OpenWeatherMap.OWM_URL.html | 164 -- .../api/owm/class-use/OpenWeatherMap.html | 114 -- .../api/owm/class-use/Tools.Convertor.html | 114 -- .../api/owm/class-use/Tools.Downloader.html | 114 -- .../aksingh/java/api/owm/class-use/Tools.html | 114 -- .../aksingh/java/api/owm/package-frame.html | 57 - .../aksingh/java/api/owm/package-summary.html | 370 ---- .../aksingh/java/api/owm/package-tree.html | 186 -- .../net/aksingh/java/api/owm/package-use.html | 301 ---- javadoc/overview-tree.html | 190 -- javadoc/package-list | 1 - javadoc/resources/background.gif | Bin 2313 -> 0 bytes javadoc/resources/tab.gif | Bin 291 -> 0 bytes javadoc/resources/titlebar.gif | Bin 10701 -> 0 bytes javadoc/resources/titlebar_end.gif | Bin 849 -> 0 bytes javadoc/stylesheet.css | 474 ----- lib/JSON.jar | Bin 41821 -> 0 bytes settings.gradle | 2 + .../aksingh/owmjapis/AbstractForecast.java | 248 +++ .../aksingh/owmjapis/AbstractResponse.java | 92 + .../net/aksingh/owmjapis/AbstractWeather.java | 527 ++++++ .../net/aksingh/owmjapis/CurrentWeather.java | 537 ++++++ .../net/aksingh/owmjapis/DailyForecast.java | 318 ++++ .../net/aksingh/owmjapis/HourlyForecast.java | 376 ++++ .../net/aksingh/owmjapis/OpenWeatherMap.java | 677 +++++++ src/main/java/net/aksingh/owmjapis/Tools.java | 91 + src/main/java/org/json/CDL.java | 290 +++ src/main/java/org/json/Cookie.java | 174 ++ src/main/java/org/json/CookieList.java | 92 + src/main/java/org/json/HTTP.java | 168 ++ src/main/java/org/json/HTTPTokener.java | 80 + src/main/java/org/json/JSONArray.java | 899 ++++++++++ src/main/java/org/json/JSONException.java | 43 + src/main/java/org/json/JSONML.java | 474 +++++ src/main/java/org/json/JSONObject.java | 1579 +++++++++++++++++ src/main/java/org/json/JSONString.java | 19 + src/main/java/org/json/JSONStringer.java | 80 + src/main/java/org/json/JSONTokener.java | 450 +++++ src/main/java/org/json/JSONWriter.java | 341 ++++ src/main/java/org/json/Kim.java | 353 ++++ src/main/java/org/json/Property.java | 75 + src/main/java/org/json/XML.java | 516 ++++++ src/main/java/org/json/XMLTokener.java | 373 ++++ .../java/api/owm/AbstractWeatherData.java | 760 -------- .../java/api/owm/CurrentWeatherData.java | 722 -------- .../java/api/owm/DailyForecastData.java | 833 --------- .../java/api/owm/ForecastWeatherData.java | 878 --------- .../aksingh/java/api/owm/OpenWeatherMap.java | 548 ------ src/net/aksingh/java/api/owm/Tools.java | 160 -- .../aksingh/owmjapis/CurrentWeatherTest.java | 48 + .../aksingh/owmjapis/DailyForecastTest.java | 48 + .../aksingh/owmjapis/HourlyForecastTest.java | 48 + 143 files changed, 9372 insertions(+), 26935 deletions(-) delete mode 100644 README.pdf create mode 100644 build.gradle create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat delete mode 100644 javadoc/allclasses-frame.html delete mode 100644 javadoc/allclasses-noframe.html delete mode 100644 javadoc/constant-values.html delete mode 100644 javadoc/deprecated-list.html delete mode 100644 javadoc/help-doc.html delete mode 100644 javadoc/index-files/index-1.html delete mode 100644 javadoc/index-files/index-10.html delete mode 100644 javadoc/index-files/index-11.html delete mode 100644 javadoc/index-files/index-2.html delete mode 100644 javadoc/index-files/index-3.html delete mode 100644 javadoc/index-files/index-4.html delete mode 100644 javadoc/index-files/index-5.html delete mode 100644 javadoc/index-files/index-6.html delete mode 100644 javadoc/index-files/index-7.html delete mode 100644 javadoc/index-files/index-8.html delete mode 100644 javadoc/index-files/index-9.html delete mode 100644 javadoc/index.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html delete mode 100644 javadoc/net/aksingh/java/api/owm/DailyForecastData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html delete mode 100644 javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html delete mode 100644 javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html delete mode 100644 javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html delete mode 100644 javadoc/net/aksingh/java/api/owm/Tools.Convertor.html delete mode 100644 javadoc/net/aksingh/java/api/owm/Tools.Downloader.html delete mode 100644 javadoc/net/aksingh/java/api/owm/Tools.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Rain.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Sys.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Temperature.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.Coord.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Clouds.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Main.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Sys.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Weather.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Wind.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_Response.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_URL.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/Tools.Convertor.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/Tools.Downloader.html delete mode 100644 javadoc/net/aksingh/java/api/owm/class-use/Tools.html delete mode 100644 javadoc/net/aksingh/java/api/owm/package-frame.html delete mode 100644 javadoc/net/aksingh/java/api/owm/package-summary.html delete mode 100644 javadoc/net/aksingh/java/api/owm/package-tree.html delete mode 100644 javadoc/net/aksingh/java/api/owm/package-use.html delete mode 100644 javadoc/overview-tree.html delete mode 100644 javadoc/package-list delete mode 100644 javadoc/resources/background.gif delete mode 100644 javadoc/resources/tab.gif delete mode 100644 javadoc/resources/titlebar.gif delete mode 100644 javadoc/resources/titlebar_end.gif delete mode 100644 javadoc/stylesheet.css delete mode 100644 lib/JSON.jar create mode 100644 settings.gradle create mode 100644 src/main/java/net/aksingh/owmjapis/AbstractForecast.java create mode 100644 src/main/java/net/aksingh/owmjapis/AbstractResponse.java create mode 100644 src/main/java/net/aksingh/owmjapis/AbstractWeather.java create mode 100644 src/main/java/net/aksingh/owmjapis/CurrentWeather.java create mode 100644 src/main/java/net/aksingh/owmjapis/DailyForecast.java create mode 100644 src/main/java/net/aksingh/owmjapis/HourlyForecast.java create mode 100644 src/main/java/net/aksingh/owmjapis/OpenWeatherMap.java create mode 100644 src/main/java/net/aksingh/owmjapis/Tools.java create mode 100644 src/main/java/org/json/CDL.java create mode 100644 src/main/java/org/json/Cookie.java create mode 100644 src/main/java/org/json/CookieList.java create mode 100644 src/main/java/org/json/HTTP.java create mode 100644 src/main/java/org/json/HTTPTokener.java create mode 100644 src/main/java/org/json/JSONArray.java create mode 100644 src/main/java/org/json/JSONException.java create mode 100644 src/main/java/org/json/JSONML.java create mode 100644 src/main/java/org/json/JSONObject.java create mode 100644 src/main/java/org/json/JSONString.java create mode 100644 src/main/java/org/json/JSONStringer.java create mode 100644 src/main/java/org/json/JSONTokener.java create mode 100644 src/main/java/org/json/JSONWriter.java create mode 100644 src/main/java/org/json/Kim.java create mode 100644 src/main/java/org/json/Property.java create mode 100644 src/main/java/org/json/XML.java create mode 100644 src/main/java/org/json/XMLTokener.java delete mode 100644 src/net/aksingh/java/api/owm/AbstractWeatherData.java delete mode 100644 src/net/aksingh/java/api/owm/CurrentWeatherData.java delete mode 100644 src/net/aksingh/java/api/owm/DailyForecastData.java delete mode 100644 src/net/aksingh/java/api/owm/ForecastWeatherData.java delete mode 100644 src/net/aksingh/java/api/owm/OpenWeatherMap.java delete mode 100644 src/net/aksingh/java/api/owm/Tools.java create mode 100644 src/test/java/net/aksingh/owmjapis/CurrentWeatherTest.java create mode 100644 src/test/java/net/aksingh/owmjapis/DailyForecastTest.java create mode 100644 src/test/java/net/aksingh/owmjapis/HourlyForecastTest.java diff --git a/.gitignore b/.gitignore index 29e97c8..be43da5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ lib/nblibraries.properties nbproject/ -lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar /build/ build.xml /lib/CopyLibs/ -/dist/ \ No newline at end of file +/dist/ +/.gradle/ +/.idea/ +owm-japis.iml \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 430aff9..743258e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,4 @@ -The MIT License (MIT) - -Copyright (c) 2013-2014 Ashutosh Kumar Singh [me@aksingh.net] +Copyright (c) 2013-2014 Ashutosh Kumar Singh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5b37d34..be82c89 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ #OWM JAPIs -####Java APIs for OpenWeatherMap.org +####Java Wrapper Library for OpenWeatherMap.org Web APIs -Create weather-aware applications for **Java and Android platforms** in minimum time using this easy-to-use, detailed and documented API library for retrieving weather data from OpenWeatherMap.org. +Create weather-aware applications for **Java and Android platforms** in minimum time using OWM JAPIs, an easy-to-use, detailed and documented weather API library for retrieving weather data from OpenWeatherMap.org. You can easily **retrieve and use weather data** in your applications using this library. -OWM JAPIs lets you **get weather data in just 3-5 lines of code** (excluding any other/skeleton code, of course). You can develop applications for multiple platforms using this library, such as Windows, Mac OS X and Linux (by creating Java applications), and Android. +OWM JAPIs lets you **get weather data in only 3-5 lines of code** (excluding any other/skeleton code, of course). You can develop applications for multiple platforms using this library, such as Windows, Mac OS X, Linux, and Android. @@ -13,7 +13,7 @@ OWM JAPIs lets you **get weather data in just 3-5 lines of code** (excluding any 2. Easy to use 3. Minimizes your code -OWM JAPIs lets you **focus only on your application code** and weather retrieval code is already there. Additionally, weather retrieval code becomes short and simple using this library – as less as 3-5 lines of code can get you weather data from OpenWeatherMap.org in your Java or Android application. **Don't believe? Have a look on the example below.** +OWM JAPIs lets you **focus just on your application's logic** and **weather retrieval code is provided** by this library. Additionally, weather retrieval code becomes very short using this library – as less as 3-5 lines of code can get you weather data from OpenWeatherMap.org in your Java or Android application. **Surprising, right? Have a look on the example(s) below.** @@ -26,7 +26,37 @@ Download the library's source and binaries from [OWM JAPIs Downloads][1]. ###2.5 (Compatible with OpenWeatherMap.org's API v2.5) -####2.5.0.2 (latest) +####2.5.0.3 (latest) + +**Implemented:** + +1. Current Weather +2. Daily Forecasts +3. Hourly Forecasts + +**New Features:** + +1. Faster than ever before +2. Raw Response for Caching purposes +3. APIs' URL building using StringBuilder +4. Multi-lingual (multiple languages) support +5. Support for external/third-party HTTP libraries (like Apache's HttpComponents) +6. Units and Language enums for setting configuration easily and correctly +7. Better maintain-able source code (for developers) +8. Ported the project to Gradle (for developers) + +**Changed:** + +1. Package's name from net.aksingh.java.api.owm to net.aksingh.owmjapis +2. Class's name from CurrentWeatherData to CurrentWeather +3. Class's name from DailyForecastData to DailyForecast +4. Class's name from ForecastWeatherData to HourlyForecast +5. Some functions' name and signature + +**Apologies for making such changes, but it was required to make things simpler. Don't worry, they're not going to change again. :)** + + +####2.5.0.2 **Bug-fix version:** @@ -55,16 +85,15 @@ Download the library's source and binaries from [OWM JAPIs Downloads][1]. ##How to use OWM JAPIs? Anyone with little coding knowledge of Java will feel at home while using this library. **Identifiers are written to be self-explanatory and APIs' documentation** is also provided. It makes the coding process very easy, even for beginners. -1. Add these two JAR files in your project's libraries: - 1. OWM_JAPIs.jar - 2. JSON.jar +1. Add this JAR file in your project's libraries: + 1. owm-japis.jar 2. Write your code as such: 1. Create and initialize object {obj1} of "OpenWeatherMap" class - 2. Call this object's {obj1} functions to get the desired weather data (such as current weather, weather forecast, etc.). - 3. The data is returned as a new object {obj2} of a compatible class based on the type of asked weather data (current weather data comes in a different class's object than weather forecast data). + 2. Call this object's {obj1} functions to get the desired weather data (such as current weather, daily forecast, etc.). + 3. The data is returned as a new object {obj2} of a compatible class based on the type of asked/retrieved weather data (current weather data comes in a different class's object than daily forecast data). 3. Call this returned object's {obj2} functions to get the required information from the collective weather data (such as temperature, pressure, wind speed, etc.). -Kindly have a look on the example below for a clear understanding. +Kindly have a look on the example(s) below for clear understanding. @@ -74,8 +103,8 @@ Kindly have a look on the example below for a clear understanding. import java.io.IOException; import java.net.MalformedURLException; - import net.aksingh.java.api.owm.CurrentWeatherData; - import net.aksingh.java.api.owm.OpenWeatherMap; + import net.aksingh.owmjapis.CurrentWeather; + import net.aksingh.owmjapis.OpenWeatherMap; import org.json.JSONException; public class OwmJapisExample1 { @@ -87,14 +116,14 @@ Kindly have a look on the example below for a clear understanding. OpenWeatherMap owm = new OpenWeatherMap(""); // getting current weather data for the "London" city - CurrentWeatherData cwd = owm.currentWeatherByCityName("London"); + CurrentWeather cwd = owm.currentWeatherByCityName("London"); //printing city name from the retrieved data System.out.println("City: " + cwd.getCityName()); // printing the max./min. temperature - System.out.println("Temperature: " + cwd.getMainData_Object().getMaxTemperature() - + "/" + cwd.getMainData_Object().getMinTemperature() + "\'F"); + System.out.println("Temperature: " + cwd.getMainInstance().getMaxTemperature() + + "/" + cwd.getMainInstance().getMinTemperature() + "\'F"); } } @@ -105,18 +134,18 @@ Kindly have a look on the example below for a clear understanding. ###Advance Example -You can simply use the APIs (as given in basic example) for learning, testing or experimenting with the functions provided in this library. But it's not good enough for a production or enterprise environment. +You can simply use the APIs (as given in basic example) for learning, testing or experimenting with the functions provided in this library. But it may not be good enough for production or deployment environment. -Professionally, you should always **write code which can handle errors/exceptions** at the runtime. OWM JAPIs solves this problem too – by providing checker functions which allows you to **check if a data is available or not**, i.e., that particular data is retrieved and parsed properly or not. Of course, exception handling can still be used, but these functions are really useful and make the data-error-handling task very simple. +Professionally, you should always **write code which can handle errors/exceptions** at the runtime. OWM JAPIs also helps here – by providing checker functions which allows you to **check if a data is available or not**, i.e., that particular data is retrieved and parsed properly or not. Of course, exception handling can still be used, but these functions are really useful and make the retrieved-data-error-handling task very simple. -Using OWM JAPIs, you can always check if a particular data is available or not. This is done by using the **has<data-name>()** functions. For example, **hasResponseCode()** function checks if the retrieved data has a response code or not; and if available, response code can be used to check if the whole data was downloaded and parsed correctly or not, as shown below in the example. +Using OWM JAPIs, you can always check if a particular data is available or not. This is done by using the **has()** functions. For example, **hasResponseCode()** function checks if the retrieved data has a response code or not; and if available, response code can be used to check if the whole data was downloaded and parsed correctly or not. ####Sample Code import java.io.IOException; import java.net.MalformedURLException; - import net.aksingh.java.api.owm.CurrentWeatherData; - import net.aksingh.java.api.owm.OpenWeatherMap; + import net.aksingh.owmjapis.CurrentWeather; + import net.aksingh.owmjapis.OpenWeatherMap; import org.json.JSONException; public class OwmJapisExample2 { @@ -128,11 +157,10 @@ Using OWM JAPIs, you can always check if a particular data is available or not. OpenWeatherMap owm = new OpenWeatherMap(""); // getting current weather data for the "London" city - CurrentWeatherData cwd = owm.currentWeatherByCityName("London"); + CurrentWeather cwd = owm.currentWeatherByCityName("London"); - // checking data retrieval was successful or not using the response code - // response code = 200 means successful retrieval - if (cwd.hasResponseCode() && cwd.getResponseCode() == 200) { + // checking data retrieval was successful or not + if (cwd.isValid()) { // checking if city name is available if (cwd.hasCityName()) { @@ -141,10 +169,10 @@ Using OWM JAPIs, you can always check if a particular data is available or not. } // checking if max. temp. and min. temp. is available - if (cwd.getMainData_Object().hasMaxTemperature() && cwd.getMainData_Object().hasMinTemperature()) { + if (cwd.getMainInstance().hasMaxTemperature() && cwd.getMainInstance().hasMinTemperature()) { // printing the max./min. temperature - System.out.println("Temperature: " + cwd.getMainData_Object().getMaxTemperature() - + "/" + cwd.getMainData_Object().getMinTemperature() + "\'F"); + System.out.println("Temperature: " + cwd.getMainInstance().getMaxTemperature() + + "/" + cwd.getMainInstance().getMinTemperature() + "\'F"); } } } @@ -179,12 +207,18 @@ Kindly post bugs or feature requests at [OWM JAPIs Bugs/Requests][3] and I will for providing free weather data and creating easy-to-use web APIs. 2. [JSON.org][6] -for providing such a great data interchange language and its implementation in Java. +for providing such a great data interchange language and its library in Java. + +3. [ForecastIO-Lib-Java][8] +for providing ideas like support for third-party Http libraries. + +4. [Bug Reporters][3] +for reporting bugs, and even finding and sharing possible solutions for them. ##License -Copyright (c) 2013-2014 Ashutosh Kumar Singh [me@AKSingh.net] +Copyright (c) 2013-2014 Ashutosh Kumar Singh Released under the terms of [MIT license][7]. It's open source and developer-friendly. @@ -195,4 +229,5 @@ Released under the terms of [MIT license][7]. It's open source and developer-fri [4]: http://www.aksingh.net/ [5]: http://openweathermap.org/ [6]: http://www.json.org/java/index.html - [7]: http://opensource.org/licenses/MIT \ No newline at end of file + [7]: http://opensource.org/licenses/MIT + [8]: https://github.com/dvdme/forecastio-lib-java \ No newline at end of file diff --git a/README.pdf b/README.pdf deleted file mode 100644 index a4932910feec22e9b7e97cd4b901d07660558608..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54876 zcmdSB1z42N*FU^;N(drIEg&hq?9#1tHv*DNcXta)3(_Eslz^Z}iFAr6B1m^jinQ`B z3)tV^@B4qB_kTUti!R*v?94sqoH;Z1=bV{yXq9eCuyC+)VR8W3fp$igm;w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h&>C`t3ycucy`v0`ia00Nq_vI~%|)GC?C#Jsuq$JsTSd zEpsh{zoH#H&AU#8SMxhS-Vp!>y}#!j_xT?Q6u-yD0N6V8jSTDn64n4Y_dn-d+6~ue z8&D;ffV|WFm2tqk)@u-;E%1kGdD@=BfPf9A|1IO@hXg%X0N)TRKsLYKTl(v%_4`q>gm}1pXm5g)bQ@uPecGzKL9GlUy%PPK0d%O^9R)L{rCs=w@m-JBAy0N{R_I* zD@gEiR!<|wLgV_sx^ z=C zzWm)Q_GzY{IvxHb_?-MN2!0)<{#=5mE?++h=F)y6_-mH0@h4Sa;XhIRkGb^eDceujy`q1D{V`zt z!w`yT~*Y9Ibd^H}j4%`dP&3iSQ;4`bg`L*Y++h3bES t|KH7qPwVTc?c*oWQQiM74F8)Y \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html deleted file mode 100644 index 47d2e99..0000000 --- a/javadoc/allclasses-frame.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -All Classes (OWM JAPIs Docs) - - - - -

All Classes

-
- - diff --git a/javadoc/allclasses-noframe.html b/javadoc/allclasses-noframe.html deleted file mode 100644 index 584e7e5..0000000 --- a/javadoc/allclasses-noframe.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -All Classes (OWM JAPIs Docs) - - - - -

All Classes

- - - diff --git a/javadoc/constant-values.html b/javadoc/constant-values.html deleted file mode 100644 index f2bfc88..0000000 --- a/javadoc/constant-values.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - -Constant Field Values (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

Constant Field Values

-

Contents

- -
-
- - -

net.aksingh.*

- -
- -
- - - - - -
- - - - diff --git a/javadoc/deprecated-list.html b/javadoc/deprecated-list.html deleted file mode 100644 index 1f9c279..0000000 --- a/javadoc/deprecated-list.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Deprecated List (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

Deprecated API

-

Contents

-
- -
- - - - - -
- - - - diff --git a/javadoc/help-doc.html b/javadoc/help-doc.html deleted file mode 100644 index 5e9c737..0000000 --- a/javadoc/help-doc.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -API Help (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

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.
-
-
-
    -
  • -

    Package

    -

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    -
      -
    • Interfaces (italic)
    • -
    • Classes
    • -
    • Enums
    • -
    • Exceptions
    • -
    • Errors
    • -
    • Annotation Types
    • -
    -
  • -
  • -

    Class/Interface

    -

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    -
      -
    • Class inheritance diagram
    • -
    • Direct Subclasses
    • -
    • All Known Subinterfaces
    • -
    • All Known Implementing Classes
    • -
    • Class/interface declaration
    • -
    • Class/interface description
    • -
    -
      -
    • Nested Class Summary
    • -
    • Field Summary
    • -
    • Constructor Summary
    • -
    • Method Summary
    • -
    -
      -
    • Field Detail
    • -
    • Constructor Detail
    • -
    • Method Detail
    • -
    -

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    -
  • -
  • -

    Annotation Type

    -

    Each annotation type has its own separate page with the following sections:

    -
      -
    • Annotation Type declaration
    • -
    • Annotation Type description
    • -
    • Required Element Summary
    • -
    • Optional Element Summary
    • -
    • Element Detail
    • -
    -
  • -
  • -

    Enum

    -

    Each enum has its own separate page with the following sections:

    -
      -
    • Enum declaration
    • -
    • Enum description
    • -
    • Enum Constant Summary
    • -
    • Enum Constant Detail
    • -
    -
  • -
  • -

    Use

    -

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    -
  • -
  • -

    Tree (Class Hierarchy)

    -

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    -
      -
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • -
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • -
    -
  • -
  • -

    Deprecated API

    -

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    -
  • -
  • -

    Index

    -

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    -
  • -
  • -

    Prev/Next

    -

    These links take you to the next or previous class, interface, package, or related page.

    -
  • -
  • -

    Frames/No Frames

    -

    These links show and hide the HTML frames. All pages are available with or without frames.

    -
  • -
  • -

    All Classes

    -

    The All Classes link shows all classes and interfaces except non-static nested types.

    -
  • -
  • -

    Serialized Form

    -

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    -
  • -
  • -

    Constant Field Values

    -

    The Constant Field Values page lists the static final fields and their values.

    -
  • -
-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 deleted file mode 100644 index 207066a..0000000 --- a/javadoc/index-files/index-1.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - -A-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-10.html b/javadoc/index-files/index-10.html deleted file mode 100644 index b11cb06..0000000 --- a/javadoc/index-files/index-10.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - -T-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

T

-
-
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
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-11.html b/javadoc/index-files/index-11.html deleted file mode 100644 index bc6c3a9..0000000 --- a/javadoc/index-files/index-11.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - -V-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

V

-
-
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 C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-2.html b/javadoc/index-files/index-2.html deleted file mode 100644 index 6b48e56..0000000 --- a/javadoc/index-files/index-2.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - -C-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

C

-
-
convertDegree2Direction(float) - Method in class net.aksingh.java.api.owm.Tools.Convertor
-
-
Converts degree to direction.
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
currentWeatherFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-3.html b/javadoc/index-files/index-3.html deleted file mode 100644 index a61eb28..0000000 --- a/javadoc/index-files/index-3.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -D-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
dailyForecastFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
-
 
-
downloadPage(String) - Static method in class net.aksingh.java.api.owm.Tools.Downloader
-
-
Downloads a page/content from the Internet.
-
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-4.html b/javadoc/index-files/index-4.html deleted file mode 100644 index e9c23f9..0000000 --- a/javadoc/index-files/index-4.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -F-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

F

-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
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
-
-
forecastWeatherFromResponse(String) - Method in class net.aksingh.java.api.owm.OpenWeatherMap
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-5.html b/javadoc/index-files/index-5.html deleted file mode 100644 index 301748b..0000000 --- a/javadoc/index-files/index-5.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - -G-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

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
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-6.html b/javadoc/index-files/index-6.html deleted file mode 100644 index 8779686..0000000 --- a/javadoc/index-files/index-6.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - -H-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

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
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-7.html b/javadoc/index-files/index-7.html deleted file mode 100644 index 704115e..0000000 --- a/javadoc/index-files/index-7.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -J-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

J

-
-
JSON_CLOUDS - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
-
-
Key for JSON object - Clouds
-
-
JSON_COORD - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
-
-
Key for JSON object - Coordinates (Geographic coordinates)
-
-
JSON_MAIN - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
-
-
Key for JSON object - Main (Temperature, pressure, etc.)
-
-
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_WIND - Variable in class net.aksingh.java.api.owm.AbstractWeatherData
-
-
Key for JSON object - Wind
-
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-8.html b/javadoc/index-files/index-8.html deleted file mode 100644 index 02f2060..0000000 --- a/javadoc/index-files/index-8.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - -N-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

N

-
-
net.aksingh.java.api.owm - package net.aksingh.java.api.owm
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index-files/index-9.html b/javadoc/index-files/index-9.html deleted file mode 100644 index d8b58f0..0000000 --- a/javadoc/index-files/index-9.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -O-Index (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
A C D F G H J N O T V  - - -

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
-
 
-
-A C D F G H J N O T V 
- -
- - - - - -
- - - - diff --git a/javadoc/index.html b/javadoc/index.html deleted file mode 100644 index 4e6de41..0000000 --- a/javadoc/index.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - -OWM JAPIs Docs - - - - - - -<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 deleted file mode 100644 index 8f16e43..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Clouds.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - -AbstractWeatherData.Clouds (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData.Clouds

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData.Clouds
    • -
    -
  • -
-
-
    -
  • -
    -
    Direct Known Subclasses:
    -
    CurrentWeatherData.Clouds, ForecastWeatherData.Forecast.Clouds
    -
    -
    -
    Enclosing class:
    -
    AbstractWeatherData
    -
    -
    -
    -
    public abstract static class AbstractWeatherData.Clouds
    -extends java.lang.Object
    -
    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. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/07/27
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      floatgetPercentageOfClouds() -
      Returns data for percentage of all clouds.
      -
      booleanhasPercentageOfClouds() -
      Tells if the data for percentage of all clouds is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData.Clouds

        -
        public 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

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData.Clouds

        -
        public AbstractWeatherData.Clouds(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about clouds
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasPercentageOfClouds

        -
        public boolean hasPercentageOfClouds()
        -
        Tells if the data for percentage of all clouds is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        getPercentageOfClouds

        -
        public float getPercentageOfClouds()
        -
        Returns data for percentage of all clouds. -

        -
        Returns:
        Percentage of all clouds if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html deleted file mode 100644 index 004cd84..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Coord.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - -AbstractWeatherData.Coord (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData.Coord

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData.Coord
    • -
    -
  • -
-
-
    -
  • -
    -
    Direct Known Subclasses:
    -
    CurrentWeatherData.Coord, DailyForecastData.City.Coord, ForecastWeatherData.City.Coord
    -
    -
    -
    Enclosing class:
    -
    AbstractWeatherData
    -
    -
    -
    -
    public abstract static class AbstractWeatherData.Coord
    -extends java.lang.Object
    -
    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. -

    -
    Version:
    -
    2013/07/28
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      floatgetLatitude() -
      Returns data for latitude of the city.
      -
      floatgetLongitude() -
      Returns data for longitude of the city.
      -
      booleanhasLatitude() -
      Tells if the data for latitude of the city is available or not.
      -
      booleanhasLongitude() -
      Tells if the data for longitude of the city is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData.Coord

        -
        public 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

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData.Coord

        -
        public AbstractWeatherData.Coord(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about coordinates
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasLatitude

        -
        public boolean hasLatitude()
        -
        Tells if the data for latitude of the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasLongitude

        -
        public boolean hasLongitude()
        -
        Tells if the data for longitude of the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        getLatitude

        -
        public float getLatitude()
        -
        Returns data for latitude of the city. -

        -
        Returns:
        Latitude of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getLongitude

        -
        public float getLongitude()
        -
        Returns data for longitude of the city. -

        -
        Returns:
        Longitude of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html deleted file mode 100644 index 5e1de9d..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Main.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - -AbstractWeatherData.Main (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData.Main

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData.Main
    • -
    -
  • -
-
-
    -
  • -
    -
    Direct Known Subclasses:
    -
    CurrentWeatherData.Main, ForecastWeatherData.Forecast.Main
    -
    -
    -
    Enclosing class:
    -
    AbstractWeatherData
    -
    -
    -
    -
    public abstract static class AbstractWeatherData.Main
    -extends java.lang.Object
    -
    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. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/07/28
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      floatgetHumidity() -
      Returns data for humidity of the city.
      -
      floatgetMaxTemperature() -
      Returns data for maximum temperature of the city.
      -
      floatgetMinTemperature() -
      Returns data for minimum temperature of the city.
      -
      floatgetPressure() -
      Returns data for pressure of the city.
      -
      floatgetTemperature() -
      Returns data for temperature of the city.
      -
      booleanhasHumidity() -
      Tells if the data for humidity of the city is available or not.
      -
      booleanhasMaxTemperature() -
      Tells if the data for maximum temperature of the city is available or - not.
      -
      booleanhasMinTemperature() -
      Tells if the data for minimum temperature of the city is available or - not.
      -
      booleanhasPressure() -
      Tells if the data for pressure of the city is available or not.
      -
      booleanhasTemperature() -
      Tells if the data for temperature of the city is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData.Main

        -
        public 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

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData.Main

        -
        public AbstractWeatherData.Main(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about main weather - elements. For example, temperature, pressure, etc.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasTemperature

        -
        public boolean hasTemperature()
        -
        Tells if the data for temperature of the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasMinTemperature

        -
        public boolean hasMinTemperature()
        -
        Tells if the data for minimum temperature of the city is available or - not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasMaxTemperature

        -
        public boolean hasMaxTemperature()
        -
        Tells if the data for maximum temperature of the city is available or - not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasPressure

        -
        public boolean hasPressure()
        -
        Tells if the data for pressure of the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasHumidity

        -
        public boolean hasHumidity()
        -
        Tells if the data for humidity of the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        getTemperature

        -
        public float getTemperature()
        -
        Returns data for temperature of the city. -

        -
        Returns:
        Temperature of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getMinTemperature

        -
        public float getMinTemperature()
        -
        Returns data for minimum temperature of the city. -

        -
        Returns:
        Minimum temperature of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getMaxTemperature

        -
        public float getMaxTemperature()
        -
        Returns data for maximum temperature of the city. -

        -
        Returns:
        Maximum temperature of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getPressure

        -
        public float getPressure()
        -
        Returns data for pressure of the city. -

        -
        Returns:
        Pressure of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getHumidity

        -
        public float getHumidity()
        -
        Returns data for humidity of the city. -

        -
        Returns:
        Humidity of the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html deleted file mode 100644 index 9e1f2dd..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Weather.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - -AbstractWeatherData.Weather (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData.Weather

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData.Weather
    • -
    -
  • -
-
- -
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      intgetWeatherCode() -
      Returns data for code for weather of the city.
      -
      java.lang.StringgetWeatherDescription() -
      Returns data for description for weather of the city.
      -
      java.lang.StringgetWeatherIconName() -
      Returns data for name of icon for weather of the city.
      -
      java.lang.StringgetWeatherName() -
      Returns data for name for weather of the city.
      -
      booleanhasWeatherCode() -
      Tells if the data for weather's code is available or not.
      -
      booleanhasWeatherDescription() -
      Tells if the data for weather's description is available or not.
      -
      booleanhasWeatherIconName() -
      Tells if the data for name of weather's icon is available or not.
      -
      booleanhasWeatherName() -
      Tells if the data for weather's name is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData.Weather

        -
        public 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

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData.Weather

        -
        public AbstractWeatherData.Weather(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about weather id, name, - etc.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasWeatherCode

        -
        public boolean hasWeatherCode()
        -
        Tells if the data for weather's code is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasWeatherName

        -
        public boolean hasWeatherName()
        -
        Tells if the data for weather's name is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasWeatherDescription

        -
        public boolean hasWeatherDescription()
        -
        Tells if the data for weather's description is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasWeatherIconName

        -
        public boolean hasWeatherIconName()
        -
        Tells if the data for name of weather's icon is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        getWeatherCode

        -
        public int getWeatherCode()
        -
        Returns data for code for weather of the city. -

        -
        Returns:
        Code for weather of the city if available, otherwise - Integer.MIN_VALUE
        -
      • -
      - - - -
        -
      • -

        getWeatherName

        -
        public java.lang.String getWeatherName()
        -
        Returns data for name for weather of the city. -

        -
        Returns:
        Name for weather of the city if available, otherwise - null
        -
      • -
      - - - -
        -
      • -

        getWeatherDescription

        -
        public java.lang.String getWeatherDescription()
        -
        Returns data for description for weather of the city. -

        -
        Returns:
        Description for weather of the city if available, otherwise - null
        -
      • -
      - - - -
        -
      • -

        getWeatherIconName

        -
        public java.lang.String getWeatherIconName()
        -
        Returns data for name of icon for weather of the city. -

        -
        Returns:
        Name of icon for weather of the city if available, otherwise - null
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html deleted file mode 100644 index 4ab94ed..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.Wind.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - -AbstractWeatherData.Wind (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData.Wind

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData.Wind
    • -
    -
  • -
-
-
    -
  • -
    -
    Direct Known Subclasses:
    -
    CurrentWeatherData.Wind, ForecastWeatherData.Forecast.Wind
    -
    -
    -
    Enclosing class:
    -
    AbstractWeatherData
    -
    -
    -
    -
    public abstract static class AbstractWeatherData.Wind
    -extends java.lang.Object
    -
    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. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/07/28
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      floatgetWindDegree() -
      Returns data for degree of wind in the city.
      -
      floatgetWindSpeed() -
      Returns data for speed of wind in the city.
      -
      booleanhasWindDegree() -
      Tells if the data for degree (degree gives direction) of wind in the - city is available or not.
      -
      booleanhasWindSpeed() -
      Tells if the data for speed of wind in the city is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData.Wind

        -
        public 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

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData.Wind

        -
        public AbstractWeatherData.Wind(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about wind
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasWindSpeed

        -
        public boolean hasWindSpeed()
        -
        Tells if the data for speed of wind in the city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        hasWindDegree

        -
        public boolean hasWindDegree()
        -
        Tells if the data for degree (degree gives direction) of wind in the - city is available or not. -

        -
        Returns:
        true if data available, otherwise - false
        -
      • -
      - - - -
        -
      • -

        getWindSpeed

        -
        public float getWindSpeed()
        -
        Returns data for speed of wind in the city. -

        -
        Returns:
        Speed of wind in the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      - - - -
        -
      • -

        getWindDegree

        -
        public float getWindDegree()
        -
        Returns data for degree of wind in the city. -

        -
        Returns:
        Degree of wind in the city if available, otherwise - Float.NaN, i.e., Not a Number.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html b/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html deleted file mode 100644 index 96d39d1..0000000 --- a/javadoc/net/aksingh/java/api/owm/AbstractWeatherData.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - -AbstractWeatherData (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class AbstractWeatherData

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.AbstractWeatherData
    • -
    -
  • -
-
-
    -
  • -
    -
    Direct Known Subclasses:
    -
    CurrentWeatherData, DailyForecastData.Forecast, ForecastWeatherData.Forecast
    -
    -
    -
    -
    public abstract class AbstractWeatherData
    -extends java.lang.Object
    -
    This class provides default implementations for - CurrentWeatherData and - 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. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/07/26
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Field Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Fields 
      Modifier and TypeField and Description
      protected java.lang.StringJSON_CLOUDS -
      Key for JSON object - Clouds
      -
      protected java.lang.StringJSON_COORD -
      Key for JSON object - Coordinates (Geographic coordinates)
      -
      protected java.lang.StringJSON_MAIN -
      Key for JSON object - Main (Temperature, pressure, etc.)
      -
      protected java.lang.StringJSON_WEATHER -
      Key for JSON array - Weather (Weather name, description, etc.)
      -
      protected java.lang.StringJSON_WIND -
      Key for JSON object - Wind
      -
      -
    • -
    - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - - - - -
      Constructors 
      Constructor and Description
      AbstractWeatherData() -
      Non-parameterized constructor
      -
      AbstractWeatherData(org.json.JSONObject jsonObj) -
      Parameterized constructor
      -
      -
    • -
    - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      java.util.DategetDateTime() -
      Returns data for date and time of this weather.
      -
      booleanhasDateTime() -
      Tells if the data for date and time of this weather is available or not.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        JSON_CLOUDS

        -
        protected final java.lang.String JSON_CLOUDS
        -
        Key for JSON object - Clouds
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_COORD

        -
        protected final java.lang.String JSON_COORD
        -
        Key for JSON object - Coordinates (Geographic coordinates)
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_MAIN

        -
        protected final java.lang.String JSON_MAIN
        -
        Key for JSON object - Main (Temperature, pressure, etc.)
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_WEATHER

        -
        protected final java.lang.String JSON_WEATHER
        -
        Key for JSON array - Weather (Weather name, description, etc.)
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_WIND

        -
        protected final java.lang.String JSON_WIND
        -
        Key for JSON object - Wind
        -
        See Also:
        Constant Field Values
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractWeatherData

        -
        public AbstractWeatherData()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        AbstractWeatherData

        -
        public AbstractWeatherData(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing weather data
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasDateTime

        -
        public boolean hasDateTime()
        -
        Tells if the data for date and time of this weather is available or not. -

        -
        Returns:
        true if data available, otherwise false
        -
      • -
      - - - -
        -
      • -

        getDateTime

        -
        public java.util.Date getDateTime()
        -
        Returns data for date and time of this weather. -

        -
        Returns:
        Date and time (in object of Date) if available, - otherwise null
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html deleted file mode 100644 index 16ab0bc..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Clouds.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -CurrentWeatherData.Clouds (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Clouds

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Clouds
    -extends AbstractWeatherData.Clouds
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Clouds

        -
        public CurrentWeatherData.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

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Clouds

        -
        public CurrentWeatherData.Clouds(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about clouds
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html deleted file mode 100644 index a1c519e..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Coord.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -CurrentWeatherData.Coord (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Coord

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Coord
    -extends AbstractWeatherData.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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Coord

        -
        public CurrentWeatherData.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

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Coord

        -
        public CurrentWeatherData.Coord(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about coordinates
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html deleted file mode 100644 index 2e2e55d..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Main.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -CurrentWeatherData.Main (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Main

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Main
    -extends AbstractWeatherData.Main
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Main

        -
        public CurrentWeatherData.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

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Main

        -
        public CurrentWeatherData.Main(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about main weather - elements (temperature, pressure, etc.)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html deleted file mode 100644 index 9b05a1e..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Rain.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - -CurrentWeatherData.Rain (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Rain

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.CurrentWeatherData.Rain
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Rain
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      floatgetRain3Hours() 
      booleanhasRain3Hours() 
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Rain

        -
        public CurrentWeatherData.Rain()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Rain

        -
        public CurrentWeatherData.Rain(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about rain
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasRain3Hours

        -
        public boolean hasRain3Hours()
        -
      • -
      - - - -
        -
      • -

        getRain3Hours

        -
        public float getRain3Hours()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html deleted file mode 100644 index 029ab26..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Sys.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - -CurrentWeatherData.Sys (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Sys

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.CurrentWeatherData.Sys
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Sys
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      java.lang.StringgetCountryCode() 
      java.util.DategetSunriseTime() 
      java.util.DategetSunsetTime() 
      booleanhasCountryCode() 
      booleanhasSunriseTime() 
      booleanhasSunsetTime() 
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Sys

        -
        public CurrentWeatherData.Sys()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Sys

        -
        public CurrentWeatherData.Sys(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about country, sunrise, - and sunset.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasCountryCode

        -
        public boolean hasCountryCode()
        -
      • -
      - - - -
        -
      • -

        hasSunriseTime

        -
        public boolean hasSunriseTime()
        -
      • -
      - - - -
        -
      • -

        hasSunsetTime

        -
        public boolean hasSunsetTime()
        -
      • -
      - - - -
        -
      • -

        getCountryCode

        -
        public java.lang.String getCountryCode()
        -
      • -
      - - - -
        -
      • -

        getSunriseTime

        -
        public java.util.Date getSunriseTime()
        -
      • -
      - - - -
        -
      • -

        getSunsetTime

        -
        public java.util.Date getSunsetTime()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html deleted file mode 100644 index 6aa09d4..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Weather.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -CurrentWeatherData.Weather (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Weather

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Weather
    -extends AbstractWeatherData.Weather
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Weather

        -
        public CurrentWeatherData.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

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Weather

        -
        public CurrentWeatherData.Weather(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about weather id, name, - etc.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html deleted file mode 100644 index 535ede6..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.Wind.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - -CurrentWeatherData.Wind (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData.Wind

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    CurrentWeatherData
    -
    -
    -
    -
    public static class CurrentWeatherData.Wind
    -extends AbstractWeatherData.Wind
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData.Wind

        -
        public CurrentWeatherData.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

        -
      • -
      - - - -
        -
      • -

        CurrentWeatherData.Wind

        -
        public CurrentWeatherData.Wind(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about wind
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasWindGust

        -
        public boolean hasWindGust()
        -
      • -
      - - - -
        -
      • -

        getWindGust

        -
        public float getWindGust()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html b/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html deleted file mode 100644 index 5fef1d3..0000000 --- a/javadoc/net/aksingh/java/api/owm/CurrentWeatherData.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - -CurrentWeatherData (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class CurrentWeatherData

-
-
- -
-
    -
  • -
    -
    -
    public class CurrentWeatherData
    -extends AbstractWeatherData
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CurrentWeatherData

        -
        public CurrentWeatherData(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing current weather data
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasBaseStation

        -
        public boolean hasBaseStation()
        -
      • -
      - - - -
        -
      • -

        hasCityCode

        -
        public boolean hasCityCode()
        -
      • -
      - - - -
        -
      • -

        hasCityName

        -
        public boolean hasCityName()
        -
      • -
      - - - -
        -
      • -

        hasResponseCode

        -
        public boolean hasResponseCode()
        -
      • -
      - - - -
        -
      • -

        getBaseStation

        -
        public java.lang.String getBaseStation()
        -
      • -
      - - - -
        -
      • -

        getCityCode

        -
        public long getCityCode()
        -
      • -
      - - - -
        -
      • -

        getCityName

        -
        public java.lang.String getCityName()
        -
      • -
      - - - -
        -
      • -

        getResponseCode

        -
        public int getResponseCode()
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        hasWeather_List

        -
        public boolean hasWeather_List()
        -
      • -
      - - - -
        -
      • -

        getWeather_List_Count

        -
        public int getWeather_List_Count()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html deleted file mode 100644 index b9c14e9..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.Coord.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -DailyForecastData.City.Coord (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData.City.Coord

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    DailyForecastData.City
    -
    -
    -
    -
    public static class DailyForecastData.City.Coord
    -extends AbstractWeatherData.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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData.City.Coord

        -
        public DailyForecastData.City.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

        -
      • -
      - - - -
        -
      • -

        DailyForecastData.City.Coord

        -
        public DailyForecastData.City.Coord(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about clouds
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html deleted file mode 100644 index d018497..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.City.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -DailyForecastData.City (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData.City

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.DailyForecastData.City
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    DailyForecastData
    -
    -
    -
    -
    public static class DailyForecastData.City
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData.City

        -
        public DailyForecastData.City()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        DailyForecastData.City

        -
        public DailyForecastData.City(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about city
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasCityCode

        -
        public boolean hasCityCode()
        -
      • -
      - - - -
        -
      • -

        hasCityName

        -
        public boolean hasCityName()
        -
      • -
      - - - -
        -
      • -

        hasCountryCode

        -
        public boolean hasCountryCode()
        -
      • -
      - - - -
        -
      • -

        hasCityPopulation

        -
        public boolean hasCityPopulation()
        -
      • -
      - - - -
        -
      • -

        getCityCode

        -
        public long getCityCode()
        -
      • -
      - - - -
        -
      • -

        getCityName

        -
        public java.lang.String getCityName()
        -
      • -
      - - - -
        -
      • -

        getCountryCode

        -
        public java.lang.String getCountryCode()
        -
      • -
      - - - -
        -
      • -

        getCityPopulation

        -
        public long getCityPopulation()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html deleted file mode 100644 index d969836..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Temperature.html +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - -DailyForecastData.Forecast.Temperature (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData.Forecast.Temperature

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    DailyForecastData.Forecast
    -
    -
    -
    -
    public static class DailyForecastData.Forecast.Temperature
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        JSON_TEMP_DAY

        -
        public final java.lang.String JSON_TEMP_DAY
        -
        Key for JSON variable Temp -> Day
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_TEMP_MIN

        -
        public final java.lang.String JSON_TEMP_MIN
        -
        Key for JSON variable Temp -> Minimum
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_TEMP_MAX

        -
        public final java.lang.String JSON_TEMP_MAX
        -
        Key for JSON variable Temp -> Maximum
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_TEMP_NIGHT

        -
        public final java.lang.String JSON_TEMP_NIGHT
        -
        Key for JSON variable Temp -> Night
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_TEMP_EVENING

        -
        public final java.lang.String JSON_TEMP_EVENING
        -
        Key for JSON variable Temp -> Evening
        -
        See Also:
        Constant Field Values
        -
      • -
      - - - -
        -
      • -

        JSON_TEMP_MORNING

        -
        public final java.lang.String JSON_TEMP_MORNING
        -
        Key for JSON variable Temp -> Morning
        -
        See Also:
        Constant Field Values
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData.Forecast.Temperature

        -
        public DailyForecastData.Forecast.Temperature()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        DailyForecastData.Forecast.Temperature

        -
        public DailyForecastData.Forecast.Temperature(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about temperature
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasDayTemperature

        -
        public boolean hasDayTemperature()
        -
      • -
      - - - -
        -
      • -

        hasMinimumTemperature

        -
        public boolean hasMinimumTemperature()
        -
      • -
      - - - -
        -
      • -

        hasMaximumTemperature

        -
        public boolean hasMaximumTemperature()
        -
      • -
      - - - -
        -
      • -

        hasNightTemperature

        -
        public boolean hasNightTemperature()
        -
      • -
      - - - -
        -
      • -

        hasEveningTemperature

        -
        public boolean hasEveningTemperature()
        -
      • -
      - - - -
        -
      • -

        hasMorningTemperature

        -
        public boolean hasMorningTemperature()
        -
      • -
      - - - -
        -
      • -

        getDayTemperature

        -
        public float getDayTemperature()
        -
      • -
      - - - -
        -
      • -

        getMinimumTemperature

        -
        public float getMinimumTemperature()
        -
      • -
      - - - -
        -
      • -

        getMaximumTemperature

        -
        public float getMaximumTemperature()
        -
      • -
      - - - -
        -
      • -

        getNightTemperature

        -
        public float getNightTemperature()
        -
      • -
      - - - -
        -
      • -

        getEveningTemperature

        -
        public float getEveningTemperature()
        -
      • -
      - - - -
        -
      • -

        getMorningTemperature

        -
        public float getMorningTemperature()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html deleted file mode 100644 index 9c2ba2d..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.Weather.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -DailyForecastData.Forecast.Weather (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData.Forecast.Weather

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    DailyForecastData.Forecast
    -
    -
    -
    -
    public static class DailyForecastData.Forecast.Weather
    -extends AbstractWeatherData.Weather
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData.Forecast.Weather

        -
        public DailyForecastData.Forecast.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

        -
      • -
      - - - -
        -
      • -

        DailyForecastData.Forecast.Weather

        -
        public DailyForecastData.Forecast.Weather(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about weather
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html deleted file mode 100644 index e1e2b27..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.Forecast.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - -DailyForecastData.Forecast (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData.Forecast

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    DailyForecastData
    -
    -
    -
    -
    public static class DailyForecastData.Forecast
    -extends AbstractWeatherData
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        JSON_TEMP

        -
        public final java.lang.String JSON_TEMP
        -
        Key for JSON object - Temperature
        -
        See Also:
        Constant Field Values
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData.Forecast

        -
        public DailyForecastData.Forecast()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        DailyForecastData.Forecast

        -
        public DailyForecastData.Forecast(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about forecasts
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasHumidity

        -
        public boolean hasHumidity()
        -
      • -
      - - - -
        -
      • -

        hasPressure

        -
        public boolean hasPressure()
        -
      • -
      - - - -
        -
      • -

        hasWindSpeed

        -
        public boolean hasWindSpeed()
        -
      • -
      - - - -
        -
      • -

        hasWindDegree

        -
        public boolean hasWindDegree()
        -
      • -
      - - - -
        -
      • -

        hasPercentageOfClouds

        -
        public boolean hasPercentageOfClouds()
        -
      • -
      - - - -
        -
      • -

        getHumidity

        -
        public float getHumidity()
        -
      • -
      - - - -
        -
      • -

        getPressure

        -
        public float getPressure()
        -
      • -
      - - - -
        -
      • -

        getWindSpeed

        -
        public float getWindSpeed()
        -
      • -
      - - - -
        -
      • -

        getWindDegree

        -
        public float getWindDegree()
        -
      • -
      - - - -
        -
      • -

        getPercentageOfClouds

        -
        public float getPercentageOfClouds()
        -
      • -
      - - - - - - - -
        -
      • -

        hasWeather_List

        -
        public boolean hasWeather_List()
        -
      • -
      - - - -
        -
      • -

        getWeather_List_Count

        -
        public int getWeather_List_Count()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/DailyForecastData.html b/javadoc/net/aksingh/java/api/owm/DailyForecastData.html deleted file mode 100644 index 76267cc..0000000 --- a/javadoc/net/aksingh/java/api/owm/DailyForecastData.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - -DailyForecastData (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class DailyForecastData

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.DailyForecastData
    • -
    -
  • -
-
-
    -
  • -
    -
    -
    public class DailyForecastData
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DailyForecastData

        -
        public DailyForecastData(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about daily forecasts
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasResponseCode

        -
        public boolean hasResponseCode()
        -
      • -
      - - - -
        -
      • -

        hasResponseTime

        -
        public boolean hasResponseTime()
        -
      • -
      - - - -
        -
      • -

        hasResponseForecastCount

        -
        public boolean hasResponseForecastCount()
        -
      • -
      - - - -
        -
      • -

        getResponseCode

        -
        public java.lang.String getResponseCode()
        -
      • -
      - - - -
        -
      • -

        getResponseTime

        -
        public float getResponseTime()
        -
      • -
      - - - -
        -
      • -

        getResponseForecastCount

        -
        public int getResponseForecastCount()
        -
      • -
      - - - - - - - -
        -
      • -

        hasForecast_List

        -
        public boolean hasForecast_List()
        -
      • -
      - - - -
        -
      • -

        getForecast_List_Count

        -
        public int getForecast_List_Count()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html deleted file mode 100644 index 771b86b..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.Coord.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -ForecastWeatherData.City.Coord (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.City.Coord

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.City
    -
    -
    -
    -
    public static class ForecastWeatherData.City.Coord
    -extends AbstractWeatherData.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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.City.Coord

        -
        public ForecastWeatherData.City.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

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.City.Coord

        -
        public ForecastWeatherData.City.Coord(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about clouds
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html deleted file mode 100644 index 46b6f74..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.City.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -ForecastWeatherData.City (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.City

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.ForecastWeatherData.City
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData
    -
    -
    -
    -
    public static class ForecastWeatherData.City
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.City

        -
        public ForecastWeatherData.City()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.City

        -
        public ForecastWeatherData.City(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about city
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasCityCode

        -
        public boolean hasCityCode()
        -
      • -
      - - - -
        -
      • -

        hasCityName

        -
        public boolean hasCityName()
        -
      • -
      - - - -
        -
      • -

        hasCountryCode

        -
        public boolean hasCountryCode()
        -
      • -
      - - - -
        -
      • -

        hasCityPopulation

        -
        public boolean hasCityPopulation()
        -
      • -
      - - - -
        -
      • -

        getCityCode

        -
        public long getCityCode()
        -
      • -
      - - - -
        -
      • -

        getCityName

        -
        public java.lang.String getCityName()
        -
      • -
      - - - -
        -
      • -

        getCountryCode

        -
        public java.lang.String getCountryCode()
        -
      • -
      - - - -
        -
      • -

        getCityPopulation

        -
        public long getCityPopulation()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html deleted file mode 100644 index a0d829b..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Clouds.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast.Clouds (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast.Clouds

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.Forecast
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast.Clouds
    -extends AbstractWeatherData.Clouds
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Clouds

        -
        public ForecastWeatherData.Forecast.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

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Clouds

        -
        public ForecastWeatherData.Forecast.Clouds(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about 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 deleted file mode 100644 index dd34cbf..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Main.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast.Main (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast.Main

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.Forecast
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast.Main
    -extends AbstractWeatherData.Main
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Main

        -
        public ForecastWeatherData.Forecast.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

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Main

        -
        public ForecastWeatherData.Forecast.Main(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about main weather - elements
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasSeaLevel

        -
        public boolean hasSeaLevel()
        -
      • -
      - - - -
        -
      • -

        hasGroundLevel

        -
        public boolean hasGroundLevel()
        -
      • -
      - - - -
        -
      • -

        hasTempKF

        -
        public boolean hasTempKF()
        -
      • -
      - - - -
        -
      • -

        getSeaLevel

        -
        public float getSeaLevel()
        -
      • -
      - - - -
        -
      • -

        getGroundLevel

        -
        public float getGroundLevel()
        -
      • -
      - - - -
        -
      • -

        getTempKF

        -
        public float getTempKF()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html deleted file mode 100644 index bbdaf93..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Sys.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast.Sys (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast.Sys

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.Forecast
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast.Sys
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - - - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      java.lang.StringgetPod() 
      booleanhasPod() 
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Sys

        -
        public ForecastWeatherData.Forecast.Sys()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Sys

        -
        public ForecastWeatherData.Forecast.Sys(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about sys. For - example, pod, etc.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasPod

        -
        public boolean hasPod()
        -
      • -
      - - - -
        -
      • -

        getPod

        -
        public java.lang.String getPod()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html deleted file mode 100644 index 5bd5add..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Weather.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast.Weather (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast.Weather

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.Forecast
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast.Weather
    -extends AbstractWeatherData.Weather
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Weather

        -
        public ForecastWeatherData.Forecast.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

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Weather

        -
        public ForecastWeatherData.Forecast.Weather(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about weather code, - name, etc.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html deleted file mode 100644 index 7a4c5bd..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.Wind.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast.Wind (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast.Wind

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData.Forecast
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast.Wind
    -extends AbstractWeatherData.Wind
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Wind

        -
        public ForecastWeatherData.Forecast.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

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast.Wind

        -
        public ForecastWeatherData.Forecast.Wind(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about wind
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html deleted file mode 100644 index 9833210..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.Forecast.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - -ForecastWeatherData.Forecast (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData.Forecast

-
-
- -
-
    -
  • -
    -
    Enclosing class:
    -
    ForecastWeatherData
    -
    -
    -
    -
    public static class ForecastWeatherData.Forecast
    -extends AbstractWeatherData
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData.Forecast

        -
        public ForecastWeatherData.Forecast()
        -
        Non-parameterized constructor -

        -

        - Initializes variables as per following basis:
        - Boolean: false
        - Integral: Minimum value (MIN_VALUE)
        - Floating point: Not a number (NaN)
        - Others: null

        -
      • -
      - - - -
        -
      • -

        ForecastWeatherData.Forecast

        -
        public ForecastWeatherData.Forecast(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about forecasts
        -
      • -
      -
    • -
    - - -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html b/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html deleted file mode 100644 index 1644859..0000000 --- a/javadoc/net/aksingh/java/api/owm/ForecastWeatherData.html +++ /dev/null @@ -1,432 +0,0 @@ - - - - - - -ForecastWeatherData (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class ForecastWeatherData

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.ForecastWeatherData
    • -
    -
  • -
-
-
    -
  • -
    -
    -
    public class ForecastWeatherData
    -extends java.lang.Object
    -
    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
    -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/07
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ForecastWeatherData

        -
        public ForecastWeatherData(org.json.JSONObject jsonObj)
        -
        Parameterized constructor -

        - Initializes variables from values from the given JSON object. -

        -
        Parameters:
        jsonObj - JSON object containing data about clouds
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        hasResponseCode

        -
        public boolean hasResponseCode()
        -
      • -
      - - - -
        -
      • -

        hasResponseTime

        -
        public boolean hasResponseTime()
        -
      • -
      - - - -
        -
      • -

        hasResponseForecastCount

        -
        public boolean hasResponseForecastCount()
        -
      • -
      - - - -
        -
      • -

        getResponseCode

        -
        public java.lang.String getResponseCode()
        -
      • -
      - - - -
        -
      • -

        getResponseTime

        -
        public float getResponseTime()
        -
      • -
      - - - -
        -
      • -

        getResponseForecastCount

        -
        public int getResponseForecastCount()
        -
      • -
      - - - - - - - -
        -
      • -

        hasForecast_List

        -
        public boolean hasForecast_List()
        -
      • -
      - - - -
        -
      • -

        getForecast_List_Count

        -
        public int getForecast_List_Count()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html deleted file mode 100644 index 78861ba..0000000 --- a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_Response.html +++ /dev/null @@ -1,496 +0,0 @@ - - - - - - -OpenWeatherMap.OWM_Response (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class OpenWeatherMap.OWM_Response

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    OpenWeatherMap
    -
    -
    -
    -
    public static class OpenWeatherMap.OWM_Response
    -extends java.lang.Object
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        OpenWeatherMap.OWM_Response

        -
        public OpenWeatherMap.OWM_Response(java.lang.String apiKey)
        -
      • -
      - - - -
        -
      • -

        OpenWeatherMap.OWM_Response

        -
        public OpenWeatherMap.OWM_Response(OpenWeatherMap.OWM_URL unit,
        -                           java.lang.String apiKey)
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        currentWeatherByCityName

        -
        public java.lang.String currentWeatherByCityName(java.lang.String cityName)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCityName

        -
        public java.lang.String currentWeatherByCityName(java.lang.String cityName,
        -                                        java.lang.String countryCode)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCityCode

        -
        public java.lang.String currentWeatherByCityCode(long cityCode)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCoordinates

        -
        public java.lang.String currentWeatherByCoordinates(float latitude,
        -                                           float longitude)
        -                                             throws java.net.MalformedURLException,
        -                                                    java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityName

        -
        public java.lang.String forecastWeatherByCityName(java.lang.String cityName)
        -                                           throws java.net.MalformedURLException,
        -                                                  java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityName

        -
        public java.lang.String forecastWeatherByCityName(java.lang.String cityName,
        -                                         java.lang.String countryCode)
        -                                           throws java.net.MalformedURLException,
        -                                                  java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityCode

        -
        public java.lang.String forecastWeatherByCityCode(long cityCode)
        -                                           throws java.net.MalformedURLException,
        -                                                  java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCoordinates

        -
        public java.lang.String forecastWeatherByCoordinates(float latitude,
        -                                            float longitude)
        -                                              throws java.net.MalformedURLException,
        -                                                     java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityName

        -
        public java.lang.String dailyForecastByCityName(java.lang.String cityName,
        -                                       byte count)
        -                                         throws java.net.MalformedURLException,
        -                                                java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityName

        -
        public java.lang.String dailyForecastByCityName(java.lang.String cityName,
        -                                       java.lang.String countryCode,
        -                                       byte count)
        -                                         throws java.net.MalformedURLException,
        -                                                java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityCode

        -
        public java.lang.String dailyForecastByCityCode(long cityCode,
        -                                       byte count)
        -                                         throws java.net.MalformedURLException,
        -                                                java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCoordinates

        -
        public java.lang.String dailyForecastByCoordinates(float latitude,
        -                                          float longitude,
        -                                          byte count)
        -                                            throws java.net.MalformedURLException,
        -                                                   java.io.IOException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html deleted file mode 100644 index 9d2418b..0000000 --- a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.OWM_URL.html +++ /dev/null @@ -1,510 +0,0 @@ - - - - - - -OpenWeatherMap.OWM_URL (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Enum OpenWeatherMap.OWM_URL

-
-
-
    -
  • java.lang.Object
  • -
  • - -
  • -
-
- -
-
- -
-
-
    -
  • - - - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        values

        -
        public static OpenWeatherMap.OWM_URL[] values()
        -
        Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -
        -for (OpenWeatherMap.OWM_URL c : OpenWeatherMap.OWM_URL.values())
        -    System.out.println(c);
        -
        -
        Returns:
        an array containing the constants of this enum type, in -the order they are declared
        -
      • -
      - - - -
        -
      • -

        valueOf

        -
        public static OpenWeatherMap.OWM_URL valueOf(java.lang.String name)
        -
        Returns the enum constant of this type with the specified name. -The string must match exactly an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.)
        -
        Parameters:
        name - the name of the enum constant to be returned.
        -
        Returns:
        the enum constant with the specified name
        -
        Throws:
        -
        java.lang.IllegalArgumentException - if this enum type has no constant -with the specified name
        -
        java.lang.NullPointerException - if the argument is null
        -
      • -
      - - - -
        -
      • -

        getParameter

        -
        public java.lang.String getParameter()
        -
        Returns the parameter. -

        -
        Returns:
        Parameter
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html b/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html deleted file mode 100644 index adf3f83..0000000 --- a/javadoc/net/aksingh/java/api/owm/OpenWeatherMap.html +++ /dev/null @@ -1,608 +0,0 @@ - - - - - - -OpenWeatherMap (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class OpenWeatherMap

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.OpenWeatherMap
    • -
    -
  • -
-
-
    -
  • -
    -
    -
    public class OpenWeatherMap
    -extends java.lang.Object
    -
    Provides methods to get weather, forecast, and other data from - OpenWeatherMap.org -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/05
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        OpenWeatherMap

        -
        public OpenWeatherMap(java.lang.String apiKey)
        -
      • -
      - - - - -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        currentWeatherByCityName

        -
        public CurrentWeatherData currentWeatherByCityName(java.lang.String cityName)
        -                                            throws java.net.MalformedURLException,
        -                                                   java.io.IOException,
        -                                                   org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCityName

        -
        public CurrentWeatherData currentWeatherByCityName(java.lang.String cityName,
        -                                          java.lang.String countryCode)
        -                                            throws java.net.MalformedURLException,
        -                                                   java.io.IOException,
        -                                                   org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCityCode

        -
        public CurrentWeatherData currentWeatherByCityCode(long cityCode)
        -                                            throws java.net.MalformedURLException,
        -                                                   java.io.IOException,
        -                                                   org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        currentWeatherByCoordinates

        -
        public CurrentWeatherData currentWeatherByCoordinates(float latitude,
        -                                             float longitude)
        -                                               throws java.net.MalformedURLException,
        -                                                      java.io.IOException,
        -                                                      org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        currentWeatherFromResponse

        -
        public CurrentWeatherData currentWeatherFromResponse(java.lang.String jsonResponse)
        -                                              throws java.net.MalformedURLException,
        -                                                     java.io.IOException,
        -                                                     org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityName

        -
        public ForecastWeatherData forecastWeatherByCityName(java.lang.String cityName)
        -                                              throws java.net.MalformedURLException,
        -                                                     java.io.IOException,
        -                                                     org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityName

        -
        public ForecastWeatherData forecastWeatherByCityName(java.lang.String cityName,
        -                                            java.lang.String countryCode)
        -                                              throws java.net.MalformedURLException,
        -                                                     java.io.IOException,
        -                                                     org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCityCode

        -
        public ForecastWeatherData forecastWeatherByCityCode(long cityCode)
        -                                              throws java.net.MalformedURLException,
        -                                                     java.io.IOException,
        -                                                     org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherByCoordinates

        -
        public ForecastWeatherData forecastWeatherByCoordinates(float latitude,
        -                                               float longitude)
        -                                                 throws java.net.MalformedURLException,
        -                                                        java.io.IOException,
        -                                                        org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        forecastWeatherFromResponse

        -
        public ForecastWeatherData forecastWeatherFromResponse(java.lang.String jsonResponse)
        -                                                throws java.net.MalformedURLException,
        -                                                       java.io.IOException,
        -                                                       org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityName

        -
        public DailyForecastData dailyForecastByCityName(java.lang.String cityName,
        -                                        byte count)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException,
        -                                                 org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityName

        -
        public DailyForecastData dailyForecastByCityName(java.lang.String cityName,
        -                                        java.lang.String countryCode,
        -                                        byte count)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException,
        -                                                 org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCityCode

        -
        public DailyForecastData dailyForecastByCityCode(long cityCode,
        -                                        byte count)
        -                                          throws java.net.MalformedURLException,
        -                                                 java.io.IOException,
        -                                                 org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        dailyForecastByCoordinates

        -
        public DailyForecastData dailyForecastByCoordinates(float latitude,
        -                                           float longitude,
        -                                           byte count)
        -                                             throws java.net.MalformedURLException,
        -                                                    java.io.IOException,
        -                                                    org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      - - - -
        -
      • -

        dailyForecastFromResponse

        -
        public DailyForecastData dailyForecastFromResponse(java.lang.String jsonResponse)
        -                                            throws java.net.MalformedURLException,
        -                                                   java.io.IOException,
        -                                                   org.json.JSONException
        -
        Throws:
        -
        java.net.MalformedURLException
        -
        java.io.IOException
        -
        org.json.JSONException
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html b/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html deleted file mode 100644 index 01f980a..0000000 --- a/javadoc/net/aksingh/java/api/owm/Tools.Convertor.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - -Tools.Convertor (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class Tools.Convertor

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.Tools.Convertor
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    Tools
    -
    -
    -
    -
    public static class Tools.Convertor
    -extends java.lang.Object
    -
    Provides methods to do conversions. For example, converting degree to - direction, etc. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013/08/05
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - -
      Constructors 
      Constructor and Description
      Tools.Convertor() 
      -
    • -
    - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      java.lang.StringconvertDegree2Direction(float degree) -
      Converts degree to direction.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Tools.Convertor

        -
        public Tools.Convertor()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        convertDegree2Direction

        -
        public java.lang.String convertDegree2Direction(float degree)
        -                                         throws java.lang.IllegalArgumentException
        -
        Converts degree to direction. -

        -
        Parameters:
        degree -

        -
        Returns:
        Direction -

        -
        Throws:
        -
        java.lang.IllegalArgumentException - Degree should be between 0 and 360.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html b/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html deleted file mode 100644 index 1fa8ec7..0000000 --- a/javadoc/net/aksingh/java/api/owm/Tools.Downloader.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -Tools.Downloader (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class Tools.Downloader

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.Tools.Downloader
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    Tools
    -
    -
    -
    -
    public static class Tools.Downloader
    -extends java.lang.Object
    -
    Provides methods to download data or files from the Internet. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2013-07-24
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - -
      Constructors 
      Constructor and Description
      Tools.Downloader() 
      -
    • -
    - -
      -
    • - - -

      Method Summary

      - - - - - - - - - - -
      Methods 
      Modifier and TypeMethod and Description
      static java.lang.StringdownloadPage(java.lang.String pageAddress) -
      Downloads a page/content from the Internet.
      -
      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Tools.Downloader

        -
        public Tools.Downloader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        downloadPage

        -
        public static java.lang.String downloadPage(java.lang.String pageAddress)
        -                                     throws java.net.MalformedURLException,
        -                                            java.io.IOException
        -
        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 MalformedURLException. -

        -
        Parameters:
        pageAddress - Address of the web page to get from the Internet. -

        -
        Returns:
        Content of the web page -

        -
        Throws:
        -
        java.net.MalformedURLException - Address of the web page is not correct. -

        -
        java.io.IOException - Error while loading the page from the - Internet or connection got - disconnected.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/javadoc/net/aksingh/java/api/owm/Tools.html b/javadoc/net/aksingh/java/api/owm/Tools.html deleted file mode 100644 index 4c50e57..0000000 --- a/javadoc/net/aksingh/java/api/owm/Tools.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - -Tools (OWM JAPIs Docs) - - - - - - - - - - - -
-
net.aksingh.java.api.owm
-

Class Tools

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • net.aksingh.java.api.owm.Tools
    • -
    -
  • -
-
-
    -
  • -
    -
    -
    public class Tools
    -extends java.lang.Object
    -
    Provides various tools, which help doing tasks in this application. For - example, tool for downloading content from the Internet, tool for correcting, - 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. -

    -
    Since:
    -
    2.5.0.1
    -
    Version:
    -
    2014-07-01
    -
    Author:
    -
    Ashutosh Kumar Singh
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Nested Class Summary

      - - - - - - - - - - - - - - -
      Nested Classes 
      Modifier and TypeClass and Description
      static class Tools.Convertor -
      Provides methods to do conversions.
      -
      static class Tools.Downloader -
      Provides methods to download data or files from the Internet.
      -
      -
    • -
    - -
      -
    • - - -

      Constructor Summary

      - - - - - - - - -
      Constructors 
      Constructor and Description
      Tools() 
      -
    • -
    - -
      -
    • - - -

      Method Summary

      -
        -
      • - - -

        Methods inherited from class java.lang.Object

        -clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • -
      -
    • -
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Tools

        -
        public 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 deleted file mode 100644 index 94352bd..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Clouds.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Clouds (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index d6d1d45..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Coord.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Coord (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 9afef65..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Main.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Main (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 57f0da7..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Weather.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Weather (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index e788f0b..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.Wind.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData.Wind (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 6a423c5..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/AbstractWeatherData.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.AbstractWeatherData (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index aa17b0f..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Clouds.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Clouds (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index e65f94c..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Coord.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Coord (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index db5122e..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Main.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Main (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 5df63db..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Rain.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Rain (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index b26ee54..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Sys.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Sys (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 14b39c8..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Weather.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Weather (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 491d432..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.Wind.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData.Wind (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index fa196ea..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/CurrentWeatherData.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.CurrentWeatherData (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 90fa1bd..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.Coord.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData.City.Coord (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 59d3806..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.City.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData.City (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 83019f9..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Temperature.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast.Temperature (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 844c200..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.Weather.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast.Weather (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 692840a..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.Forecast.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData.Forecast (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index b2e3679..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/DailyForecastData.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.DailyForecastData (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 82c069f..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.Coord.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.City.Coord (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 592ac55..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.City.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.City (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 000037b..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Clouds.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Clouds (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 68b8ac3..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Main.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Main (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 9c2bf10..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Sys.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Sys (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 3ec428d..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Weather.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Weather (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 3d87eac..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.Wind.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast.Wind (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 8c00420..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.Forecast.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData.Forecast (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 59400b5..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/ForecastWeatherData.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.ForecastWeatherData (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 788dba2..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_Response.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.OpenWeatherMap.OWM_Response (OWM JAPIs Docs) - - - - - - - - - - -
-

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

-
-
No usage of 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 deleted file mode 100644 index 0a36a81..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.OWM_URL.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.OpenWeatherMap.OWM_URL (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index d285284..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/OpenWeatherMap.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.OpenWeatherMap (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 0c2bb02..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/Tools.Convertor.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.Tools.Convertor (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 3bad453..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/Tools.Downloader.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.Tools.Downloader (OWM JAPIs Docs) - - - - - - - - - - -
-

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 b/javadoc/net/aksingh/java/api/owm/class-use/Tools.html deleted file mode 100644 index 8b7938e..0000000 --- a/javadoc/net/aksingh/java/api/owm/class-use/Tools.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -Uses of Class net.aksingh.java.api.owm.Tools (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index c9ede0f..0000000 --- a/javadoc/net/aksingh/java/api/owm/package-frame.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -net.aksingh.java.api.owm (OWM JAPIs Docs) - - - - -

net.aksingh.java.api.owm

- - - diff --git a/javadoc/net/aksingh/java/api/owm/package-summary.html b/javadoc/net/aksingh/java/api/owm/package-summary.html deleted file mode 100644 index abbbbdc..0000000 --- a/javadoc/net/aksingh/java/api/owm/package-summary.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - -net.aksingh.java.api.owm (OWM JAPIs Docs) - - - - - - - - - - -
-

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 deleted file mode 100644 index 5a2eaf8..0000000 --- a/javadoc/net/aksingh/java/api/owm/package-tree.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -net.aksingh.java.api.owm Class Hierarchy (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

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

-
-
-

Class Hierarchy

- -

Enum Hierarchy

-
    -
  • java.lang.Object -
      -
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) - -
    • -
    -
  • -
-
- -
- - - - - -
- - - - diff --git a/javadoc/net/aksingh/java/api/owm/package-use.html b/javadoc/net/aksingh/java/api/owm/package-use.html deleted file mode 100644 index 91cfe5a..0000000 --- a/javadoc/net/aksingh/java/api/owm/package-use.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - -Uses of Package net.aksingh.java.api.owm (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

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

-
-
- -
- -
- - - - - -
- - - - diff --git a/javadoc/overview-tree.html b/javadoc/overview-tree.html deleted file mode 100644 index a271437..0000000 --- a/javadoc/overview-tree.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -Class Hierarchy (OWM JAPIs Docs) - - - - - - - -
- - - - - -
- - -
-

Hierarchy For All Packages

-Package Hierarchies: - -
-
-

Class Hierarchy

- -

Enum Hierarchy

-
    -
  • java.lang.Object -
      -
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) - -
    • -
    -
  • -
-
- -
- - - - - -
- - - - diff --git a/javadoc/package-list b/javadoc/package-list deleted file mode 100644 index ad480da..0000000 --- a/javadoc/package-list +++ /dev/null @@ -1 +0,0 @@ -net.aksingh.java.api.owm diff --git a/javadoc/resources/background.gif b/javadoc/resources/background.gif deleted file mode 100644 index f471940fde2f39ef8943a6af9569bcf986b1579b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2313 zcmV+k3HJ6!Nk%w1VKM-40OkMy00030|NlK(aXwsfKV5S}VtGJbbVOr%L0@%CZH88Q zl{{NzcR^uxNo<2iYk@pjY)*5FJz8x~bc{)B zfk z+1T6M-s9WdW8dcJ-wO*3@9+W*5AY543-j^$^!EPz_4eHZ2#>)41`h@dc!2OAgN6$a zCS2I?;lqgx6IR4nkpTe;1RN0f=zxMq2O=q`94V5d$&e>Unta)^<;;^G3>e7yp=ZvW z6DIW3xpSvaogXF?_4%`@(V;s}NR^5J!3hrtJV@1QRV&r5S*L!zYE|rss${iFkg&!? zTN5V#)~=bmMorwgZsEp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P zEfL7RGBv|<>f4IccND3wCi*V8`>#a$FPZu&a{V`W`me+Kuf_CJ)%IV%?5ByL^#3Q{ z&uBM5|34IKI>0_Tz{5OngXe#6w*N6;;5PH%9n%56%RaWA{wJ4%515Apdj`a62bp<> zM12OuV+QZ^55ATkViO(UWgg}%9C}kb^r~=BiDyWIXZWM&kb>Q?dd$#W`4KU|2#4qh zz;sZ>ZqS5h#Kdk$&1c9AHmDUdtmHE)CqH0RIAZEE;t(^+RXF+*FlJyk;?6Vn{&MsO zZ0HwY)b4Va!F1#s^N5$-s9(&mPa*Lu4>4SxXm~l|3?PR2jB1J!Q|(4#0i$lFME^-r zA~Q(2O+PHOdcVN((R8zqi>%+yx4PA5u&+jI zZ?)Fm8m-+`n!Bnrx0PvZE7!Q)Z+NTE@K(R!nO40sZF(n~bq_b_9H`UYU#q>pPJ3UC z_UeU>J7qcy%%`ks9)BNcS^GDOn z?oKkjHNoWO1e2?M#vd12e^_AscAnLnc~-CISiYWX`D%{k^H~<37unpMYJYdSv=Om2vbAM@`Qp{{SI=yP zj6WN*eEt0G$9EPX6FU%)-ho>hWTW!yzXBIo73<0umM-=@eG&niY^` zlG(|vuCl_x(X^Fob@=i{8+M5vWf7Bz=#aHGTNA;fZQyfbfueI8Z^639n`(DI%w^-^ zl`=@!u)r~Xf920-xd$Ab+S&PJY%K0H8a_J8uN3^_!K1_NV$*e#*Y*6|)XpiW=9H`*`Xx7W%v@7{XDma1?v0a%(K6rI&1!a YpWXKgmku8Vj|K)Vje`mzEKCg608Q#dYybcN diff --git a/javadoc/stylesheet.css b/javadoc/stylesheet.css deleted file mode 100644 index 0aeaa97..0000000 --- a/javadoc/stylesheet.css +++ /dev/null @@ -1,474 +0,0 @@ -/* 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 deleted file mode 100644 index f51e9de732f267fe45b89017982fd8f347b6bd6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41821 zcmZ_0b8u%-)-{}TY}@SENhiP9wr$%^I<{@wwr$&1$M)Ov%{)^x&r{#6bN*XZcb{9Q z_E~%Fb&s4R2q-iV5F`+gv?G)t(0@EoK%hX3 zq^8A`fx>~wXdfco+cF~*P$U%;owBI-&!-+?_u;0T6JR4zSw13=6C4%LGVddx?;?;T zf4{N1x4E_bJC^?&Ht642Y#mJL|0ml2i-7t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_2q&-6 zd{oRu;;I@amjNQDYR_>br&>?&+_5wqa2TN1$<{1hVL}sOZ@I(E&Hj$l6+1_hw_NC3 zG`?$OV#^XuNg7WiyzY1k9L%rO#9$q5)-M~8({Cr%p#I$Acf2vRCaPD6YI1Uo+xXf0 zVChZq_`Z?0PT6Ma>!}ZKIHGLi^Mq%fG*P=my%EV3Man5hC108zdgg%JwJ$8-Z-|$2 z7XAh@-z0C%Keh!JT{4SSPA4V!Eb9^(wY|!&6V9v?@e+vdP_0qkji`~cGuxnL0@bxd zChyj5RC((??3ruqkuUFIm4I&baW?z`6eo&PA-qB%!hwgqvdh#}%n3hamOEdNHp~SQ zZg@ntUSRW}s#2O=LPuo-(uZ?tV9%H+oVN2#5o_Kzz?A41@U4>_Dm&{2|LKHXy+OB# z=0m;!$iQTVNF6KJS=x7U(4d)$;}WIeU*cOnfxMx7N%FcI&}zd3o|3NGgTF3gUphb( zM~Dtz?E}b29b5Djd*N<`8lFc%E6g)R%DPzS7s(0Ky7l8B`)^ZpBo&0|tRVjz zBg8?rh&R!%qyO7rK^%y!zfD!8)D-1pwRN~u<^B-<-_Cz`jfC{8^9BUrmviv{XMyp% z!~a;!{nz3@?!-T4=>M6e^quHdAY#TB2;bu`zvJ%)3qnGq!Tjxod@l1}X|wzGke5f& zt*A&yLWnesUwUZ28w?R5_P_Sd&JOlA|2Na;J|gJDHrF_!M?$5_gN;I?^aV{HyNJwP=;M^jl0RQIv%2APWbF=XI_tD%}5c~~- z1zm98qukRIyg#1%l68Mb<2?6BzkSX35%K6NU*g~oh*R?4L4O1f z?z8Tf$p6C(hWFzM|8O{b?{WS&y72yR?gu9P!LSAY59aSMh5PpRpYZ?K((}1@0j575UH||9 diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..1f3a3b6 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = 'owm-japis' + diff --git a/src/main/java/net/aksingh/owmjapis/AbstractForecast.java b/src/main/java/net/aksingh/owmjapis/AbstractForecast.java new file mode 100644 index 0000000..d9da4bf --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/AbstractForecast.java @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONObject; + +/** + *

+ * Provides default behaviours and implementations for: + * 1. {@link net.aksingh.owmjapis.HourlyForecast} + * 2. {@link net.aksingh.owmjapis.DailyForecast} + * It defines common methods like has, get and some others. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/27 + * @since 2.5.0.3 + */ +public abstract class AbstractForecast extends AbstractResponse { + /* + JSON Keys + */ + final String JSON_FORECAST_LIST = "list"; + + /* + Instance variables + */ + private final double message; + + private final City city; + private final int forecastCount; + + /* + Constructors + */ + AbstractForecast() { + super(); + + this.message = Double.NaN; + this.forecastCount = 0; + this.city = null; + } + + AbstractForecast(JSONObject jsonObj) { + super(jsonObj); + + final String JSON_MESSAGE = "message"; + final String JSON_CITY = "city"; + final String JSON_FORECAST_COUNT = "cnt"; + + this.message = (jsonObj != null) ? jsonObj.optDouble(JSON_MESSAGE, Double.NaN) : Double.NaN; + + this.city = (jsonObj != null) ? new City(jsonObj.optJSONObject(JSON_CITY)) : null; + + this.forecastCount = (jsonObj != null) ? jsonObj.optInt(JSON_FORECAST_COUNT, 0) : 0; + } + + /** + * @return true if message is available, otherwise false. + */ + public boolean hasMessage() { + return (this.message != Double.NaN); + } + + /** + * @return true if count of forecasts is available, otherwise false. + */ + public boolean hasForecastCount() { + return (this.forecastCount != 0); + } + + /** + * @return true if message is available, otherwise false. + */ + public boolean hasCityInstance() { + return (this.city != null); + } + + /** + * @return Message if available, otherwise Double.NaN. + */ + public double getMessage() { + return this.message; + } + + /** + * @return Count of forecasts if available, otherwise 0. + */ + public int getForecastCount() { + return this.forecastCount; + } + + /** + * @return City's instance if available, otherwise null. + */ + public City getCityInstance() { + return this.city; + } + + /** + *

+ * Provides default behaviours for City + *

+ * + * @author Ashutosh Kumar Singh + */ + public static class City { + private final String JSON_CITY_ID = "id"; + private final String JSON_CITY_NAME = "name"; + private final String JSON_CITY_COUNTRY_CODE = "country"; + private final String JSON_CITY_POPULATION = "population"; + private final String JSON_CITY_COORD = "coord"; + + private final long cityID; + private final String cityName; + private final String countryCode; + private final long population; + + private final Coord coord; + + City() { + this.cityID = Long.MIN_VALUE; + this.cityName = null; + this.countryCode = null; + this.population = Long.MIN_VALUE; + + this.coord = new Coord(); + } + + 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) : null; + } + + 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); + } + + /** + * @return true if Coord instance is available, otherwise false. + */ + public boolean hasCoordInstance() { + return (coord != null); + } + + public long getCityCode() { + return this.cityID; + } + + public String getCityName() { + return this.cityName; + } + + public String getCountryCode() { + return this.countryCode; + } + + public long getCityPopulation() { + return this.population; + } + + /** + * @return Coord instance if available, otherwise null. + */ + public Coord getCoordInstance() { + return this.coord; + } + + + public static class Coord extends AbstractWeather.Coord { + + Coord() { + super(); + } + + Coord(JSONObject jsonObj) { + super(jsonObj); + } + } + } + + /** + *

+ * Parses forecast data (one element in the forecastList) and provides methods to get/access the same 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 2014/12/27 + * @since 2.5.0.3 + */ + public abstract static class Forecast extends AbstractWeather { + Forecast() { + super(); + } + + Forecast(JSONObject jsonObj) { + super(jsonObj); + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/AbstractResponse.java b/src/main/java/net/aksingh/owmjapis/AbstractResponse.java new file mode 100644 index 0000000..efa6e33 --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/AbstractResponse.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONObject; + +/** + *

+ * Provides default behaviours and implementations for the response from OWM.org + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/28 + * @since 2.5.0.3 + */ +abstract class AbstractResponse { + /* + Instance variables + */ + private final int responseCode; + private final String rawResponse; + + /* + Constructors + */ + AbstractResponse() { + this.rawResponse = null; + this.responseCode = Integer.MIN_VALUE; + } + + AbstractResponse(JSONObject jsonObj) { + final String JSON_RESPONSE_CODE = "cod"; + + this.rawResponse = (jsonObj != null) ? jsonObj.toString() : null; + this.responseCode = (jsonObj != null) ? jsonObj.optInt(JSON_RESPONSE_CODE, Integer.MIN_VALUE) : Integer.MIN_VALUE; + } + + /** + * @return true if response is valid (downloaded and parsed correctly), otherwise false. + */ + public boolean isValid() { + return (this.responseCode == 200); + } + + /** + * @return true if response code is available, otherwise false. + */ + public boolean hasResponseCode() { + return (this.responseCode != Integer.MIN_VALUE); + } + + /** + * @return true if raw response is available, otherwise false. + */ + public boolean hasRawResponse() { + return (this.rawResponse != null); + } + + /** + * @return Response code if available, otherwise Integer.MIN_VALUE. + */ + public int getResponseCode() { + return this.responseCode; + } + + /** + * @return Raw response if available, otherwise null. + */ + public String getRawResponse() { + return this.rawResponse; + } +} diff --git a/src/main/java/net/aksingh/owmjapis/AbstractWeather.java b/src/main/java/net/aksingh/owmjapis/AbstractWeather.java new file mode 100644 index 0000000..f428867 --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/AbstractWeather.java @@ -0,0 +1,527 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + *

+ * Provides default behaviours and implementations for: + * 1. {@link net.aksingh.owmjapis.CurrentWeather} + * It defines common methods like has, get and some others. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/21 + * @since 2.5.0.1 + */ +public abstract class AbstractWeather extends AbstractResponse { + /* + JSON Keys + */ + final String JSON_CLOUDS = "clouds"; + final String JSON_COORD = "coord"; + final String JSON_MAIN = "main"; + final String JSON_WIND = "wind"; + + /* + Instance variables + */ + private final Date dateTime; + + private final int weatherCount; + private final List weatherList; + + /* + Constructors + */ + AbstractWeather() { + super(); + + this.weatherCount = 0; + this.weatherList = null; + this.dateTime = null; + } + + AbstractWeather(JSONObject jsonObj) { + super(jsonObj); + + final String JSON_WEATHER = "weather"; + final String JSON_DATE_TIME = "dt"; + + long sec = (jsonObj != null) ? jsonObj.optLong(JSON_DATE_TIME, Long.MIN_VALUE) : Long.MIN_VALUE; + if (sec != Long.MIN_VALUE) { // converting seconds to Date object + /* + Bugfix: It always return "Sat Jan 17 04:10:42 CET 1970" + Issue: #3 at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime + Incorrect: this.dateTime = new Date(sec); + Correct: this.dateTime = new Date(sec * 1000); + Reason: Date requires milliseconds but previously, seconds were provided. + */ + this.dateTime = new Date(sec * 1000); + } else { + this.dateTime = null; + } + + JSONArray weatherArray = (jsonObj != null) ? jsonObj.optJSONArray(JSON_WEATHER) : new JSONArray(); + this.weatherList = (weatherArray != null) ? new ArrayList(weatherArray.length()) : Collections.EMPTY_LIST; + if (this.weatherList != Collections.EMPTY_LIST) { + for (int i = 0; i < weatherArray.length(); i++) { + JSONObject weatherObj = weatherArray.optJSONObject(i); + if (weatherObj != null) { + this.weatherList.add(new Weather(weatherObj)); + } + } + } + this.weatherCount = this.weatherList.size(); + } + + /** + * @return true if date/time is available, otherwise false. + */ + public boolean hasDateTime() { + return (this.dateTime != null); + } + + /** + * @return true if Weather instance(s) is available, otherwise false. + */ + public boolean hasWeatherInstance() { + return (weatherCount != 0); + } + + /** + * @return Date and time if available, otherwise null. + */ + public Date getDateTime() { + return this.dateTime; + } + + /** + * @return Count of Weather instance(s) if available, otherwise 0. + */ + public int getWeatherCount() { + return this.weatherCount; + } + + /** + * @param index Index of Weather instance in the list. + * @return Weather instance if available, otherwise null. + */ + public Weather getWeatherInstance(int index) { + return this.weatherList.get(index); + } + + /** + *

+ * Provides default behaviours for Cloud + *

+ * + * @author Ashutosh Kumar Singh + * @version 2013/12/23 + * @since 2.5.0.1 + */ + abstract public static class Clouds { + private final String JSON_CLOUDS_ALL = "all"; + + private final float percentOfClouds; + + Clouds() { + this.percentOfClouds = Float.NaN; + } + + Clouds(JSONObject jsonObj) { + this.percentOfClouds = (float) jsonObj.optDouble(this.JSON_CLOUDS_ALL, Double.NaN); + } + + /** + * Tells if percentage of clouds is available or not. + * + * @return true if data available, otherwise false + */ + public boolean hasPercentageOfClouds() { + return (this.percentOfClouds != Float.NaN); + } + + /** + * @return Percentage of all clouds if available, otherwise Float.NaN. + */ + public float getPercentageOfClouds() { + return this.percentOfClouds; + } + } + + /** + *

+ * Provides default behaviours for Coord, i.e., coordinates. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2013/12/23 + * @since 2.5.0.1 + */ + abstract public static class Coord { + private final String JSON_COORD_LATITUDE = "lat"; + private final String JSON_COORD_LONGITUDE = "lon"; + + private final float lat; + private final float lon; + + Coord() { + this.lat = Float.NaN; + this.lon = Float.NaN; + } + + 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 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 longitude of the city is available or not. + * + * @return true if data available, otherwise false + */ + public boolean hasLongitude() { + return (this.lon != Float.NaN); + } + + /** + * @return Latitude of the city if available, otherwise Float.NaN. + */ + public float getLatitude() { + return this.lat; + } + + /** + * @return Longitude of the city if available, otherwise Float.NaN. + */ + public float getLongitude() { + return this.lon; + } + } + + /** + *

+ * Provides default behaviours for Main, i.e., main weather elements like temperature, humidity, etc. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2013/12/23 + * @since 2.5.0.1 + */ + abstract public static class Main { + + private final String JSON_MAIN_TEMP = "temp"; + private final String JSON_MAIN_TEMP_MIN = "temp_min"; + private final String JSON_MAIN_TEMP_MAX = "temp_max"; + private final String JSON_MAIN_PRESSURE = "pressure"; + private final String JSON_MAIN_HUMIDITY = "humidity"; + + private final float temp; + private final float minTemp; + private final float maxTemp; + private final float pressure; + private final float humidity; + + Main() { + this.temp = Float.NaN; + this.minTemp = Float.NaN; + this.maxTemp = Float.NaN; + this.pressure = Float.NaN; + this.humidity = Float.NaN; + } + + 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 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 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 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 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 humidity of the city is available or not. + * + * @return true if data available, otherwise false + */ + public boolean hasHumidity() { + return (this.humidity != Float.NaN); + } + + /** + * @return Temperature of the city if available, otherwise Float.NaN. + */ + public float getTemperature() { + return this.temp; + } + + /** + * @return Minimum temperature of the city if available, otherwise Float.NaN. + */ + public float getMinTemperature() { + return this.minTemp; + } + + /** + * @return Maximum temperature of the city if available, otherwise Float.NaN. + */ + public float getMaxTemperature() { + return this.maxTemp; + } + + /** + * @return Pressure of the city if available, otherwise Float.NaN. + */ + public float getPressure() { + return this.pressure; + } + + /** + * @return Humidity of the city if available, otherwise Float.NaN. + */ + public float getHumidity() { + return this.humidity; + } + } + + /** + *

+ * Parses weather data and provides methods to get/access the same 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 2014/12/27 + * @since 2.5.0.3 + */ + public static class Weather { + private final String JSON_WEATHER_ID = "id"; + private final String JSON_WEATHER_MAIN = "main"; + private final String JSON_WEATHER_DESCRIPTION = "description"; + private final String JSON_WEATHER_ICON = "icon"; + + private final int id; + private final String name; + private final String description; + private final String icon; + + Weather() { + this.id = Integer.MIN_VALUE; + this.name = null; + this.description = null; + this.icon = null; + } + + 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 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 weather's name is available or not. + * + * @return true if data available, otherwise false. + */ + public boolean hasWeatherName() { + return (this.name != null && (!this.name.equals(""))); + } + + /** + * Tells if weather's description is available or not. + * + * @return true if data available, otherwise false. + */ + public boolean hasWeatherDescription() { + return (this.description != null && (!this.description.equals(""))); + } + + /** + * Tells if name of weather's icon is available or not. + * + * @return true if data available, otherwise false. + */ + public boolean hasWeatherIconName() { + return (this.icon != null && (!this.icon.equals(""))); + } + + /** + * @return Code for weather of the city if available, otherwise Integer.MIN_VALUE. + */ + public int getWeatherCode() { + return this.id; + } + + /** + * @return Name for weather of the city if available, otherwise null. + */ + public String getWeatherName() { + return this.name; + } + + /** + * @return Description for weather of the city if available, otherwise null. + */ + public String getWeatherDescription() { + return this.description; + } + + /** + * @return Name of icon for weather of the city if available, otherwise null. + */ + public String getWeatherIconName() { + return this.icon; + } + } + + /** + *

+ * Provides default behaviours for Wind. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2013/12/23 + * @since 2.5.0.1 + */ + abstract public static class Wind { + private final String JSON_WIND_SPEED = "speed"; + private final String JSON_WIND_DEGREE = "deg"; + + private final float speed; + private final float degree; + + Wind() { + this.speed = Float.NaN; + this.degree = Float.NaN; + } + + 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 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 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)); + } + + /** + * @return Speed of wind in the city if available, otherwise Float.NaN. + */ + public float getWindSpeed() { + return this.speed; + } + + /** + * @return Degree of wind in the city if available, otherwise Float.NaN. + */ + public float getWindDegree() { + return this.degree; + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/CurrentWeather.java b/src/main/java/net/aksingh/owmjapis/CurrentWeather.java new file mode 100644 index 0000000..3a3791a --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/CurrentWeather.java @@ -0,0 +1,537 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONObject; + +import java.util.Date; + +/** + *

+ * Parses current weather data and provides methods to get/access the same 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 2014/12/26 + * @see OWM's Current Weather API + * @since 2.5.0.1 + */ +public class CurrentWeather extends AbstractWeather { + /* + Instance variables + */ + private final String base; + private final long cityId; + private final String cityName; + + private final Clouds clouds; + private final Coord coord; + private final Main main; + private final Rain rain; + private final Sys sys; + private final Wind wind; + + /* + Constructor + */ + CurrentWeather(JSONObject jsonObj) { + super(jsonObj); + + final String JSON_RAIN = "rain"; + final String JSON_SYS = "sys"; + final String JSON_BASE = "base"; + final String JSON_CITY_ID = "id"; + final String JSON_CITY_NAME = "name"; + + this.base = (jsonObj != null) ? jsonObj.optString(JSON_BASE, null) : null; + this.cityId = (jsonObj != null) ? jsonObj.optLong(JSON_CITY_ID, Long.MIN_VALUE) : Long.MIN_VALUE; + this.cityName = (jsonObj != null) ? jsonObj.optString(JSON_CITY_NAME, null) : null; + + JSONObject cloudsObj = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CLOUDS) : null; + this.clouds = (cloudsObj != null) ? new Clouds(cloudsObj) : null; + + JSONObject coordObj = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_COORD) : null; + this.coord = (coordObj != null) ? new Coord(coordObj) : null; + + JSONObject mainObj = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_MAIN) : null; + this.main = (mainObj != null) ? new Main(mainObj) : null; + + JSONObject rainObj = (jsonObj != null) ? jsonObj.optJSONObject(JSON_RAIN) : null; + this.rain = (rainObj != null) ? new Rain(rainObj) : null; + + JSONObject sysObj = (jsonObj != null) ? jsonObj.optJSONObject(JSON_SYS) : null; + this.sys = (sysObj != null) ? new Sys(sysObj) : null; + + JSONObject windObj = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_WIND) : null; + this.wind = (windObj != null) ? new Wind(windObj) : null; + } + + /** + * @return true if base station is available, otherwise false. + */ + public boolean hasBaseStation() { + return (this.base != null && (!this.base.equals(""))); + } + + /** + * @return true if city code is available, otherwise false. + */ + public boolean hasCityCode() { + return (this.cityId != Long.MIN_VALUE); + } + + /** + * @return true if city name is available, otherwise false. + */ + public boolean hasCityName() { + return (this.cityName != null && (!this.cityName.equals(""))); + } + + /** + * @return true if Clouds instance is available, otherwise false. + */ + public boolean hasCloudsInstance() { + return (clouds != null); + } + + /** + * @return true if Coord instance is available, otherwise false. + */ + public boolean hasCoordInstance() { + return (coord != null); + } + + /** + * @return true if Main instance is available, otherwise false. + */ + public boolean hasMainInstance() { + return (main != null); + } + + /** + * @return true if Rain instance is available, otherwise false. + */ + public boolean hasRainInstance() { + return (rain != null); + } + + /** + * @return true if Sys instance is available, otherwise false. + */ + public boolean hasSysInstance() { + return (sys != null); + } + + /** + * @return true if Wind instance is available, otherwise false. + */ + public boolean hasWindInstance() { + return (wind != null); + } + + /** + * @return Base station if available, otherwise null. + */ + public String getBaseStation() { + return this.base; + } + + /** + * @return City code if available, otherwise Long.MIN_VALUE. + */ + public long getCityCode() { + return this.cityId; + } + + /** + * @return City name if available, otherwise null. + */ + public String getCityName() { + return this.cityName; + } + + /** + * @return Clouds instance if available, otherwise null. + */ + public Clouds getCloudsInstance() { + return this.clouds; + } + + /** + * @return Coord instance if available, otherwise null. + */ + public Coord getCoordInstance() { + return this.coord; + } + + /** + * @return Main instance if available, otherwise null. + */ + public Main getMainInstance() { + return this.main; + } + + /** + * @return Rain instance if available, otherwise null. + */ + public Rain getRainInstance() { + return this.rain; + } + + /** + * @return Sys instance if available, otherwise null. + */ + public Sys getSysInstance() { + return this.sys; + } + + /** + * @return Wind instance if available, otherwise null. + */ + public Wind getWindInstance() { + return this.wind; + } + + /** + *

+ * Parses clouds data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Clouds extends AbstractWeather.Clouds { + + Clouds() { + super(); + } + + Clouds(JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + *

+ * Parses coordination data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Coord extends AbstractWeather.Coord { + + Coord() { + super(); + } + + Coord(JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + *

+ * Parses main data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Main extends AbstractWeather.Main { + + Main() { + super(); + } + + Main(JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + *

+ * Parses rain data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Rain { + + private final String JSON_RAIN_1HOUR = "1h"; + + private final float rain1h; + + Rain() { + this.rain1h = Float.NaN; + } + + Rain(JSONObject jsonObj) { + this.rain1h = (float) jsonObj.optDouble(this.JSON_RAIN_1HOUR, Double.NaN); + } + + public boolean hasRain() { + return (this.rain1h != Float.NaN); + } + + public float getRain() { + return this.rain1h; + } + } + + /** + *

+ * Parses sys data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Sys { + + private final String JSON_SYS_TYPE = "type"; + private final String JSON_SYS_ID = "id"; + private final String JSON_SYS_MESSAGE = "message"; + private final String JSON_SYS_COUNTRY_CODE = "country"; + private final String JSON_SYS_SUNRISE = "sunrise"; + private final String JSON_SYS_SUNSET = "sunset"; + + private final int type; + private final int id; + private final double message; + private final String countryCode; + private final Date sunrise; + private final Date sunset; + + Sys() { + this.type = Integer.MIN_VALUE; + this.id = Integer.MIN_VALUE; + this.message = Double.NaN; + this.countryCode = null; + this.sunrise = null; + this.sunset = null; + } + + Sys(JSONObject jsonObj) { + this.type = jsonObj.optInt(this.JSON_SYS_TYPE, Integer.MIN_VALUE); + this.id = jsonObj.optInt(this.JSON_SYS_ID, Integer.MIN_VALUE); + this.message = jsonObj.optDouble(this.JSON_SYS_MESSAGE, Double.NaN); + 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) { + /* + Bugfix: Incorrect date and time + Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime + Incorrect: this.sunrise = new Date(sr_secs); + Correct: this.sunrise = new Date(sr_secs * 1000); + Reason: Date requires milliseconds but previously, seconds were provided. + */ + this.sunrise = new Date(sr_secs * 1000); + } else { + this.sunrise = null; + } + + long ss_secs = jsonObj.optLong(this.JSON_SYS_SUNSET, Long.MIN_VALUE); + if (ss_secs != Long.MIN_VALUE) { + /* + Bugfix: Incorrect date and time + Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime + Incorrect: this.sunrise = new Date(ss_secs); + Correct: this.sunrise = new Date(ss_secs * 1000); + Reason: Date requires milliseconds but previously, seconds were provided. + */ + this.sunset = new Date(ss_secs * 1000); + } else { + this.sunset = null; + } + } + + public boolean hasType() { + return (this.type != Integer.MIN_VALUE); + } + + public boolean hasId() { + return (this.id != Integer.MIN_VALUE); + } + + public boolean hasMessage() { + return (this.message != Double.NaN); + } + + public boolean hasCountryCode() { + return (this.countryCode != null); + } + + public boolean hasSunriseTime() { + return (this.sunrise != null); + } + + public boolean hasSunsetTime() { + return (this.sunset != null); + } + + public int getType() { + return this.type; + } + + public int getId() { + return this.id; + } + + public double getMessage() { + return this.message; + } + + public String getCountryCode() { + return this.countryCode; + } + + public Date getSunriseTime() { + return this.sunrise; + } + + public Date getSunsetTime() { + return this.sunset; + } + } + + /** + *

+ * Parses wind data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Wind extends AbstractWeather.Wind { + + private final String JSON_WIND_GUST = "gust"; + + private final float gust; + + Wind() { + super(); + + this.gust = Float.NaN; + } + + 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; + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/DailyForecast.java b/src/main/java/net/aksingh/owmjapis/DailyForecast.java new file mode 100644 index 0000000..788e873 --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/DailyForecast.java @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + *

+ * Parses daily forecast data and provides methods to get/access the same 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 2014/12/27 + * @see OWM's Weather Forecast API + * @since 2.5.0.3 + */ +public class DailyForecast extends AbstractForecast { + /* + Instance variables + */ + private final List forecastList; + + /* + Constructors + */ + DailyForecast(JSONObject jsonObj) { + super(jsonObj); + + JSONArray dataArray = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_FORECAST_LIST) : new JSONArray(); + this.forecastList = (dataArray != null) ? new ArrayList(dataArray.length()) : Collections.EMPTY_LIST; + if (this.forecastList != Collections.EMPTY_LIST) { + for (int i = 0; i < dataArray.length(); i++) { + JSONObject forecastObj = dataArray.optJSONObject(i); + if (forecastObj != null) { + this.forecastList.add(new Forecast(forecastObj)); + } + } + } + } + + /** + * @param index Index of Forecast instance in the list. + * @return Forecast instance if available, otherwise null. + */ + public Forecast getForecastInstance(int index) { + return this.forecastList.get(index); + } + + /** + *

+ * Parses forecast data (one element in the forecastList) and provides methods to get/access the same 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 + *

+ */ + public static class Forecast extends AbstractForecast.Forecast { + /* + JSON Keys + */ + public final String JSON_TEMP = "temp"; + + private final String JSON_FORECAST_PRESSURE = "pressure"; + private final String JSON_FORECAST_HUMIDITY = "humidity"; + private final String JSON_FORECAST_WIND_SPEED = "speed"; + private final String JSON_FORECAST_WIND_DEGREE = "deg"; + private final String JSON_FORECAST_CLOUDS = "clouds"; + private final String JSON_FORECAST_RAIN = "rain"; + private final String JSON_FORECAST_SNOW = "snow"; + + /* + Instance Variables + */ + private final float pressure; + private final float humidity; + private final float windSpeed; + private final float windDegree; + private final float cloudsPercent; + private final float rain; + private final float snow; + + private final Temperature temp; + + /* + Constructors + */ + Forecast() { + super(); + + this.pressure = Float.NaN; + this.humidity = Float.NaN; + this.windSpeed = Float.NaN; + this.windDegree = Float.NaN; + this.cloudsPercent = Float.NaN; + this.rain = Float.NaN; + this.snow = Float.NaN; + + this.temp = new Temperature(); + } + + 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; + this.rain = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_RAIN, Double.NaN) : Float.NaN; + this.snow = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_SNOW, Double.NaN) : Float.NaN; + } + + 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 boolean hasRain() { + return (this.rain != Float.NaN); + } + + public boolean hasSnow() { + return (this.snow != 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; + } + + public float getRain() { + return this.rain; + } + + public float getSnow() { + return this.snow; + } + + public Temperature getTemperatureInstance() { + return this.temp; + } + + /** + *

+ * Parses temperature data and provides methods to get/access the same 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 + *

+ */ + public static class Temperature { + public final String JSON_TEMP_DAY = "day"; + public final String JSON_TEMP_MIN = "min"; + public final String JSON_TEMP_MAX = "max"; + public final String JSON_TEMP_NIGHT = "night"; + public final String JSON_TEMP_EVENING = "eve"; + public final String JSON_TEMP_MORNING = "morn"; + + private final float dayTemp; + private final float minTemp; + private final float maxTemp; + private final float nightTemp; + private final float eveTemp; + private final float mornTemp; + + 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; + } + + 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; + } + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/HourlyForecast.java b/src/main/java/net/aksingh/owmjapis/HourlyForecast.java new file mode 100644 index 0000000..98915db --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/HourlyForecast.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + *

+ * Parses hourly forecast data and provides methods to get/access the same 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 2014/12/27 + * @see OWM's Weather Forecast API + * @since 2.5.0.3 + */ +public class HourlyForecast extends AbstractForecast { + /* + Instance variables + */ + private final List forecastList; + + /* + Constructor + */ + HourlyForecast(JSONObject jsonObj) { + super(jsonObj); + + JSONArray forecastArr = (jsonObj != null) ? jsonObj.optJSONArray(this.JSON_FORECAST_LIST) : new JSONArray(); + this.forecastList = (forecastArr != null) ? new ArrayList(forecastArr.length()) : Collections.EMPTY_LIST; + if (this.forecastList != Collections.EMPTY_LIST) { + for (int i = 0; i < forecastArr.length(); i++) { + JSONObject forecastObj = forecastArr.optJSONObject(i); + if (forecastObj != null) { + this.forecastList.add(new Forecast(forecastObj)); + } + } + } + } + + /** + * @param index Index of Forecast instance in the list. + * @return Forecast instance if available, otherwise null. + */ + public Forecast getForecastInstance(int index) { + return this.forecastList.get(index); + } + + /** + *

+ * Parses forecast data (one element in the forecastList) and provides methods to get/access the same 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 + *

+ */ + public static class Forecast extends AbstractForecast.Forecast { + /* + JSON Keys + */ + private final String JSON_SYS = "sys"; + private final String JSON_DT_TEXT = "dt_txt"; + + /* + Instance Variables + */ + private final String dateTimeText; + + private final Clouds clouds; + private final Main main; + private final Sys sys; + private final Wind wind; + + /* + Constructor + */ + Forecast(JSONObject jsonObj) { + super(jsonObj); + + this.dateTimeText = (jsonObj != null) ? jsonObj.optString(this.JSON_DT_TEXT, null) : null; + + JSONObject jsonObjClouds = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_CLOUDS) : null; + this.clouds = (jsonObjClouds != null) ? new Clouds(jsonObjClouds) : null; + + JSONObject jsonObjMain = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_MAIN) : null; + this.main = (jsonObjMain != null) ? new Main(jsonObjMain) : null; + + JSONObject jsonObjSys = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_SYS) : null; + this.sys = (jsonObjSys != null) ? new Sys(jsonObjSys) : null; + + JSONObject jsonObjWind = (jsonObj != null) ? jsonObj.optJSONObject(this.JSON_WIND) : null; + this.wind = (jsonObjWind != null) ? new Wind(jsonObjWind) : null; + } + + public boolean hasDateTimeText() { + return (this.dateTimeText != null); + } + + /** + * @return true if Clouds instance is available, otherwise false. + */ + public boolean hasCloudsInstance() { + return (clouds != null); + } + + /** + * @return true if Main instance is available, otherwise false. + */ + public boolean hasMainInstance() { + return (main != null); + } + + /** + * @return true if Sys instance is available, otherwise false. + */ + public boolean hasSysInstance() { + return (sys != null); + } + + /** + * @return true if Wind instance is available, otherwise false. + */ + public boolean hasWindInstance() { + return (wind != null); + } + + public String getDateTimeText() { + return this.dateTimeText; + } + + /** + * @return Clouds instance if available, otherwise null. + */ + public Clouds getCloudsInstance() { + return this.clouds; + } + + /** + * @return Main instance if available, otherwise null. + */ + public Main getMainInstance() { + return this.main; + } + + /** + * @return Sys instance if available, otherwise null. + */ + public Sys getSysInstance() { + return this.sys; + } + + /** + * @return Wind instance if available, otherwise null. + */ + public Wind getWindInstance() { + return this.wind; + } + + /** + *

+ * Parses clouds data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Clouds extends AbstractForecast.Forecast.Clouds { + + Clouds() { + super(); + } + + Clouds(JSONObject jsonObj) { + super(jsonObj); + } + } + + /** + *

+ * Parses main data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Main extends AbstractForecast.Forecast.Main { + private final String JSON_MAIN_SEA_LEVEL = "sea_level"; + private final String JSON_MAIN_GRND_LEVEL = "grnd_level"; + private final String JSON_MAIN_TMP_KF = "temp_kf"; + + private final float seaLevel; + private final float groundLevel; + private final float tempKF; + + Main() { + super(); + + this.seaLevel = Float.NaN; + this.groundLevel = Float.NaN; + this.tempKF = Float.NaN; + } + + 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 sys data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Sys { + private final String JSON_SYS_POD = "pod"; + private final String pod; + + Sys() { + this.pod = null; + } + + Sys(JSONObject jsonObj) { + this.pod = (jsonObj != null) ? jsonObj.optString(this.JSON_SYS_POD, null) : null; + } + + public boolean hasPod() { + return (this.pod != null && (!this.pod.equals(""))); + } + + public String getPod() { + return this.pod; + } + } + + /** + *

+ * Parses wind data and provides methods to get/access the same 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 2014/12/26 + * @since 2.5.0.1 + */ + public static class Wind extends AbstractWeather.Wind { + + Wind() { + super(); + } + + Wind(JSONObject jsonObj) { + super(jsonObj); + } + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/OpenWeatherMap.java b/src/main/java/net/aksingh/owmjapis/OpenWeatherMap.java new file mode 100644 index 0000000..6b2d110 --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/OpenWeatherMap.java @@ -0,0 +1,677 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import java.util.zip.GZIPInputStream; + +/** + *

+ * Lets you access data from OpenWeatherMap.org using its Web APIs. + * Henceforth, it's shortened as OWM.org to ease commenting. + *

+ *

+ * Sample code:
+ * OpenWeatherMap.org owm = new OpenWeatherMap("your-api-key");
+ * OpenWeatherMap.org owm = new OpenWeatherMap(your-units, "your-api-key");
+ * OpenWeatherMap.org owm = new OpenWeatherMap(your-units, your-language, "your-api-key"); + *

+ * + * @author Ashutosh Kumar Singh + * @version 12/19/2014 + * @see OpenWeatherMap.org + * @see OpenWeatherMap.org API + * @since 2.5.0.1 + */ +public class OpenWeatherMap { + /* + URLs and parameters for OWM.org + */ + private static final String URL_API = "http://api.openweathermap.org/data/2.5/"; + private static final String URL_CURRENT = "weather?"; + private static final String URL_HOURLY_FORECAST = "forecast?"; + private static final String URL_DAILY_FORECAST = "forecast/daily?"; + + private static final String PARAM_COUNT = "cnt="; + private static final String PARAM_CITY_NAME = "q="; + private static final String PARAM_CITY_ID = "id="; + private static final String PARAM_LATITUDE = "lat="; + private static final String PARAM_LONGITUDE = "lon="; + private static final String PARAM_MODE = "mode="; + private static final String PARAM_UNITS = "units="; + private static final String PARAM_APPID = "appId="; + private static final String PARAM_LANG = "unit="; + + /* + Instance Variables + */ + private final OWMAddress owmAddress; + private final OWMResponse owmResponse; + + /** + * Constructor + * + * @param apiKey API key from OWM.org + * @see OWM.org API Key + */ + public OpenWeatherMap(String apiKey) { + this(Units.IMPERIAL, Language.ENGLISH, apiKey); + } + + /** + * Constructor + * + * @param units Any constant from Units + * @param apiKey API key from OWM.org + * @see net.aksingh.owmjapis.OpenWeatherMap.Units + * @see OWM.org API Key + */ + public OpenWeatherMap(Units units, String apiKey) { + this(units, Language.ENGLISH, apiKey); + } + + /** + * Constructor + * + * @param units Any constant from Units + * @param lang Any constant from Language + * @param apiKey API key from OWM.org + * @see net.aksingh.owmjapis.OpenWeatherMap.Units + * @see net.aksingh.owmjapis.OpenWeatherMap.Language + * @see OWM.org's Multilingual support + * @see OWM.org's API Key + */ + public OpenWeatherMap(Units units, Language lang, String apiKey) { + this.owmAddress = new OWMAddress(units, lang, apiKey); + this.owmResponse = new OWMResponse(owmAddress); + } + + /* + Getters + */ + public OWMAddress getOwmAddressInstance() { + return owmAddress; + } + + public String getApiKey() { + return owmAddress.getAppId(); + } + + public Units getUnits() { + return owmAddress.getUnits(); + } + + public String getMode() { + return owmAddress.getMode(); + } + + public Language getLang() { + return owmAddress.getLang(); + } + + /* + Setters + */ + + /** + * Set units for getting data from OWM.org + * + * @param units Any constant from Units + * @see net.aksingh.owmjapis.OpenWeatherMap.Units + */ + public void setUnits(Units units) { + owmAddress.setUnits(units); + } + + /** + * Set API key for getting data from OWM.org + * + * @param appId API key from OWM.org + * @see OWM.org's API Key + */ + public void setApiKey(String appId) { + owmAddress.setAppId(appId); + } + + /** + * Set language for getting data from OWM.org + * + * @param lang Any constant from Language + * @see net.aksingh.owmjapis.OpenWeatherMap.Language + * @see OWM.org's Multilingual support + */ + public void setLang(Language lang) { + owmAddress.setLang(lang); + } + + public CurrentWeather currentWeatherByCityName(String cityName) + throws IOException, JSONException { + String response = owmResponse.currentWeatherByCityName(cityName); + return this.currentWeatherFromRawResponse(response); + } + + public CurrentWeather currentWeatherByCityName(String cityName, String countryCode) + throws IOException, JSONException { + String response = owmResponse.currentWeatherByCityName(cityName, countryCode); + return this.currentWeatherFromRawResponse(response); + } + + public CurrentWeather currentWeatherByCityCode(long cityCode) + throws JSONException { + String response = owmResponse.currentWeatherByCityCode(cityCode); + return this.currentWeatherFromRawResponse(response); + } + + public CurrentWeather currentWeatherByCoordinates(float latitude, float longitude) + throws JSONException { + String response = owmResponse.currentWeatherByCoordinates(latitude, longitude); + return this.currentWeatherFromRawResponse(response); + } + + public CurrentWeather currentWeatherFromRawResponse(String response) + throws JSONException { + JSONObject jsonObj = (response != null) ? new JSONObject(response) : null; + return new CurrentWeather(jsonObj); + } + + public HourlyForecast hourlyForecastByCityName(String cityName) + throws IOException, JSONException { + String response = owmResponse.hourlyForecastByCityName(cityName); + return this.hourlyForecastFromRawResponse(response); + } + + public HourlyForecast hourlyForecastByCityName(String cityName, String countryCode) + throws IOException, JSONException { + String response = owmResponse.hourlyForecastByCityName(cityName, countryCode); + return this.hourlyForecastFromRawResponse(response); + } + + public HourlyForecast hourlyForecastByCityCode(long cityCode) + throws JSONException { + String response = owmResponse.hourlyForecastByCityCode(cityCode); + return this.hourlyForecastFromRawResponse(response); + } + + public HourlyForecast hourlyForecastByCoordinates(float latitude, float longitude) + throws JSONException { + String response = owmResponse.hourlyForecastByCoordinates(latitude, longitude); + return this.hourlyForecastFromRawResponse(response); + } + + public HourlyForecast hourlyForecastFromRawResponse(String response) + throws JSONException { + JSONObject jsonObj = (response != null) ? new JSONObject(response) : null; + return new HourlyForecast(jsonObj); + } + + public DailyForecast dailyForecastByCityName(String cityName, byte count) + throws IOException, JSONException { + String response = owmResponse.dailyForecastByCityName(cityName, count); + return this.dailyForecastFromRawResponse(response); + } + + public DailyForecast dailyForecastByCityName(String cityName, String countryCode, byte count) + throws IOException, JSONException { + String response = owmResponse.dailyForecastByCityName(cityName, countryCode, count); + return this.dailyForecastFromRawResponse(response); + } + + public DailyForecast dailyForecastByCityCode(long cityCode, byte count) + throws JSONException { + String response = owmResponse.dailyForecastByCityCode(cityCode, count); + return this.dailyForecastFromRawResponse(response); + } + + public DailyForecast dailyForecastByCoordinates(float latitude, float longitude, byte count) + throws JSONException { + String response = owmResponse.dailyForecastByCoordinates(latitude, longitude, count); + return this.dailyForecastFromRawResponse(response); + } + + public DailyForecast dailyForecastFromRawResponse(String response) + throws JSONException { + JSONObject jsonObj = (response != null) ? new JSONObject(response) : null; + return new DailyForecast(jsonObj); + } + + /** + * Units that can be set for getting data from OWM.org + * + * @since 2.5.0.3 + */ + public static enum Units { + METRIC("metric"), + IMPERIAL("imperial"); + + private final String unit; + + Units(String unit) { + this.unit = unit; + } + } + + /** + * Languages that can be set for getting data from OWM.org + * + * @since 2.5.0.3 + */ + public static enum Language { + ENGLISH("en"), + RUSSIAN("ru"), + ITALIAN("it"), + SPANISH("es"), + UKRAINIAN("uk"), + GERMAN("de"), + PORTUGUESE("pt"), + ROMANIAN("ro"), + POLISH("pl"), + FINNISH("fi"), + DUTCH("nl"), + FRENCH("FR"), + BULGARIAN("bg"), + SWEDISH("sv"), + CHINESE_TRADITIONAL("zh_tw"), + CHINESE_SIMPLIFIED("zh"), + TURKISH("tr"), + CROATIAN("hr"), + CATALAN("ca"); + + private final String lang; + + Language(String lang) { + this.lang = lang; + } + } + + /** + * Generates addresses for accessing the information from OWM.org + * + * @since 2.5.0.3 + */ + public static class OWMAddress { + private final String MODE = "json"; + private final String ENCODING = "UTF-8"; + + private String mode; + private Units units; + private String appId; + private Language lang; + + /* + Constructors + */ + private OWMAddress(String appId) { + this(Units.IMPERIAL, Language.ENGLISH, appId); + } + + private OWMAddress(Units units, String appId) { + this(units, Language.ENGLISH, appId); + } + + private OWMAddress(Units units, Language lang, String appId) { + this.mode = MODE; + this.units = units; + this.lang = lang; + this.appId = appId; + } + + /* + Getters + */ + private String getAppId() { + return this.appId; + } + + private Units getUnits() { + return this.units; + } + + private String getMode() { + return this.mode; + } + + private Language getLang() { + return this.lang; + } + + /* + Setters + */ + private void setUnits(Units units) { + this.units = units; + } + + private void setAppId(String appId) { + this.appId = appId; + } + + private void setLang(Language lang) { + this.lang = lang; + } + + /* + Addresses for current weather + */ + public String currentWeatherByCityName(String cityName) throws UnsupportedEncodingException { + return new StringBuilder() + .append(URL_API).append(URL_CURRENT) + .append(PARAM_CITY_NAME).append(URLEncoder.encode(cityName, ENCODING)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String currentWeatherByCityName(String cityName, String countryCode) throws UnsupportedEncodingException { + return currentWeatherByCityName(new StringBuilder() + .append(cityName).append(",").append(countryCode) + .toString()); + } + + public String currentWeatherByCityCode(long cityCode) { + return new StringBuilder() + .append(URL_API).append(URL_CURRENT) + .append(PARAM_CITY_ID).append(Long.toString(cityCode)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String currentWeatherByCoordinates(float latitude, float longitude) { + return new StringBuilder() + .append(URL_API).append(URL_CURRENT) + .append(PARAM_LATITUDE).append(Float.toString(latitude)).append("&") + .append(PARAM_LONGITUDE).append(Float.toString(longitude)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + /* + Addresses for hourly forecasts + */ + public String hourlyForecastByCityName(String cityName) throws UnsupportedEncodingException { + return new StringBuilder() + .append(URL_API).append(URL_HOURLY_FORECAST) + .append(PARAM_CITY_NAME).append(URLEncoder.encode(cityName, ENCODING)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String hourlyForecastByCityName(String cityName, String countryCode) throws UnsupportedEncodingException { + return hourlyForecastByCityName(new StringBuilder() + .append(cityName).append(",").append(countryCode) + .toString()); + } + + public String hourlyForecastByCityCode(long cityCode) { + return new StringBuilder() + .append(URL_API).append(URL_HOURLY_FORECAST) + .append(PARAM_CITY_ID).append(Long.toString(cityCode)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String hourlyForecastByCoordinates(float latitude, float longitude) { + return new StringBuilder() + .append(URL_API).append(URL_HOURLY_FORECAST) + .append(PARAM_LATITUDE).append(Float.toString(latitude)).append("&") + .append(PARAM_LONGITUDE).append(Float.toString(longitude)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + /* + Addresses for daily forecasts + */ + public String dailyForecastByCityName(String cityName, byte count) throws UnsupportedEncodingException { + return new StringBuilder() + .append(URL_API).append(URL_DAILY_FORECAST) + .append(PARAM_CITY_NAME).append(URLEncoder.encode(cityName, ENCODING)).append("&") + .append(PARAM_COUNT).append(Byte.toString(count)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String dailyForecastByCityName(String cityName, String countryCode, byte count) throws UnsupportedEncodingException { + return dailyForecastByCityName(new StringBuilder() + .append(cityName).append(",").append(countryCode) + .toString(), count); + } + + public String dailyForecastByCityCode(long cityCode, byte count) { + return new StringBuilder() + .append(URL_API).append(URL_DAILY_FORECAST) + .append(PARAM_CITY_ID).append(Long.toString(cityCode)).append("&") + .append(PARAM_COUNT).append(Byte.toString(count)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + + public String dailyForecastByCoordinates(float latitude, float longitude, byte count) { + return new StringBuilder() + .append(URL_API).append(URL_DAILY_FORECAST) + .append(PARAM_LATITUDE).append(Float.toString(latitude)).append("&") + .append(PARAM_LONGITUDE).append(Float.toString(longitude)).append("&") + .append(PARAM_COUNT).append(Byte.toString(count)).append("&") + .append(PARAM_MODE).append(this.mode).append("&") + .append(PARAM_UNITS).append(this.units).append("&") + .append(PARAM_LANG).append(this.lang).append("&") + .append(PARAM_APPID).append(this.appId) + .toString(); + } + } + + /** + * Requests OWM.org for data and provides back the incoming response. + * + * @since 2.5.0.3 + */ + private static class OWMResponse { + private final OWMAddress owmAddress; + + private OWMResponse(OWMAddress owmAddress) { + this.owmAddress = owmAddress; + } + + /* + Responses for current weather + */ + public String currentWeatherByCityName(String cityName) throws UnsupportedEncodingException { + String address = owmAddress.currentWeatherByCityName(cityName); + return httpGET(address); + } + + public String currentWeatherByCityName(String cityName, String countryCode) throws UnsupportedEncodingException { + String address = owmAddress.currentWeatherByCityName(cityName, countryCode); + return httpGET(address); + } + + public String currentWeatherByCityCode(long cityCode) { + String address = owmAddress.currentWeatherByCityCode(cityCode); + return httpGET(address); + } + + public String currentWeatherByCoordinates(float latitude, float longitude) { + String address = owmAddress.currentWeatherByCoordinates(latitude, longitude); + return httpGET(address); + } + + /* + Responses for daily forecasts + */ + public String hourlyForecastByCityName(String cityName) throws UnsupportedEncodingException { + String address = owmAddress.hourlyForecastByCityName(cityName); + return httpGET(address); + } + + public String hourlyForecastByCityName(String cityName, String countryCode) throws UnsupportedEncodingException { + String address = owmAddress.hourlyForecastByCityName(cityName, countryCode); + return httpGET(address); + } + + public String hourlyForecastByCityCode(long cityCode) { + String address = owmAddress.hourlyForecastByCityCode(cityCode); + return httpGET(address); + } + + public String hourlyForecastByCoordinates(float latitude, float longitude) { + String address = owmAddress.hourlyForecastByCoordinates(latitude, longitude); + return httpGET(address); + } + + /* + Responses for daily forecasts + */ + public String dailyForecastByCityName(String cityName, byte count) throws UnsupportedEncodingException { + String address = owmAddress.dailyForecastByCityName(cityName, count); + return httpGET(address); + } + + public String dailyForecastByCityName(String cityName, String countryCode, byte count) throws UnsupportedEncodingException { + String address = owmAddress.dailyForecastByCityName(cityName, countryCode, count); + return httpGET(address); + } + + public String dailyForecastByCityCode(long cityCode, byte count) { + String address = owmAddress.dailyForecastByCityCode(cityCode, count); + return httpGET(address); + } + + public String dailyForecastByCoordinates(float latitude, float longitude, byte count) { + String address = owmAddress.dailyForecastByCoordinates(latitude, longitude, count); + return httpGET(address); + } + + /** + * Implements HTTP's GET method + * + * @param requestAddress Address to be loaded + * @return Response if successful, else null + * @see HTTP - (9.3) GET + */ + private String httpGET(String requestAddress) { + URL request; + HttpURLConnection connection = null; + BufferedReader reader = null; + + String s; + String response = null; + + try { + request = new URL(requestAddress); + connection = (HttpURLConnection) request.openConnection(); + + connection.setRequestMethod("GET"); + connection.setUseCaches(false); + connection.setDoInput(true); + connection.setDoOutput(false); + connection.setRequestProperty("Accept-Encoding", "gzip"); + connection.connect(); + + if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) { + try { + if (connection.getRequestProperty("Accept-Encoding") != null) { + reader = new BufferedReader(new InputStreamReader(new GZIPInputStream(connection.getInputStream()))); + while ((s = reader.readLine()) != null) { + response = s; + } + } else { + reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); + while ((s = reader.readLine()) != null) { + response = s; + } + } + } catch (IOException e) { + System.err.println("Error: " + e.getMessage()); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + System.err.println("Error: " + e.getMessage()); + } + } + } + } else { // if HttpURLConnection is not okay + try { + reader = new BufferedReader(new InputStreamReader(connection.getErrorStream())); + while ((s = reader.readLine()) != null) + response = s; + } catch (IOException e) { + System.err.println("Error: " + e.getMessage()); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + System.err.println("Error: " + e.getMessage()); + } + } + } + + // if response is bad + System.err.println("Bad Response: " + response + "\n"); + return null; + } + } catch (IOException e) { + System.err.println("Error: " + e.getMessage()); + response = null; + } finally { + if (connection != null) { + connection.disconnect(); + } + } + + return response; + } + } +} diff --git a/src/main/java/net/aksingh/owmjapis/Tools.java b/src/main/java/net/aksingh/owmjapis/Tools.java new file mode 100644 index 0000000..9800b2d --- /dev/null +++ b/src/main/java/net/aksingh/owmjapis/Tools.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +/** + *

+ * Provides methods for conversions, etc. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014-12-27 + * @since 2.5.0.1 + */ +public class Tools { + /** + *

+ * Converts degree to direction. + *

+ * + * @param degree Degree of wind as received from OWM.org + * @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; + } +} diff --git a/src/main/java/org/json/CDL.java b/src/main/java/org/json/CDL.java new file mode 100644 index 0000000..e10d2cc --- /dev/null +++ b/src/main/java/org/json/CDL.java @@ -0,0 +1,290 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +/** + * This provides static methods to convert comma delimited text into a + * JSONArray, and to covert a JSONArray into comma delimited text. Comma + * delimited text is a very popular format for data interchange. It is + * understood by most database, spreadsheet, and organizer programs. + *

+ * Each row of text represents a row in a table or a data record. Each row + * ends with a NEWLINE character. Each row contains one or more values. + * Values are separated by commas. A value can contain any character except + * for comma, unless is is wrapped in single quotes or double quotes. + *

+ * The first row usually contains the names of the columns. + *

+ * A comma delimited list can be converted into a JSONArray of JSONObjects. + * The names for the elements in the JSONObjects can be taken from the names + * in the first row. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class CDL { + + /** + * Get the next value. The value can be wrapped in quotes. The value can + * be empty. + * + * @param x A JSONTokener of the source text. + * @return The value string, or null if empty. + * @throws JSONException if the quoted string is badly formed. + */ + private static String getValue(JSONTokener x) throws JSONException { + char c; + char q; + StringBuffer sb; + do { + c = x.next(); + } while (c == ' ' || c == '\t'); + switch (c) { + case 0: + return null; + case '"': + case '\'': + q = c; + sb = new StringBuffer(); + for (; ; ) { + c = x.next(); + if (c == q) { + break; + } + if (c == 0 || c == '\n' || c == '\r') { + throw x.syntaxError("Missing close quote '" + q + "'."); + } + sb.append(c); + } + return sb.toString(); + case ',': + x.back(); + return ""; + default: + x.back(); + return x.nextTo(','); + } + } + + /** + * Produce a JSONArray of strings from a row of comma delimited values. + * + * @param x A JSONTokener of the source text. + * @return A JSONArray of strings. + * @throws JSONException + */ + public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException { + JSONArray ja = new JSONArray(); + for (; ; ) { + String value = getValue(x); + char c = x.next(); + if (value == null || + (ja.length() == 0 && value.length() == 0 && c != ',')) { + return null; + } + ja.put(value); + for (; ; ) { + if (c == ',') { + break; + } + if (c != ' ') { + if (c == '\n' || c == '\r' || c == 0) { + return ja; + } + throw x.syntaxError("Bad character '" + c + "' (" + + (int) c + ")."); + } + c = x.next(); + } + } + } + + /** + * Produce a JSONObject from a row of comma delimited text, using a + * parallel JSONArray of strings to provides the names of the elements. + * + * @param names A JSONArray of names. This is commonly obtained from the + * first row of a comma delimited text file using the rowToJSONArray + * method. + * @param x A JSONTokener of the source text. + * @return A JSONObject combining the names and values. + * @throws JSONException + */ + public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x) + throws JSONException { + JSONArray ja = rowToJSONArray(x); + return ja != null ? ja.toJSONObject(names) : null; + } + + /** + * Produce a comma delimited text row from a JSONArray. Values containing + * the comma character will be quoted. Troublesome characters may be + * removed. + * + * @param ja A JSONArray of strings. + * @return A string ending in NEWLINE. + */ + public static String rowToString(JSONArray ja) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < ja.length(); i += 1) { + if (i > 0) { + sb.append(','); + } + Object object = ja.opt(i); + if (object != null) { + String string = object.toString(); + if (string.length() > 0 && (string.indexOf(',') >= 0 || + string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 || + string.indexOf(0) >= 0 || string.charAt(0) == '"')) { + sb.append('"'); + int length = string.length(); + for (int j = 0; j < length; j += 1) { + char c = string.charAt(j); + if (c >= ' ' && c != '"') { + sb.append(c); + } + } + sb.append('"'); + } else { + sb.append(string); + } + } + } + sb.append('\n'); + return sb.toString(); + } + + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string, + * using the first row as a source of names. + * + * @param string The comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(String string) throws JSONException { + return toJSONArray(new JSONTokener(string)); + } + + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string, + * using the first row as a source of names. + * + * @param x The JSONTokener containing the comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONTokener x) throws JSONException { + return toJSONArray(rowToJSONArray(x), x); + } + + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string + * using a supplied JSONArray as the source of element names. + * + * @param names A JSONArray of strings. + * @param string The comma delimited text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONArray names, String string) + throws JSONException { + return toJSONArray(names, new JSONTokener(string)); + } + + /** + * Produce a JSONArray of JSONObjects from a comma delimited text string + * using a supplied JSONArray as the source of element names. + * + * @param names A JSONArray of strings. + * @param x A JSONTokener of the source text. + * @return A JSONArray of JSONObjects. + * @throws JSONException + */ + public static JSONArray toJSONArray(JSONArray names, JSONTokener x) + throws JSONException { + if (names == null || names.length() == 0) { + return null; + } + JSONArray ja = new JSONArray(); + for (; ; ) { + JSONObject jo = rowToJSONObject(names, x); + if (jo == null) { + break; + } + ja.put(jo); + } + if (ja.length() == 0) { + return null; + } + return ja; + } + + + /** + * Produce a comma delimited text from a JSONArray of JSONObjects. The + * first row will be a list of names obtained by inspecting the first + * JSONObject. + * + * @param ja A JSONArray of JSONObjects. + * @return A comma delimited text. + * @throws JSONException + */ + public static String toString(JSONArray ja) throws JSONException { + JSONObject jo = ja.optJSONObject(0); + if (jo != null) { + JSONArray names = jo.names(); + if (names != null) { + return rowToString(names) + toString(names, ja); + } + } + return null; + } + + /** + * Produce a comma delimited text from a JSONArray of JSONObjects using + * a provided list of names. The list of names is not included in the + * output. + * + * @param names A JSONArray of strings. + * @param ja A JSONArray of JSONObjects. + * @return A comma delimited text. + * @throws JSONException + */ + public static String toString(JSONArray names, JSONArray ja) + throws JSONException { + if (names == null || names.length() == 0) { + return null; + } + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < ja.length(); i += 1) { + JSONObject jo = ja.optJSONObject(i); + if (jo != null) { + sb.append(rowToString(jo.toJSONArray(names))); + } + } + return sb.toString(); + } +} diff --git a/src/main/java/org/json/Cookie.java b/src/main/java/org/json/Cookie.java new file mode 100644 index 0000000..e12261e --- /dev/null +++ b/src/main/java/org/json/Cookie.java @@ -0,0 +1,174 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +/** + * Convert a web browser cookie specification to a JSONObject and back. + * JSON and Cookies are both notations for name/value pairs. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class Cookie { + + /** + * Produce a copy of a string in which the characters '+', '%', '=', ';' + * and control characters are replaced with "%hh". This is a gentle form + * of URL encoding, attempting to cause as little distortion to the + * string as possible. The characters '=' and ';' are meta characters in + * cookies. By convention, they are escaped using the URL-encoding. This is + * only a convention, not a standard. Often, cookies are expected to have + * encoded values. We encode '=' and ';' because we must. We encode '%' and + * '+' because they are meta characters in URL encoding. + * + * @param string The source string. + * @return The escaped result. + */ + public static String escape(String string) { + char c; + String s = string.trim(); + int length = s.length(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; i += 1) { + c = s.charAt(i); + if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') { + sb.append('%'); + sb.append(Character.forDigit((char) ((c >>> 4) & 0x0f), 16)); + sb.append(Character.forDigit((char) (c & 0x0f), 16)); + } else { + sb.append(c); + } + } + return sb.toString(); + } + + + /** + * Convert a cookie specification string into a JSONObject. The string + * will contain a name value pair separated by '='. The name and the value + * will be unescaped, possibly converting '+' and '%' sequences. The + * cookie properties may follow, separated by ';', also represented as + * name=value (except the secure property, which does not have a value). + * The name will be stored under the key "name", and the value will be + * stored under the key "value". This method does not do checking or + * validation of the parameters. It only converts the cookie string into + * a JSONObject. + * + * @param string The cookie specification string. + * @return A JSONObject containing "name", "value", and possibly other + * members. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException { + String name; + JSONObject jo = new JSONObject(); + Object value; + JSONTokener x = new JSONTokener(string); + jo.put("name", x.nextTo('=')); + x.next('='); + jo.put("value", x.nextTo(';')); + x.next(); + while (x.more()) { + name = unescape(x.nextTo("=;")); + if (x.next() != '=') { + if (name.equals("secure")) { + value = Boolean.TRUE; + } else { + throw x.syntaxError("Missing '=' in cookie parameter."); + } + } else { + value = unescape(x.nextTo(';')); + x.next(); + } + jo.put(name, value); + } + return jo; + } + + + /** + * Convert a JSONObject into a cookie specification string. The JSONObject + * must contain "name" and "value" members. + * If the JSONObject contains "expires", "domain", "path", or "secure" + * members, they will be appended to the cookie specification string. + * All other members are ignored. + * + * @param jo A JSONObject + * @return A cookie specification string + * @throws JSONException + */ + public static String toString(JSONObject jo) throws JSONException { + StringBuilder sb = new StringBuilder(); + + sb.append(escape(jo.getString("name"))); + sb.append("="); + sb.append(escape(jo.getString("value"))); + if (jo.has("expires")) { + sb.append(";expires="); + sb.append(jo.getString("expires")); + } + if (jo.has("domain")) { + sb.append(";domain="); + sb.append(escape(jo.getString("domain"))); + } + if (jo.has("path")) { + sb.append(";path="); + sb.append(escape(jo.getString("path"))); + } + if (jo.optBoolean("secure")) { + sb.append(";secure"); + } + return sb.toString(); + } + + /** + * Convert %hh sequences to single characters, and + * convert plus to space. + * + * @param string A string that may contain + * + (plus) and + * %hh sequences. + * @return The unescaped string. + */ + public static String unescape(String string) { + int length = string.length(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; ++i) { + char c = string.charAt(i); + if (c == '+') { + c = ' '; + } else if (c == '%' && i + 2 < length) { + int d = JSONTokener.dehexchar(string.charAt(i + 1)); + int e = JSONTokener.dehexchar(string.charAt(i + 2)); + if (d >= 0 && e >= 0) { + c = (char) (d * 16 + e); + i += 2; + } + } + sb.append(c); + } + return sb.toString(); + } +} diff --git a/src/main/java/org/json/CookieList.java b/src/main/java/org/json/CookieList.java new file mode 100644 index 0000000..3f05fd0 --- /dev/null +++ b/src/main/java/org/json/CookieList.java @@ -0,0 +1,92 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +import java.util.Iterator; + +/** + * Convert a web browser cookie list string to a JSONObject and back. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class CookieList { + + /** + * Convert a cookie list into a JSONObject. A cookie list is a sequence + * of name/value pairs. The names are separated from the values by '='. + * The pairs are separated by ';'. The names and the values + * will be unescaped, possibly converting '+' and '%' sequences. + *

+ * To add a cookie to a cooklist, + * cookielistJSONObject.put(cookieJSONObject.getString("name"), + * cookieJSONObject.getString("value")); + * + * @param string A cookie list string + * @return A JSONObject + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException { + JSONObject jo = new JSONObject(); + JSONTokener x = new JSONTokener(string); + while (x.more()) { + String name = Cookie.unescape(x.nextTo('=')); + x.next('='); + jo.put(name, Cookie.unescape(x.nextTo(';'))); + x.next(); + } + return jo; + } + + /** + * Convert a JSONObject into a cookie list. A cookie list is a sequence + * of name/value pairs. The names are separated from the values by '='. + * The pairs are separated by ';'. The characters '%', '+', '=', and ';' + * in the names and values are replaced by "%hh". + * + * @param jo A JSONObject + * @return A cookie list string + * @throws JSONException + */ + public static String toString(JSONObject jo) throws JSONException { + boolean b = false; + Iterator keys = jo.keys(); + String string; + StringBuilder sb = new StringBuilder(); + while (keys.hasNext()) { + string = keys.next(); + if (!jo.isNull(string)) { + if (b) { + sb.append(';'); + } + sb.append(Cookie.escape(string)); + sb.append("="); + sb.append(Cookie.escape(jo.getString(string))); + b = true; + } + } + return sb.toString(); + } +} diff --git a/src/main/java/org/json/HTTP.java b/src/main/java/org/json/HTTP.java new file mode 100644 index 0000000..da7809d --- /dev/null +++ b/src/main/java/org/json/HTTP.java @@ -0,0 +1,168 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +import java.util.Iterator; + +/** + * Convert an HTTP header to a JSONObject and back. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class HTTP { + + /** + * Carriage return/line feed. + */ + public static final String CRLF = "\r\n"; + + /** + * Convert an HTTP header string into a JSONObject. It can be a request + * header or a response header. A request header will contain + *

{
+     *    Method: "POST" (for example),
+     *    "Request-URI": "/" (for example),
+     *    "HTTP-Version": "HTTP/1.1" (for example)
+     * }
+ * A response header will contain + *
{
+     *    "HTTP-Version": "HTTP/1.1" (for example),
+     *    "Status-Code": "200" (for example),
+     *    "Reason-Phrase": "OK" (for example)
+     * }
+ * In addition, the other parameters in the header will be captured, using + * the HTTP field names as JSON names, so that
+     *    Date: Sun, 26 May 2002 18:06:04 GMT
+     *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
+     *    Cache-Control: no-cache
+ * become + *
{...
+     *    Date: "Sun, 26 May 2002 18:06:04 GMT",
+     *    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
+     *    "Cache-Control": "no-cache",
+     * ...}
+ * It does no further checking or conversion. It does not parse dates. + * It does not do '%' transforms on URLs. + * + * @param string An HTTP header string. + * @return A JSONObject containing the elements and attributes + * of the XML string. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException { + JSONObject jo = new JSONObject(); + HTTPTokener x = new HTTPTokener(string); + String token; + + token = x.nextToken(); + if (token.toUpperCase().startsWith("HTTP")) { + +// Response + + jo.put("HTTP-Version", token); + jo.put("Status-Code", x.nextToken()); + jo.put("Reason-Phrase", x.nextTo('\0')); + x.next(); + + } else { + +// Request + + jo.put("Method", token); + jo.put("Request-URI", x.nextToken()); + jo.put("HTTP-Version", x.nextToken()); + } + +// Fields + + while (x.more()) { + String name = x.nextTo(':'); + x.next(':'); + jo.put(name, x.nextTo('\0')); + x.next(); + } + return jo; + } + + + /** + * Convert a JSONObject into an HTTP header. A request header must contain + *
{
+     *    Method: "POST" (for example),
+     *    "Request-URI": "/" (for example),
+     *    "HTTP-Version": "HTTP/1.1" (for example)
+     * }
+ * A response header must contain + *
{
+     *    "HTTP-Version": "HTTP/1.1" (for example),
+     *    "Status-Code": "200" (for example),
+     *    "Reason-Phrase": "OK" (for example)
+     * }
+ * Any other members of the JSONObject will be output as HTTP fields. + * The result will end with two CRLF pairs. + * + * @param jo A JSONObject + * @return An HTTP header string. + * @throws JSONException if the object does not contain enough + * information. + */ + public static String toString(JSONObject jo) throws JSONException { + Iterator keys = jo.keys(); + String string; + StringBuilder sb = new StringBuilder(); + if (jo.has("Status-Code") && jo.has("Reason-Phrase")) { + sb.append(jo.getString("HTTP-Version")); + sb.append(' '); + sb.append(jo.getString("Status-Code")); + sb.append(' '); + sb.append(jo.getString("Reason-Phrase")); + } else if (jo.has("Method") && jo.has("Request-URI")) { + sb.append(jo.getString("Method")); + sb.append(' '); + sb.append('"'); + sb.append(jo.getString("Request-URI")); + sb.append('"'); + sb.append(' '); + sb.append(jo.getString("HTTP-Version")); + } else { + throw new JSONException("Not enough material for an HTTP header."); + } + sb.append(CRLF); + while (keys.hasNext()) { + string = keys.next(); + if (!"HTTP-Version".equals(string) && !"Status-Code".equals(string) && + !"Reason-Phrase".equals(string) && !"Method".equals(string) && + !"Request-URI".equals(string) && !jo.isNull(string)) { + sb.append(string); + sb.append(": "); + sb.append(jo.getString(string)); + sb.append(CRLF); + } + } + sb.append(CRLF); + return sb.toString(); + } +} diff --git a/src/main/java/org/json/HTTPTokener.java b/src/main/java/org/json/HTTPTokener.java new file mode 100644 index 0000000..3817d78 --- /dev/null +++ b/src/main/java/org/json/HTTPTokener.java @@ -0,0 +1,80 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +/** + * The HTTPTokener extends the JSONTokener to provide additional methods + * for the parsing of HTTP headers. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class HTTPTokener extends JSONTokener { + + /** + * Construct an HTTPTokener from a string. + * + * @param string A source string. + */ + public HTTPTokener(String string) { + super(string); + } + + + /** + * Get the next token or string. This is used in parsing HTTP headers. + * + * @return A String. + * @throws JSONException + */ + public String nextToken() throws JSONException { + char c; + char q; + StringBuilder sb = new StringBuilder(); + do { + c = next(); + } while (Character.isWhitespace(c)); + if (c == '"' || c == '\'') { + q = c; + for (; ; ) { + c = next(); + if (c < ' ') { + throw syntaxError("Unterminated string."); + } + if (c == q) { + return sb.toString(); + } + sb.append(c); + } + } + for (; ; ) { + if (c == 0 || Character.isWhitespace(c)) { + return sb.toString(); + } + sb.append(c); + c = next(); + } + } +} diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java new file mode 100644 index 0000000..2a70f99 --- /dev/null +++ b/src/main/java/org/json/JSONArray.java @@ -0,0 +1,899 @@ +package org.json; + +/* + Copyright (c) 2002 JSON.org + + 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. + */ + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; + +/** + * A JSONArray is an ordered sequence of values. Its external text form is a + * string wrapped in square brackets with commas separating the values. The + * internal form is an object having get and opt + * methods for accessing the values by index, and put methods for + * adding or replacing values. The values can be any of these types: + * Boolean, JSONArray, JSONObject, + * Number, String, or the + * JSONObject.NULL object. + *

+ * The constructor can convert a JSON text into a Java object. The + * toString method converts to JSON text. + *

+ * A get method returns a value if one can be found, and throws an + * exception if one cannot be found. An opt method returns a + * default value instead of throwing an exception, and so is useful for + * obtaining optional values. + *

+ * The generic get() and opt() methods return an + * object which you can cast or query for type. There are also typed + * get and opt methods that do type checking and type + * coercion for you. + *

+ * The texts produced by the toString methods strictly conform to + * JSON syntax rules. The constructors are more forgiving in the texts they will + * accept: + *

    + *
  • An extra , (comma) may appear just + * before the closing bracket.
  • + *
  • The null value will be inserted when there is , + *  (comma) elision.
  • + *
  • Strings may be quoted with ' (single + * quote).
  • + *
  • Strings do not need to be quoted at all if they do not begin with a quote + * or single quote, and if they do not contain leading or trailing spaces, and + * if they do not contain any of these characters: + * { } [ ] / \ : , # and if they do not look like numbers and + * if they are not the reserved words true, false, or + * null.
  • + *
+ * + * @author JSON.org + * @version 2014-05-03 + */ +public class JSONArray { + + /** + * The arrayList where the JSONArray's properties are kept. + */ + private final ArrayList myArrayList; + + /** + * Construct an empty JSONArray. + */ + public JSONArray() { + this.myArrayList = new ArrayList(); + } + + /** + * Construct a JSONArray from a JSONTokener. + * + * @param x A JSONTokener + * @throws JSONException If there is a syntax error. + */ + public JSONArray(JSONTokener x) throws JSONException { + this(); + if (x.nextClean() != '[') { + throw x.syntaxError("A JSONArray text must start with '['"); + } + if (x.nextClean() != ']') { + x.back(); + for (; ; ) { + if (x.nextClean() == ',') { + x.back(); + this.myArrayList.add(JSONObject.NULL); + } else { + x.back(); + this.myArrayList.add(x.nextValue()); + } + switch (x.nextClean()) { + case ',': + if (x.nextClean() == ']') { + return; + } + x.back(); + break; + case ']': + return; + default: + throw x.syntaxError("Expected a ',' or ']'"); + } + } + } + } + + /** + * Construct a JSONArray from a source JSON text. + * + * @param source A string that begins with [ (left + * bracket) and ends with ] + *  (right bracket). + * @throws JSONException If there is a syntax error. + */ + public JSONArray(String source) throws JSONException { + this(new JSONTokener(source)); + } + + /** + * Construct a JSONArray from a Collection. + * + * @param collection A Collection. + */ + public JSONArray(Collection collection) { + this.myArrayList = new ArrayList(); + if (collection != null) { + Iterator iter = collection.iterator(); + while (iter.hasNext()) { + this.myArrayList.add(JSONObject.wrap(iter.next())); + } + } + } + + /** + * Construct a JSONArray from an array + * + * @throws JSONException If not an array. + */ + public JSONArray(Object array) throws JSONException { + this(); + if (array.getClass().isArray()) { + int length = Array.getLength(array); + for (int i = 0; i < length; i += 1) { + this.put(JSONObject.wrap(Array.get(array, i))); + } + } else { + throw new JSONException( + "JSONArray initial value should be a string or collection or array."); + } + } + + /** + * Get the object value associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return An object value. + * @throws JSONException If there is no value for the index. + */ + public Object get(int index) throws JSONException { + Object object = this.opt(index); + if (object == null) { + throw new JSONException("JSONArray[" + index + "] not found."); + } + return object; + } + + /** + * Get the boolean value associated with an index. The string values "true" + * and "false" are converted to boolean. + * + * @param index The index must be between 0 and length() - 1. + * @return The truth. + * @throws JSONException If there is no value for the index or if the value is not + * convertible to boolean. + */ + public boolean getBoolean(int index) throws JSONException { + Object object = this.get(index); + if (object.equals(Boolean.FALSE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("false"))) { + return false; + } else if (object.equals(Boolean.TRUE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("true"))) { + return true; + } + throw new JSONException("JSONArray[" + index + "] is not a boolean."); + } + + /** + * Get the double value associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a number. + */ + public double getDouble(int index) throws JSONException { + Object object = this.get(index); + try { + return object instanceof Number ? ((Number) object).doubleValue() + : Double.parseDouble((String) object); + } catch (Exception e) { + throw new JSONException("JSONArray[" + index + "] is not a number."); + } + } + + /** + * Get the int value associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException If the key is not found or if the value is not a number. + */ + public int getInt(int index) throws JSONException { + Object object = this.get(index); + try { + return object instanceof Number ? ((Number) object).intValue() + : Integer.parseInt((String) object); + } catch (Exception e) { + throw new JSONException("JSONArray[" + index + "] is not a number."); + } + } + + /** + * Get the JSONArray associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return A JSONArray value. + * @throws JSONException If there is no value for the index. or if the value is not a + * JSONArray + */ + public JSONArray getJSONArray(int index) throws JSONException { + Object object = this.get(index); + if (object instanceof JSONArray) { + return (JSONArray) object; + } + throw new JSONException("JSONArray[" + index + "] is not a JSONArray."); + } + + /** + * Get the JSONObject associated with an index. + * + * @param index subscript + * @return A JSONObject value. + * @throws JSONException If there is no value for the index or if the value is not a + * JSONObject + */ + public JSONObject getJSONObject(int index) throws JSONException { + Object object = this.get(index); + if (object instanceof JSONObject) { + return (JSONObject) object; + } + throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); + } + + /** + * Get the long value associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + * @throws JSONException If the key is not found or if the value cannot be converted + * to a number. + */ + public long getLong(int index) throws JSONException { + Object object = this.get(index); + try { + return object instanceof Number ? ((Number) object).longValue() + : Long.parseLong((String) object); + } catch (Exception e) { + throw new JSONException("JSONArray[" + index + "] is not a number."); + } + } + + /** + * Get the string associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return A string value. + * @throws JSONException If there is no string value for the index. + */ + public String getString(int index) throws JSONException { + Object object = this.get(index); + if (object instanceof String) { + return (String) object; + } + throw new JSONException("JSONArray[" + index + "] not a string."); + } + + /** + * Determine if the value is null. + * + * @param index The index must be between 0 and length() - 1. + * @return true if the value at the index is null, or if there is no value. + */ + public boolean isNull(int index) { + return JSONObject.NULL.equals(this.opt(index)); + } + + /** + * Make a string from the contents of this JSONArray. The + * separator string is inserted between each element. Warning: + * This method assumes that the data structure is acyclical. + * + * @param separator A string that will be inserted between the elements. + * @return a string. + * @throws JSONException If the array contains an invalid number. + */ + public String join(String separator) throws JSONException { + int len = this.length(); + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i < len; i += 1) { + if (i > 0) { + sb.append(separator); + } + sb.append(JSONObject.valueToString(this.myArrayList.get(i))); + } + return sb.toString(); + } + + /** + * Get the number of elements in the JSONArray, included nulls. + * + * @return The length (or size). + */ + public int length() { + return this.myArrayList.size(); + } + + /** + * Get the optional object value associated with an index. + * + * @param index The index must be between 0 and length() - 1. + * @return An object value, or null if there is no object at that index. + */ + public Object opt(int index) { + return (index < 0 || index >= this.length()) ? null : this.myArrayList + .get(index); + } + + /** + * Get the optional boolean value associated with an index. It returns false + * if there is no value at that index, or if the value is not Boolean.TRUE + * or the String "true". + * + * @param index The index must be between 0 and length() - 1. + * @return The truth. + */ + public boolean optBoolean(int index) { + return this.optBoolean(index, false); + } + + /** + * Get the optional boolean value associated with an index. It returns the + * defaultValue if there is no value at that index or if it is not a Boolean + * or the String "true" or "false" (case insensitive). + * + * @param index The index must be between 0 and length() - 1. + * @param defaultValue A boolean default. + * @return The truth. + */ + public boolean optBoolean(int index, boolean defaultValue) { + try { + return this.getBoolean(index); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get the optional double value associated with an index. NaN is returned + * if there is no value for the index, or if the value is not a number and + * cannot be converted to a number. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + */ + public double optDouble(int index) { + return this.optDouble(index, Double.NaN); + } + + /** + * Get the optional double value associated with an index. The defaultValue + * is returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index subscript + * @param defaultValue The default value. + * @return The value. + */ + public double optDouble(int index, double defaultValue) { + try { + return this.getDouble(index); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get the optional int value associated with an index. Zero is returned if + * there is no value for the index, or if the value is not a number and + * cannot be converted to a number. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + */ + public int optInt(int index) { + return this.optInt(index, 0); + } + + /** + * Get the optional int value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. + * @return The value. + */ + public int optInt(int index, int defaultValue) { + try { + return this.getInt(index); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get the optional JSONArray associated with an index. + * + * @param index subscript + * @return A JSONArray value, or null if the index has no value, or if the + * value is not a JSONArray. + */ + public JSONArray optJSONArray(int index) { + Object o = this.opt(index); + return o instanceof JSONArray ? (JSONArray) o : null; + } + + /** + * Get the optional JSONObject associated with an index. Null is returned if + * the key is not found, or null if the index has no value, or if the value + * is not a JSONObject. + * + * @param index The index must be between 0 and length() - 1. + * @return A JSONObject value. + */ + public JSONObject optJSONObject(int index) { + Object o = this.opt(index); + return o instanceof JSONObject ? (JSONObject) o : null; + } + + /** + * Get the optional long value associated with an index. Zero is returned if + * there is no value for the index, or if the value is not a number and + * cannot be converted to a number. + * + * @param index The index must be between 0 and length() - 1. + * @return The value. + */ + public long optLong(int index) { + return this.optLong(index, 0); + } + + /** + * Get the optional long value associated with an index. The defaultValue is + * returned if there is no value for the index, or if the value is not a + * number and cannot be converted to a number. + * + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. + * @return The value. + */ + public long optLong(int index, long defaultValue) { + try { + return this.getLong(index); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get the optional string value associated with an index. It returns an + * empty string if there is no value at that index. If the value is not a + * string and is not null, then it is coverted to a string. + * + * @param index The index must be between 0 and length() - 1. + * @return A String value. + */ + public String optString(int index) { + return this.optString(index, ""); + } + + /** + * Get the optional string associated with an index. The defaultValue is + * returned if the key is not found. + * + * @param index The index must be between 0 and length() - 1. + * @param defaultValue The default value. + * @return A String value. + */ + public String optString(int index, String defaultValue) { + Object object = this.opt(index); + return JSONObject.NULL.equals(object) ? defaultValue : object + .toString(); + } + + /** + * Append a boolean value. This increases the array's length by one. + * + * @param value A boolean value. + * @return this. + */ + public JSONArray put(boolean value) { + this.put(value ? Boolean.TRUE : Boolean.FALSE); + return this; + } + + /** + * Put a value in the JSONArray, where the value will be a JSONArray which + * is produced from a Collection. + * + * @param value A Collection value. + * @return this. + */ + public JSONArray put(Collection value) { + this.put(new JSONArray(value)); + return this; + } + + /** + * Append a double value. This increases the array's length by one. + * + * @param value A double value. + * @return this. + * @throws JSONException if the value is not finite. + */ + public JSONArray put(double value) throws JSONException { + Double d = new Double(value); + JSONObject.testValidity(d); + this.put(d); + return this; + } + + /** + * Append an int value. This increases the array's length by one. + * + * @param value An int value. + * @return this. + */ + public JSONArray put(int value) { + this.put(new Integer(value)); + return this; + } + + /** + * Append an long value. This increases the array's length by one. + * + * @param value A long value. + * @return this. + */ + public JSONArray put(long value) { + this.put(new Long(value)); + return this; + } + + /** + * Put a value in the JSONArray, where the value will be a JSONObject which + * is produced from a Map. + * + * @param value A Map value. + * @return this. + */ + public JSONArray put(Map value) { + this.put(new JSONObject(value)); + return this; + } + + /** + * Append an object value. This increases the array's length by one. + * + * @param value An object value. The value should be a Boolean, Double, + * Integer, JSONArray, JSONObject, Long, or String, or the + * JSONObject.NULL object. + * @return this. + */ + public JSONArray put(Object value) { + this.myArrayList.add(value); + return this; + } + + /** + * Put or replace a boolean value in the JSONArray. If the index is greater + * than the length of the JSONArray, then null elements will be added as + * necessary to pad it out. + * + * @param index The subscript. + * @param value A boolean value. + * @return this. + * @throws JSONException If the index is negative. + */ + public JSONArray put(int index, boolean value) throws JSONException { + this.put(index, value ? Boolean.TRUE : Boolean.FALSE); + return this; + } + + /** + * Put a value in the JSONArray, where the value will be a JSONArray which + * is produced from a Collection. + * + * @param index The subscript. + * @param value A Collection value. + * @return this. + * @throws JSONException If the index is negative or if the value is not finite. + */ + public JSONArray put(int index, Collection value) throws JSONException { + this.put(index, new JSONArray(value)); + return this; + } + + /** + * Put or replace a double value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad it + * out. + * + * @param index The subscript. + * @param value A double value. + * @return this. + * @throws JSONException If the index is negative or if the value is not finite. + */ + public JSONArray put(int index, double value) throws JSONException { + this.put(index, new Double(value)); + return this; + } + + /** + * Put or replace an int value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad it + * out. + * + * @param index The subscript. + * @param value An int value. + * @return this. + * @throws JSONException If the index is negative. + */ + public JSONArray put(int index, int value) throws JSONException { + this.put(index, new Integer(value)); + return this; + } + + /** + * Put or replace a long value. If the index is greater than the length of + * the JSONArray, then null elements will be added as necessary to pad it + * out. + * + * @param index The subscript. + * @param value A long value. + * @return this. + * @throws JSONException If the index is negative. + */ + public JSONArray put(int index, long value) throws JSONException { + this.put(index, new Long(value)); + return this; + } + + /** + * Put a value in the JSONArray, where the value will be a JSONObject that + * is produced from a Map. + * + * @param index The subscript. + * @param value The Map value. + * @return this. + * @throws JSONException If the index is negative or if the the value is an invalid + * number. + */ + public JSONArray put(int index, Map value) throws JSONException { + this.put(index, new JSONObject(value)); + return this; + } + + /** + * Put or replace an object value in the JSONArray. If the index is greater + * than the length of the JSONArray, then null elements will be added as + * necessary to pad it out. + * + * @param index The subscript. + * @param value The value to put into the array. The value should be a + * Boolean, Double, Integer, JSONArray, JSONObject, Long, or + * String, or the JSONObject.NULL object. + * @return this. + * @throws JSONException If the index is negative or if the the value is an invalid + * number. + */ + public JSONArray put(int index, Object value) throws JSONException { + JSONObject.testValidity(value); + if (index < 0) { + throw new JSONException("JSONArray[" + index + "] not found."); + } + if (index < this.length()) { + this.myArrayList.set(index, value); + } else { + while (index != this.length()) { + this.put(JSONObject.NULL); + } + this.put(value); + } + return this; + } + + /** + * Remove an index and close the hole. + * + * @param index The index of the element to be removed. + * @return The value that was associated with the index, or null if there + * was no value. + */ + public Object remove(int index) { + return index >= 0 && index < this.length() + ? this.myArrayList.remove(index) + : null; + } + + /** + * Determine if two JSONArrays are similar. + * They must contain similar sequences. + * + * @param other The other JSONArray + * @return true if they are equal + */ + public boolean similar(Object other) { + if (!(other instanceof JSONArray)) { + return false; + } + int len = this.length(); + if (len != ((JSONArray) other).length()) { + return false; + } + for (int i = 0; i < len; i += 1) { + Object valueThis = this.get(i); + Object valueOther = ((JSONArray) other).get(i); + if (valueThis instanceof JSONObject) { + if (!((JSONObject) valueThis).similar(valueOther)) { + return false; + } + } else if (valueThis instanceof JSONArray) { + if (!((JSONArray) valueThis).similar(valueOther)) { + return false; + } + } else if (!valueThis.equals(valueOther)) { + return false; + } + } + return true; + } + + /** + * Produce a JSONObject by combining a JSONArray of names with the values of + * this JSONArray. + * + * @param names A JSONArray containing a list of key strings. These will be + * paired with the values. + * @return A JSONObject, or null if there are no names or if this JSONArray + * has no values. + * @throws JSONException If any of the names are null. + */ + public JSONObject toJSONObject(JSONArray names) throws JSONException { + if (names == null || names.length() == 0 || this.length() == 0) { + return null; + } + JSONObject jo = new JSONObject(); + for (int i = 0; i < names.length(); i += 1) { + jo.put(names.getString(i), this.opt(i)); + } + return jo; + } + + /** + * Make a JSON text of this JSONArray. For compactness, no unnecessary + * whitespace is added. If it is not possible to produce a syntactically + * correct JSON text then null will be returned instead. This could occur if + * the array contains an invalid number. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return a printable, displayable, transmittable representation of the + * array. + */ + public String toString() { + try { + return this.toString(0); + } catch (Exception e) { + return null; + } + } + + /** + * Make a prettyprinted JSON text of this JSONArray. Warning: This method + * assumes that the data structure is acyclical. + * + * @param indentFactor The number of spaces to add to each level of indentation. + * @return a printable, displayable, transmittable representation of the + * object, beginning with [ (left + * bracket) and ending with ] + *  (right bracket). + * @throws JSONException + */ + public String toString(int indentFactor) throws JSONException { + StringWriter sw = new StringWriter(); + synchronized (sw.getBuffer()) { + return this.write(sw, indentFactor, 0).toString(); + } + } + + /** + * Write the contents of the JSONArray as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer) throws JSONException { + return this.write(writer, 0, 0); + } + + /** + * Write the contents of the JSONArray as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @param indentFactor The number of spaces to add to each level of indentation. + * @param indent The indention of the top level. + * @return The writer. + * @throws JSONException + */ + Writer write(Writer writer, int indentFactor, int indent) + throws JSONException { + try { + boolean commanate = false; + int length = this.length(); + writer.write('['); + + if (length == 1) { + JSONObject.writeValue(writer, this.myArrayList.get(0), + indentFactor, indent); + } else if (length != 0) { + final int newindent = indent + indentFactor; + + for (int i = 0; i < length; i += 1) { + if (commanate) { + writer.write(','); + } + if (indentFactor > 0) { + writer.write('\n'); + } + JSONObject.indent(writer, newindent); + JSONObject.writeValue(writer, this.myArrayList.get(i), + indentFactor, newindent); + commanate = true; + } + if (indentFactor > 0) { + writer.write('\n'); + } + JSONObject.indent(writer, indent); + } + writer.write(']'); + return writer; + } catch (IOException e) { + throw new JSONException(e); + } + } +} diff --git a/src/main/java/org/json/JSONException.java b/src/main/java/org/json/JSONException.java new file mode 100644 index 0000000..c5f51b1 --- /dev/null +++ b/src/main/java/org/json/JSONException.java @@ -0,0 +1,43 @@ +package org.json; + +/** + * The JSONException is thrown by the JSON.org classes when things are amiss. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class JSONException extends RuntimeException { + private static final long serialVersionUID = 0; + private Throwable cause; + + /** + * Constructs a JSONException with an explanatory message. + * + * @param message Detail about the reason for the exception. + */ + public JSONException(String message) { + super(message); + } + + /** + * Constructs a new JSONException with the specified cause. + * + * @param cause The cause. + */ + public JSONException(Throwable cause) { + super(cause.getMessage()); + this.cause = cause; + } + + /** + * Returns the cause of this exception or null if the cause is nonexistent + * or unknown. + * + * @return the cause of this exception or null if the cause is nonexistent + * or unknown. + */ + @Override + public Throwable getCause() { + return this.cause; + } +} diff --git a/src/main/java/org/json/JSONML.java b/src/main/java/org/json/JSONML.java new file mode 100644 index 0000000..b650e80 --- /dev/null +++ b/src/main/java/org/json/JSONML.java @@ -0,0 +1,474 @@ +package org.json; + +/* +Copyright (c) 2008 JSON.org + +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. +*/ + +import java.util.Iterator; + + +/** + * This provides static methods to convert an XML text into a JSONArray or + * JSONObject, and to covert a JSONArray or JSONObject into an XML text using + * the JsonML transform. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class JSONML { + + /** + * Parse XML values and store them in a JSONArray. + * + * @param x The XMLTokener containing the source string. + * @param arrayForm true if array form, false if object form. + * @param ja The JSONArray that is containing the current tag or null + * if we are at the outermost level. + * @return A JSONArray if the value is the outermost tag, otherwise null. + * @throws JSONException + */ + private static Object parse( + XMLTokener x, + boolean arrayForm, + JSONArray ja + ) throws JSONException { + String attribute; + char c; + String closeTag = null; + int i; + JSONArray newja = null; + JSONObject newjo = null; + Object token; + String tagName = null; + +// Test for and skip past these forms: +// +// +// +// + + while (true) { + if (!x.more()) { + throw x.syntaxError("Bad XML"); + } + token = x.nextContent(); + if (token == XML.LT) { + token = x.nextToken(); + if (token instanceof Character) { + if (token == XML.SLASH) { + +// Close tag "); + } else { + x.back(); + } + } else if (c == '[') { + token = x.nextToken(); + if (token.equals("CDATA") && x.next() == '[') { + if (ja != null) { + ja.put(x.nextCDATA()); + } + } else { + throw x.syntaxError("Expected 'CDATA['"); + } + } else { + i = 1; + do { + token = x.nextMeta(); + if (token == null) { + throw x.syntaxError("Missing '>' after ' 0); + } + } else if (token == XML.QUEST) { + +// "); + } else { + throw x.syntaxError("Misshaped tag"); + } + +// Open tag < + + } else { + if (!(token instanceof String)) { + throw x.syntaxError("Bad tagName '" + token + "'."); + } + tagName = (String) token; + newja = new JSONArray(); + newjo = new JSONObject(); + if (arrayForm) { + newja.put(tagName); + if (ja != null) { + ja.put(newja); + } + } else { + newjo.put("tagName", tagName); + if (ja != null) { + ja.put(newjo); + } + } + token = null; + for (; ; ) { + if (token == null) { + token = x.nextToken(); + } + if (token == null) { + throw x.syntaxError("Misshaped tag"); + } + if (!(token instanceof String)) { + break; + } + +// attribute = value + + attribute = (String) token; + if (!arrayForm && ("tagName".equals(attribute) || "childNode".equals(attribute))) { + throw x.syntaxError("Reserved attribute."); + } + token = x.nextToken(); + if (token == XML.EQ) { + token = x.nextToken(); + if (!(token instanceof String)) { + throw x.syntaxError("Missing value"); + } + newjo.accumulate(attribute, XML.stringToValue((String) token)); + token = null; + } else { + newjo.accumulate(attribute, ""); + } + } + if (arrayForm && newjo.length() > 0) { + newja.put(newjo); + } + +// Empty tag <.../> + + if (token == XML.SLASH) { + if (x.nextToken() != XML.GT) { + throw x.syntaxError("Misshaped tag"); + } + if (ja == null) { + if (arrayForm) { + return newja; + } else { + return newjo; + } + } + +// Content, between <...> and + + } else { + if (token != XML.GT) { + throw x.syntaxError("Misshaped tag"); + } + closeTag = (String) parse(x, arrayForm, newja); + if (closeTag != null) { + if (!closeTag.equals(tagName)) { + throw x.syntaxError("Mismatched '" + tagName + + "' and '" + closeTag + "'"); + } + tagName = null; + if (!arrayForm && newja.length() > 0) { + newjo.put("childNodes", newja); + } + if (ja == null) { + if (arrayForm) { + return newja; + } else { + return newjo; + } + } + } + } + } + } else { + if (ja != null) { + ja.put(token instanceof String + ? XML.stringToValue((String) token) + : token); + } + } + } + } + + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as + * a JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and + * JSONArrays will represent the child tags. + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param string The source string. + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + */ + public static JSONArray toJSONArray(String string) throws JSONException { + return toJSONArray(new XMLTokener(string)); + } + + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONArray using the JsonML transform. Each XML tag is represented as + * a JSONArray in which the first element is the tag name. If the tag has + * attributes, then the second element will be JSONObject containing the + * name/value pairs. If the tag contains children, then strings and + * JSONArrays will represent the child content and tags. + * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param x An XMLTokener. + * @return A JSONArray containing the structured data from the XML string. + * @throws JSONException + */ + public static JSONArray toJSONArray(XMLTokener x) throws JSONException { + return (JSONArray) parse(x, true, null); + } + + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as + * a JSONObject with a "tagName" property. If the tag has attributes, then + * the attributes will be in the JSONObject as properties. If the tag + * contains children, the object will have a "childNodes" property which + * will be an array of strings and JsonML JSONObjects. + *

+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param x An XMLTokener of the XML source text. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + */ + public static JSONObject toJSONObject(XMLTokener x) throws JSONException { + return (JSONObject) parse(x, false, null); + } + + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject using the JsonML transform. Each XML tag is represented as + * a JSONObject with a "tagName" property. If the tag has attributes, then + * the attributes will be in the JSONObject as properties. If the tag + * contains children, the object will have a "childNodes" property which + * will be an array of strings and JsonML JSONObjects. + *

+ * Comments, prologs, DTDs, and <[ [ ]]> are ignored. + * + * @param string The XML source text. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException { + return toJSONObject(new XMLTokener(string)); + } + + + /** + * Reverse the JSONML transformation, making an XML text from a JSONArray. + * + * @param ja A JSONArray. + * @return An XML string. + * @throws JSONException + */ + public static String toString(JSONArray ja) throws JSONException { + int i; + JSONObject jo; + String key; + Iterator keys; + int length; + Object object; + StringBuilder sb = new StringBuilder(); + String tagName; + String value; + +// Emit = length) { + sb.append('/'); + sb.append('>'); + } else { + sb.append('>'); + do { + object = ja.get(i); + i += 1; + if (object != null) { + if (object instanceof String) { + sb.append(XML.escape(object.toString())); + } else if (object instanceof JSONObject) { + sb.append(toString((JSONObject) object)); + } else if (object instanceof JSONArray) { + sb.append(toString((JSONArray) object)); + } + } + } while (i < length); + sb.append('<'); + sb.append('/'); + sb.append(tagName); + sb.append('>'); + } + return sb.toString(); + } + + /** + * Reverse the JSONML transformation, making an XML text from a JSONObject. + * The JSONObject must contain a "tagName" property. If it has children, + * then it must have a "childNodes" property containing an array of objects. + * The other properties are attributes with string values. + * + * @param jo A JSONObject. + * @return An XML string. + * @throws JSONException + */ + public static String toString(JSONObject jo) throws JSONException { + StringBuilder sb = new StringBuilder(); + int i; + JSONArray ja; + String key; + Iterator keys; + int length; + Object object; + String tagName; + String value; + +//Emit '); + } else { + sb.append('>'); + length = ja.length(); + for (i = 0; i < length; i += 1) { + object = ja.get(i); + if (object != null) { + if (object instanceof String) { + sb.append(XML.escape(object.toString())); + } else if (object instanceof JSONObject) { + sb.append(toString((JSONObject) object)); + } else if (object instanceof JSONArray) { + sb.append(toString((JSONArray) object)); + } else { + sb.append(object.toString()); + } + } + } + sb.append('<'); + sb.append('/'); + sb.append(tagName); + sb.append('>'); + } + return sb.toString(); + } +} diff --git a/src/main/java/org/json/JSONObject.java b/src/main/java/org/json/JSONObject.java new file mode 100644 index 0000000..6d82954 --- /dev/null +++ b/src/main/java/org/json/JSONObject.java @@ -0,0 +1,1579 @@ +package org.json; + +/* + Copyright (c) 2002 JSON.org + + 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. + */ + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.*; +import java.util.Map.Entry; + +/** + * A JSONObject is an unordered collection of name/value pairs. Its external + * form is a string wrapped in curly braces with colons between the names and + * values, and commas between the values and names. The internal form is an + * object having get and opt methods for accessing + * the values by name, and put methods for adding or replacing + * values by name. The values can be any of these types: Boolean, + * JSONArray, JSONObject, Number, + * String, or the JSONObject.NULL object. A + * JSONObject constructor can be used to convert an external form JSON text + * into an internal form whose values can be retrieved with the + * get and opt methods, or to convert values into a + * JSON text using the put and toString methods. A + * get method returns a value if one can be found, and throws an + * exception if one cannot be found. An opt method returns a + * default value instead of throwing an exception, and so is useful for + * obtaining optional values. + *

+ * The generic get() and opt() methods return an + * object, which you can cast or query for type. There are also typed + * get and opt methods that do type checking and type + * coercion for you. The opt methods differ from the get methods in that they + * do not throw. Instead, they return a specified value, such as null. + *

+ * The put methods add or replace values in an object. For + * example, + *

+ *

+ * myString = new JSONObject()
+ *         .put("JSON", "Hello, World!").toString();
+ * 
+ *

+ * produces the string {"JSON": "Hello, World"}. + *

+ * The texts produced by the toString methods strictly conform to + * the JSON syntax rules. The constructors are more forgiving in the texts they + * will accept: + *

    + *
  • An extra , (comma) may appear just + * before the closing brace.
  • + *
  • Strings may be quoted with ' (single + * quote).
  • + *
  • Strings do not need to be quoted at all if they do not begin with a + * quote or single quote, and if they do not contain leading or trailing + * spaces, and if they do not contain any of these characters: + * { } [ ] / \ : , # and if they do not look like numbers and + * if they are not the reserved words true, false, + * or null.
  • + *
+ * + * @author JSON.org + * @version 2014-05-03 + */ +public class JSONObject { + /** + * JSONObject.NULL is equivalent to the value that JavaScript calls null, + * whilst Java's null is equivalent to the value that JavaScript calls + * undefined. + */ + private static final class Null { + + /** + * There is only intended to be a single instance of the NULL object, + * so the clone method returns itself. + * + * @return NULL. + */ + @Override + protected final Object clone() { + return this; + } + + /** + * A Null object is equal to the null value and to itself. + * + * @param object An object to test for nullness. + * @return true if the object parameter is the JSONObject.NULL object or + * null. + */ + @Override + public boolean equals(Object object) { + return object == null || object == this; + } + + /** + * Get the "null" string value. + * + * @return The string "null". + */ + public String toString() { + return "null"; + } + } + + /** + * The map where the JSONObject's properties are kept. + */ + private final Map map; + + /** + * It is sometimes more convenient and less ambiguous to have a + * NULL object than to use Java's null value. + * JSONObject.NULL.equals(null) returns true. + * JSONObject.NULL.toString() returns "null". + */ + public static final Object NULL = new Null(); + + /** + * Construct an empty JSONObject. + */ + public JSONObject() { + this.map = new HashMap(); + } + + /** + * Construct a JSONObject from a subset of another JSONObject. An array of + * strings is used to identify the keys that should be copied. Missing keys + * are ignored. + * + * @param jo A JSONObject. + * @param names An array of strings. + * @throws JSONException + * @throws JSONException If a value is a non-finite number or if a name is + * duplicated. + */ + public JSONObject(JSONObject jo, String[] names) { + this(); + for (int i = 0; i < names.length; i += 1) { + try { + this.putOnce(names[i], jo.opt(names[i])); + } catch (Exception ignore) { + } + } + } + + /** + * Construct a JSONObject from a JSONTokener. + * + * @param x A JSONTokener object containing the source string. + * @throws JSONException If there is a syntax error in the source string or a + * duplicated key. + */ + public JSONObject(JSONTokener x) throws JSONException { + this(); + char c; + String key; + + if (x.nextClean() != '{') { + throw x.syntaxError("A JSONObject text must begin with '{'"); + } + for (; ; ) { + c = x.nextClean(); + switch (c) { + case 0: + throw x.syntaxError("A JSONObject text must end with '}'"); + case '}': + return; + default: + x.back(); + key = x.nextValue().toString(); + } + +// The key is followed by ':'. + + c = x.nextClean(); + if (c != ':') { + throw x.syntaxError("Expected a ':' after a key"); + } + this.putOnce(key, x.nextValue()); + +// Pairs are separated by ','. + + switch (x.nextClean()) { + case ';': + case ',': + if (x.nextClean() == '}') { + return; + } + x.back(); + break; + case '}': + return; + default: + throw x.syntaxError("Expected a ',' or '}'"); + } + } + } + + /** + * Construct a JSONObject from a Map. + * + * @param map A map object that can be used to initialize the contents of + * the JSONObject. + * @throws JSONException + */ + public JSONObject(Map map) { + this.map = new HashMap(); + if (map != null) { + Iterator> i = map.entrySet().iterator(); + while (i.hasNext()) { + Entry entry = i.next(); + Object value = entry.getValue(); + if (value != null) { + this.map.put(entry.getKey(), wrap(value)); + } + } + } + } + + /** + * Construct a JSONObject from an Object using bean getters. It reflects on + * all of the public methods of the object. For each of the methods with no + * parameters and a name starting with "get" or + * "is" followed by an uppercase letter, the method is invoked, + * and a key and the value returned from the getter method are put into the + * new JSONObject. + *

+ * The key is formed by removing the "get" or "is" + * prefix. If the second remaining character is not upper case, then the + * first character is converted to lower case. + *

+ * For example, if an object has a method named "getName", and + * if the result of calling object.getName() is + * "Larry Fine", then the JSONObject will contain + * "name": "Larry Fine". + * + * @param bean An object that has getter methods that should be used to make + * a JSONObject. + */ + public JSONObject(Object bean) { + this(); + this.populateMap(bean); + } + + /** + * Construct a JSONObject from an Object, using reflection to find the + * public members. The resulting JSONObject's keys will be the strings from + * the names array, and the values will be the field values associated with + * those keys in the object. If a key is not found or not visible, then it + * will not be copied into the new JSONObject. + * + * @param object An object that has fields that should be used to make a + * JSONObject. + * @param names An array of strings, the names of the fields to be obtained + * from the object. + */ + public JSONObject(Object object, String names[]) { + this(); + Class c = object.getClass(); + for (int i = 0; i < names.length; i += 1) { + String name = names[i]; + try { + this.putOpt(name, c.getField(name).get(object)); + } catch (Exception ignore) { + } + } + } + + /** + * Construct a JSONObject from a source JSON text string. This is the most + * commonly used JSONObject constructor. + * + * @param source A string beginning with { (left + * brace) and ending with } + *  (right brace). + * @throws JSONException If there is a syntax error in the source string or a + * duplicated key. + */ + public JSONObject(String source) throws JSONException { + this(new JSONTokener(source)); + } + + /** + * Construct a JSONObject from a ResourceBundle. + * + * @param baseName The ResourceBundle base name. + * @param locale The Locale to load the ResourceBundle for. + * @throws JSONException If any JSONExceptions are detected. + */ + public JSONObject(String baseName, Locale locale) throws JSONException { + this(); + ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, + Thread.currentThread().getContextClassLoader()); + +// Iterate through the keys in the bundle. + + Enumeration keys = bundle.getKeys(); + while (keys.hasMoreElements()) { + Object key = keys.nextElement(); + if (key != null) { + +// Go through the path, ensuring that there is a nested JSONObject for each +// segment except the last. Add the value using the last segment's name into +// the deepest nested JSONObject. + + String[] path = ((String) key).split("\\."); + int last = path.length - 1; + JSONObject target = this; + for (int i = 0; i < last; i += 1) { + String segment = path[i]; + JSONObject nextTarget = target.optJSONObject(segment); + if (nextTarget == null) { + nextTarget = new JSONObject(); + target.put(segment, nextTarget); + } + target = nextTarget; + } + target.put(path[last], bundle.getString((String) key)); + } + } + } + + /** + * Accumulate values under a key. It is similar to the put method except + * that if there is already an object stored under the key then a JSONArray + * is stored under the key to hold all of the accumulated values. If there + * is already a JSONArray, then the new value is appended to it. In + * contrast, the put method replaces the previous value. + *

+ * If only one value is accumulated that is not a JSONArray, then the result + * will be the same as using put. But if multiple values are accumulated, + * then the result will be like append. + * + * @param key A key string. + * @param value An object to be accumulated under the key. + * @return this. + * @throws JSONException If the value is an invalid number or if the key is null. + */ + public JSONObject accumulate(String key, Object value) throws JSONException { + testValidity(value); + Object object = this.opt(key); + if (object == null) { + this.put(key, + value instanceof JSONArray ? new JSONArray().put(value) + : value); + } else if (object instanceof JSONArray) { + ((JSONArray) object).put(value); + } else { + this.put(key, new JSONArray().put(object).put(value)); + } + return this; + } + + /** + * Append values to the array under a key. If the key does not exist in the + * JSONObject, then the key is put in the JSONObject with its value being a + * JSONArray containing the value parameter. If the key was already + * associated with a JSONArray, then the value parameter is appended to it. + * + * @param key A key string. + * @param value An object to be accumulated under the key. + * @return this. + * @throws JSONException If the key is null or if the current value associated with + * the key is not a JSONArray. + */ + public JSONObject append(String key, Object value) throws JSONException { + testValidity(value); + Object object = this.opt(key); + if (object == null) { + this.put(key, new JSONArray().put(value)); + } else if (object instanceof JSONArray) { + this.put(key, ((JSONArray) object).put(value)); + } else { + throw new JSONException("JSONObject[" + key + + "] is not a JSONArray."); + } + return this; + } + + /** + * Produce a string from a double. The string "null" will be returned if the + * number is not finite. + * + * @param d A double. + * @return A String. + */ + public static String doubleToString(double d) { + if (Double.isInfinite(d) || Double.isNaN(d)) { + return "null"; + } + +// Shave off trailing zeros and decimal point, if possible. + + String string = Double.toString(d); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) { + while (string.endsWith("0")) { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get the value object associated with a key. + * + * @param key A key string. + * @return The object associated with the key. + * @throws JSONException if the key is not found. + */ + public Object get(String key) throws JSONException { + if (key == null) { + throw new JSONException("Null key."); + } + Object object = this.opt(key); + if (object == null) { + throw new JSONException("JSONObject[" + quote(key) + "] not found."); + } + return object; + } + + /** + * Get the boolean value associated with a key. + * + * @param key A key string. + * @return The truth. + * @throws JSONException if the value is not a Boolean or the String "true" or + * "false". + */ + public boolean getBoolean(String key) throws JSONException { + Object object = this.get(key); + if (object.equals(Boolean.FALSE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("false"))) { + return false; + } else if (object.equals(Boolean.TRUE) + || (object instanceof String && ((String) object) + .equalsIgnoreCase("true"))) { + return true; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a Boolean."); + } + + /** + * Get the double value associated with a key. + * + * @param key A key string. + * @return The numeric value. + * @throws JSONException if the key is not found or if the value is not a Number + * object and cannot be converted to a number. + */ + public double getDouble(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).doubleValue() + : Double.parseDouble((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not a number."); + } + } + + /** + * Get the int value associated with a key. + * + * @param key A key string. + * @return The integer value. + * @throws JSONException if the key is not found or if the value cannot be converted + * to an integer. + */ + public int getInt(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).intValue() + : Integer.parseInt((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not an int."); + } + } + + /** + * Get the JSONArray value associated with a key. + * + * @param key A key string. + * @return A JSONArray which is the value. + * @throws JSONException if the key is not found or if the value is not a JSONArray. + */ + public JSONArray getJSONArray(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof JSONArray) { + return (JSONArray) object; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a JSONArray."); + } + + /** + * Get the JSONObject value associated with a key. + * + * @param key A key string. + * @return A JSONObject which is the value. + * @throws JSONException if the key is not found or if the value is not a JSONObject. + */ + public JSONObject getJSONObject(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof JSONObject) { + return (JSONObject) object; + } + throw new JSONException("JSONObject[" + quote(key) + + "] is not a JSONObject."); + } + + /** + * Get the long value associated with a key. + * + * @param key A key string. + * @return The long value. + * @throws JSONException if the key is not found or if the value cannot be converted + * to a long. + */ + public long getLong(String key) throws JSONException { + Object object = this.get(key); + try { + return object instanceof Number ? ((Number) object).longValue() + : Long.parseLong((String) object); + } catch (Exception e) { + throw new JSONException("JSONObject[" + quote(key) + + "] is not a long."); + } + } + + /** + * Get an array of field names from a JSONObject. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(JSONObject jo) { + int length = jo.length(); + if (length == 0) { + return null; + } + Iterator iterator = jo.keys(); + String[] names = new String[length]; + int i = 0; + while (iterator.hasNext()) { + names[i] = iterator.next(); + i += 1; + } + return names; + } + + /** + * Get an array of field names from an Object. + * + * @return An array of field names, or null if there are no names. + */ + public static String[] getNames(Object object) { + if (object == null) { + return null; + } + Class klass = object.getClass(); + Field[] fields = klass.getFields(); + int length = fields.length; + if (length == 0) { + return null; + } + String[] names = new String[length]; + for (int i = 0; i < length; i += 1) { + names[i] = fields[i].getName(); + } + return names; + } + + /** + * Get the string associated with a key. + * + * @param key A key string. + * @return A string which is the value. + * @throws JSONException if there is no string value for the key. + */ + public String getString(String key) throws JSONException { + Object object = this.get(key); + if (object instanceof String) { + return (String) object; + } + throw new JSONException("JSONObject[" + quote(key) + "] not a string."); + } + + /** + * Determine if the JSONObject contains a specific key. + * + * @param key A key string. + * @return true if the key exists in the JSONObject. + */ + public boolean has(String key) { + return this.map.containsKey(key); + } + + /** + * Increment a property of a JSONObject. If there is no such property, + * create one with a value of 1. If there is such a property, and if it is + * an Integer, Long, Double, or Float, then add one to it. + * + * @param key A key string. + * @return this. + * @throws JSONException If there is already a property with this name that is not an + * Integer, Long, Double, or Float. + */ + public JSONObject increment(String key) throws JSONException { + Object value = this.opt(key); + if (value == null) { + this.put(key, 1); + } else if (value instanceof Integer) { + this.put(key, (Integer) value + 1); + } else if (value instanceof Long) { + this.put(key, (Long) value + 1); + } else if (value instanceof Double) { + this.put(key, (Double) value + 1); + } else if (value instanceof Float) { + this.put(key, (Float) value + 1); + } else { + throw new JSONException("Unable to increment [" + quote(key) + "]."); + } + return this; + } + + /** + * Determine if the value associated with the key is null or if there is no + * value. + * + * @param key A key string. + * @return true if there is no value associated with the key or if the value + * is the JSONObject.NULL object. + */ + public boolean isNull(String key) { + return JSONObject.NULL.equals(this.opt(key)); + } + + /** + * Get an enumeration of the keys of the JSONObject. + * + * @return An iterator of the keys. + */ + public Iterator keys() { + return this.keySet().iterator(); + } + + /** + * Get a set of keys of the JSONObject. + * + * @return A keySet. + */ + public Set keySet() { + return this.map.keySet(); + } + + /** + * Get the number of keys stored in the JSONObject. + * + * @return The number of keys in the JSONObject. + */ + public int length() { + return this.map.size(); + } + + /** + * Produce a JSONArray containing the names of the elements of this + * JSONObject. + * + * @return A JSONArray containing the key strings, or null if the JSONObject + * is empty. + */ + public JSONArray names() { + JSONArray ja = new JSONArray(); + Iterator keys = this.keys(); + while (keys.hasNext()) { + ja.put(keys.next()); + } + return ja.length() == 0 ? null : ja; + } + + /** + * Produce a string from a Number. + * + * @param number A Number + * @return A String. + * @throws JSONException If n is a non-finite number. + */ + public static String numberToString(Number number) throws JSONException { + if (number == null) { + throw new JSONException("Null pointer"); + } + testValidity(number); + +// Shave off trailing zeros and decimal point, if possible. + + String string = number.toString(); + if (string.indexOf('.') > 0 && string.indexOf('e') < 0 + && string.indexOf('E') < 0) { + while (string.endsWith("0")) { + string = string.substring(0, string.length() - 1); + } + if (string.endsWith(".")) { + string = string.substring(0, string.length() - 1); + } + } + return string; + } + + /** + * Get an optional value associated with a key. + * + * @param key A key string. + * @return An object which is the value, or null if there is no value. + */ + public Object opt(String key) { + return key == null ? null : this.map.get(key); + } + + /** + * Get an optional boolean associated with a key. It returns false if there + * is no such key, or if the value is not Boolean.TRUE or the String "true". + * + * @param key A key string. + * @return The truth. + */ + public boolean optBoolean(String key) { + return this.optBoolean(key, false); + } + + /** + * Get an optional boolean associated with a key. It returns the + * defaultValue if there is no such key, or if it is not a Boolean or the + * String "true" or "false" (case insensitive). + * + * @param key A key string. + * @param defaultValue The default. + * @return The truth. + */ + public boolean optBoolean(String key, boolean defaultValue) { + try { + return this.getBoolean(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional double associated with a key, or NaN if there is no such + * key or if its value is not a number. If the value is a string, an attempt + * will be made to evaluate it as a number. + * + * @param key A string which is the key. + * @return An object which is the value. + */ + public double optDouble(String key) { + return this.optDouble(key, Double.NaN); + } + + /** + * Get an optional double associated with a key, or the defaultValue if + * there is no such key or if its value is not a number. If the value is a + * string, an attempt will be made to evaluate it as a number. + * + * @param key A key string. + * @param defaultValue The default. + * @return An object which is the value. + */ + public double optDouble(String key, double defaultValue) { + try { + return this.getDouble(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional int value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key A key string. + * @return An object which is the value. + */ + public int optInt(String key) { + return this.optInt(key, 0); + } + + /** + * Get an optional int value associated with a key, or the default if there + * is no such key or if the value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key A key string. + * @param defaultValue The default. + * @return An object which is the value. + */ + public int optInt(String key, int defaultValue) { + try { + return this.getInt(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional JSONArray associated with a key. It returns null if there + * is no such key, or if its value is not a JSONArray. + * + * @param key A key string. + * @return A JSONArray which is the value. + */ + public JSONArray optJSONArray(String key) { + Object o = this.opt(key); + return o instanceof JSONArray ? (JSONArray) o : null; + } + + /** + * Get an optional JSONObject associated with a key. It returns null if + * there is no such key, or if its value is not a JSONObject. + * + * @param key A key string. + * @return A JSONObject which is the value. + */ + public JSONObject optJSONObject(String key) { + Object object = this.opt(key); + return object instanceof JSONObject ? (JSONObject) object : null; + } + + /** + * Get an optional long value associated with a key, or zero if there is no + * such key or if the value is not a number. If the value is a string, an + * attempt will be made to evaluate it as a number. + * + * @param key A key string. + * @return An object which is the value. + */ + public long optLong(String key) { + return this.optLong(key, 0); + } + + /** + * Get an optional long value associated with a key, or the default if there + * is no such key or if the value is not a number. If the value is a string, + * an attempt will be made to evaluate it as a number. + * + * @param key A key string. + * @param defaultValue The default. + * @return An object which is the value. + */ + public long optLong(String key, long defaultValue) { + try { + return this.getLong(key); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * Get an optional string associated with a key. It returns an empty string + * if there is no such key. If the value is not a string and is not null, + * then it is converted to a string. + * + * @param key A key string. + * @return A string which is the value. + */ + public String optString(String key) { + return this.optString(key, ""); + } + + /** + * Get an optional string associated with a key. It returns the defaultValue + * if there is no such key. + * + * @param key A key string. + * @param defaultValue The default. + * @return A string which is the value. + */ + public String optString(String key, String defaultValue) { + Object object = this.opt(key); + return NULL.equals(object) ? defaultValue : object.toString(); + } + + private void populateMap(Object bean) { + Class klass = bean.getClass(); + +// If klass is a System class then set includeSuperClass to false. + + boolean includeSuperClass = klass.getClassLoader() != null; + + Method[] methods = includeSuperClass ? klass.getMethods() : klass + .getDeclaredMethods(); + for (int i = 0; i < methods.length; i += 1) { + try { + Method method = methods[i]; + if (Modifier.isPublic(method.getModifiers())) { + String name = method.getName(); + String key = ""; + if (name.startsWith("get")) { + if ("getClass".equals(name) + || "getDeclaringClass".equals(name)) { + key = ""; + } else { + key = name.substring(3); + } + } else if (name.startsWith("is")) { + key = name.substring(2); + } + if (key.length() > 0 + && Character.isUpperCase(key.charAt(0)) + && method.getParameterTypes().length == 0) { + if (key.length() == 1) { + key = key.toLowerCase(); + } else if (!Character.isUpperCase(key.charAt(1))) { + key = key.substring(0, 1).toLowerCase() + + key.substring(1); + } + + Object result = method.invoke(bean, (Object[]) null); + if (result != null) { + this.map.put(key, wrap(result)); + } + } + } + } catch (Exception ignore) { + } + } + } + + /** + * Put a key/boolean pair in the JSONObject. + * + * @param key A key string. + * @param value A boolean which is the value. + * @return this. + * @throws JSONException If the key is null. + */ + public JSONObject put(String key, boolean value) throws JSONException { + this.put(key, value ? Boolean.TRUE : Boolean.FALSE); + return this; + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a + * JSONArray which is produced from a Collection. + * + * @param key A key string. + * @param value A Collection value. + * @return this. + * @throws JSONException + */ + public JSONObject put(String key, Collection value) throws JSONException { + this.put(key, new JSONArray(value)); + return this; + } + + /** + * Put a key/double pair in the JSONObject. + * + * @param key A key string. + * @param value A double which is the value. + * @return this. + * @throws JSONException If the key is null or if the number is invalid. + */ + public JSONObject put(String key, double value) throws JSONException { + this.put(key, new Double(value)); + return this; + } + + /** + * Put a key/int pair in the JSONObject. + * + * @param key A key string. + * @param value An int which is the value. + * @return this. + * @throws JSONException If the key is null. + */ + public JSONObject put(String key, int value) throws JSONException { + this.put(key, new Integer(value)); + return this; + } + + /** + * Put a key/long pair in the JSONObject. + * + * @param key A key string. + * @param value A long which is the value. + * @return this. + * @throws JSONException If the key is null. + */ + public JSONObject put(String key, long value) throws JSONException { + this.put(key, new Long(value)); + return this; + } + + /** + * Put a key/value pair in the JSONObject, where the value will be a + * JSONObject which is produced from a Map. + * + * @param key A key string. + * @param value A Map value. + * @return this. + * @throws JSONException + */ + public JSONObject put(String key, Map value) throws JSONException { + this.put(key, new JSONObject(value)); + return this; + } + + /** + * Put a key/value pair in the JSONObject. If the value is null, then the + * key will be removed from the JSONObject if it is present. + * + * @param key A key string. + * @param value An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. + * @return this. + * @throws JSONException If the value is non-finite number or if the key is null. + */ + public JSONObject put(String key, Object value) throws JSONException { + if (key == null) { + throw new NullPointerException("Null key."); + } + if (value != null) { + testValidity(value); + this.map.put(key, value); + } else { + this.remove(key); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null, and only if there is not already a member with that + * name. + * + * @param key string + * @param value object + * @return this. + * @throws JSONException if the key is a duplicate + */ + public JSONObject putOnce(String key, Object value) throws JSONException { + if (key != null && value != null) { + if (this.opt(key) != null) { + throw new JSONException("Duplicate key \"" + key + "\""); + } + this.put(key, value); + } + return this; + } + + /** + * Put a key/value pair in the JSONObject, but only if the key and the value + * are both non-null. + * + * @param key A key string. + * @param value An object which is the value. It should be of one of these + * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, + * String, or the JSONObject.NULL object. + * @return this. + * @throws JSONException If the value is a non-finite number. + */ + public JSONObject putOpt(String key, Object value) throws JSONException { + if (key != null && value != null) { + this.put(key, value); + } + return this; + } + + /** + * Produce a string in double quotes with backslash sequences in all the + * right places. A backslash will be inserted within = '\u0080' && c < '\u00a0') + || (c >= '\u2000' && c < '\u2100')) { + w.write("\\u"); + hhhh = Integer.toHexString(c); + w.write("0000", 0, 4 - hhhh.length()); + w.write(hhhh); + } else { + w.write(c); + } + } + } + w.write('"'); + return w; + } + + /** + * Remove a name and its value, if present. + * + * @param key The name to be removed. + * @return The value that was associated with the name, or null if there was + * no value. + */ + public Object remove(String key) { + return this.map.remove(key); + } + + /** + * Determine if two JSONObjects are similar. + * They must contain the same set of names which must be associated with + * similar values. + * + * @param other The other JSONObject + * @return true if they are equal + */ + public boolean similar(Object other) { + try { + if (!(other instanceof JSONObject)) { + return false; + } + Set set = this.keySet(); + if (!set.equals(((JSONObject) other).keySet())) { + return false; + } + Iterator iterator = set.iterator(); + while (iterator.hasNext()) { + String name = iterator.next(); + Object valueThis = this.get(name); + Object valueOther = ((JSONObject) other).get(name); + if (valueThis instanceof JSONObject) { + if (!((JSONObject) valueThis).similar(valueOther)) { + return false; + } + } else if (valueThis instanceof JSONArray) { + if (!((JSONArray) valueThis).similar(valueOther)) { + return false; + } + } else if (!valueThis.equals(valueOther)) { + return false; + } + } + return true; + } catch (Throwable exception) { + return false; + } + } + + /** + * Try to convert a string into a number, boolean, or null. If the string + * can't be converted, return the string. + * + * @param string A String. + * @return A simple JSON value. + */ + public static Object stringToValue(String string) { + Double d; + if (string.equals("")) { + return string; + } + if (string.equalsIgnoreCase("true")) { + return Boolean.TRUE; + } + if (string.equalsIgnoreCase("false")) { + return Boolean.FALSE; + } + if (string.equalsIgnoreCase("null")) { + return JSONObject.NULL; + } + + /* + * If it might be a number, try converting it. If a number cannot be + * produced, then the value will just be a string. + */ + + char b = string.charAt(0); + if ((b >= '0' && b <= '9') || b == '-') { + try { + if (string.indexOf('.') > -1 || string.indexOf('e') > -1 + || string.indexOf('E') > -1) { + d = Double.valueOf(string); + if (!d.isInfinite() && !d.isNaN()) { + return d; + } + } else { + Long myLong = new Long(string); + if (string.equals(myLong.toString())) { + if (myLong == myLong.intValue()) { + return myLong.intValue(); + } else { + return myLong; + } + } + } + } catch (Exception ignore) { + } + } + return string; + } + + /** + * Throw an exception if the object is a NaN or infinite number. + * + * @param o The object to test. + * @throws JSONException If o is a non-finite number. + */ + public static void testValidity(Object o) throws JSONException { + if (o != null) { + if (o instanceof Double) { + if (((Double) o).isInfinite() || ((Double) o).isNaN()) { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } else if (o instanceof Float) { + if (((Float) o).isInfinite() || ((Float) o).isNaN()) { + throw new JSONException( + "JSON does not allow non-finite numbers."); + } + } + } + } + + /** + * Produce a JSONArray containing the values of the members of this + * JSONObject. + * + * @param names A JSONArray containing a list of key strings. This determines + * the sequence of the values in the result. + * @return A JSONArray of values. + * @throws JSONException If any of the values are non-finite numbers. + */ + public JSONArray toJSONArray(JSONArray names) throws JSONException { + if (names == null || names.length() == 0) { + return null; + } + JSONArray ja = new JSONArray(); + for (int i = 0; i < names.length(); i += 1) { + ja.put(this.opt(names.getString(i))); + } + return ja; + } + + /** + * Make a JSON text of this JSONObject. For compactness, no whitespace is + * added. If this would not result in a syntactically correct JSON text, + * then null will be returned instead. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return a printable, displayable, portable, transmittable representation + * of the object, beginning with { (left + * brace) and ending with } (right + * brace). + */ + public String toString() { + try { + return this.toString(0); + } catch (Exception e) { + return null; + } + } + + /** + * Make a prettyprinted JSON text of this JSONObject. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @param indentFactor The number of spaces to add to each level of indentation. + * @return a printable, displayable, portable, transmittable representation + * of the object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException If the object contains an invalid number. + */ + public String toString(int indentFactor) throws JSONException { + StringWriter w = new StringWriter(); + synchronized (w.getBuffer()) { + return this.write(w, indentFactor, 0).toString(); + } + } + + /** + * Make a JSON text of an Object value. If the object has an + * value.toJSONString() method, then that method will be used to produce the + * JSON text. The method is required to produce a strictly conforming text. + * If the object does not contain a toJSONString method (which is the most + * common case), then a text will be produced by other means. If the value + * is an array or Collection, then a JSONArray will be made from it and its + * toJSONString method will be called. If the value is a MAP, then a + * JSONObject will be made from it and its toJSONString method will be + * called. Otherwise, the value's toString method will be called, and the + * result will be quoted. + *

+ *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @param value The value to be serialized. + * @return a printable, displayable, transmittable representation of the + * object, beginning with { (left + * brace) and ending with } (right + * brace). + * @throws JSONException If the value is or contains an invalid number. + */ + public static String valueToString(Object value) throws JSONException { + if (value == null || value.equals(null)) { + return "null"; + } + if (value instanceof JSONString) { + Object object; + try { + object = ((JSONString) value).toJSONString(); + } catch (Exception e) { + throw new JSONException(e); + } + if (object instanceof String) { + return (String) object; + } + throw new JSONException("Bad value from toJSONString: " + object); + } + if (value instanceof Number) { + return numberToString((Number) value); + } + if (value instanceof Boolean || value instanceof JSONObject + || value instanceof JSONArray) { + return value.toString(); + } + if (value instanceof Map) { + return new JSONObject((Map) value).toString(); + } + if (value instanceof Collection) { + return new JSONArray((Collection) value).toString(); + } + if (value.getClass().isArray()) { + return new JSONArray(value).toString(); + } + return quote(value.toString()); + } + + /** + * Wrap an object, if necessary. If the object is null, return the NULL + * object. If it is an array or collection, wrap it in a JSONArray. If it is + * a map, wrap it in a JSONObject. If it is a standard property (Double, + * String, et al) then it is already wrapped. Otherwise, if it comes from + * one of the java packages, turn it into a string. And if it doesn't, try + * to wrap it in a JSONObject. If the wrapping fails, then null is returned. + * + * @param object The object to wrap + * @return The wrapped value + */ + public static Object wrap(Object object) { + try { + if (object == null) { + return NULL; + } + if (object instanceof JSONObject || object instanceof JSONArray + || NULL.equals(object) || object instanceof JSONString + || object instanceof Byte || object instanceof Character + || object instanceof Short || object instanceof Integer + || object instanceof Long || object instanceof Boolean + || object instanceof Float || object instanceof Double + || object instanceof String) { + return object; + } + + if (object instanceof Collection) { + return new JSONArray((Collection) object); + } + if (object.getClass().isArray()) { + return new JSONArray(object); + } + if (object instanceof Map) { + return new JSONObject((Map) object); + } + Package objectPackage = object.getClass().getPackage(); + String objectPackageName = objectPackage != null ? objectPackage + .getName() : ""; + if (objectPackageName.startsWith("java.") + || objectPackageName.startsWith("javax.") + || object.getClass().getClassLoader() == null) { + return object.toString(); + } + return new JSONObject(object); + } catch (Exception exception) { + return null; + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + public Writer write(Writer writer) throws JSONException { + return this.write(writer, 0, 0); + } + + static final Writer writeValue(Writer writer, Object value, + int indentFactor, int indent) throws JSONException, IOException { + if (value == null || value.equals(null)) { + writer.write("null"); + } else if (value instanceof JSONObject) { + ((JSONObject) value).write(writer, indentFactor, indent); + } else if (value instanceof JSONArray) { + ((JSONArray) value).write(writer, indentFactor, indent); + } else if (value instanceof Map) { + new JSONObject((Map) value).write(writer, indentFactor, indent); + } else if (value instanceof Collection) { + new JSONArray((Collection) value).write(writer, indentFactor, + indent); + } else if (value.getClass().isArray()) { + new JSONArray(value).write(writer, indentFactor, indent); + } else if (value instanceof Number) { + writer.write(numberToString((Number) value)); + } else if (value instanceof Boolean) { + writer.write(value.toString()); + } else if (value instanceof JSONString) { + Object o; + try { + o = ((JSONString) value).toJSONString(); + } catch (Exception e) { + throw new JSONException(e); + } + writer.write(o != null ? o.toString() : quote(value.toString())); + } else { + quote(value.toString(), writer); + } + return writer; + } + + static final void indent(Writer writer, int indent) throws IOException { + for (int i = 0; i < indent; i += 1) { + writer.write(' '); + } + } + + /** + * Write the contents of the JSONObject as JSON text to a writer. For + * compactness, no whitespace is added. + *

+ * Warning: This method assumes that the data structure is acyclical. + * + * @return The writer. + * @throws JSONException + */ + Writer write(Writer writer, int indentFactor, int indent) + throws JSONException { + try { + boolean commanate = false; + final int length = this.length(); + Iterator keys = this.keys(); + writer.write('{'); + + if (length == 1) { + Object key = keys.next(); + writer.write(quote(key.toString())); + writer.write(':'); + if (indentFactor > 0) { + writer.write(' '); + } + writeValue(writer, this.map.get(key), indentFactor, indent); + } else if (length != 0) { + final int newindent = indent + indentFactor; + while (keys.hasNext()) { + Object key = keys.next(); + if (commanate) { + writer.write(','); + } + if (indentFactor > 0) { + writer.write('\n'); + } + indent(writer, newindent); + writer.write(quote(key.toString())); + writer.write(':'); + if (indentFactor > 0) { + writer.write(' '); + } + writeValue(writer, this.map.get(key), indentFactor, newindent); + commanate = true; + } + if (indentFactor > 0) { + writer.write('\n'); + } + indent(writer, indent); + } + writer.write('}'); + return writer; + } catch (IOException exception) { + throw new JSONException(exception); + } + } +} diff --git a/src/main/java/org/json/JSONString.java b/src/main/java/org/json/JSONString.java new file mode 100644 index 0000000..1564788 --- /dev/null +++ b/src/main/java/org/json/JSONString.java @@ -0,0 +1,19 @@ +package org.json; + +/** + * The JSONString interface allows a toJSONString() + * method so that a class can change the behavior of + * JSONObject.toString(), JSONArray.toString(), + * and JSONWriter.value(Object). The + * toJSONString method will be used instead of the default behavior + * of using the Object's toString() method and quoting the result. + */ +public interface JSONString { + /** + * The toJSONString method allows a class to produce its own JSON + * serialization. + * + * @return A strictly syntactically correct JSON text. + */ + public String toJSONString(); +} diff --git a/src/main/java/org/json/JSONStringer.java b/src/main/java/org/json/JSONStringer.java new file mode 100644 index 0000000..600b408 --- /dev/null +++ b/src/main/java/org/json/JSONStringer.java @@ -0,0 +1,80 @@ +package org.json; + +/* +Copyright (c) 2006 JSON.org + +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. +*/ + +import java.io.StringWriter; + +/** + * JSONStringer provides a quick and convenient way of producing JSON text. + * The texts produced strictly conform to JSON syntax rules. No whitespace is + * added, so the results are ready for transmission or storage. Each instance of + * JSONStringer can produce one JSON text. + *

+ * A JSONStringer instance provides a value method for appending + * values to the + * text, and a key + * method for adding keys before values in objects. There are array + * and endArray methods that make and bound array values, and + * object and endObject methods which make and bound + * object values. All of these methods return the JSONWriter instance, + * permitting cascade style. For example,

+ * myString = new JSONStringer()
+ *     .object()
+ *         .key("JSON")
+ *         .value("Hello, World!")
+ *     .endObject()
+ *     .toString();
which produces the string
+ * {"JSON":"Hello, World!"}
+ *

+ * The first method called must be array or object. + * There are no methods for adding commas or colons. JSONStringer adds them for + * you. Objects and arrays can be nested up to 20 levels deep. + *

+ * This can sometimes be easier than using a JSONObject to build a string. + * + * @author JSON.org + * @version 2008-09-18 + */ +public class JSONStringer extends JSONWriter { + /** + * Make a fresh JSONStringer. It can be used to build one JSON text. + */ + public JSONStringer() { + super(new StringWriter()); + } + + /** + * Return the JSON text. This method is used to obtain the product of the + * JSONStringer instance. It will return null if there was a + * problem in the construction of the JSON text (such as the calls to + * array were not properly balanced with calls to + * endArray). + * + * @return The JSON text. + */ + public String toString() { + return this.mode == 'd' ? this.writer.toString() : null; + } +} diff --git a/src/main/java/org/json/JSONTokener.java b/src/main/java/org/json/JSONTokener.java new file mode 100644 index 0000000..61a7650 --- /dev/null +++ b/src/main/java/org/json/JSONTokener.java @@ -0,0 +1,450 @@ +package org.json; + +import java.io.*; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +/** + * A JSONTokener takes a source string and extracts characters and tokens from + * it. It is used by the JSONObject and JSONArray constructors to parse + * JSON source strings. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class JSONTokener { + + private long character; + private boolean eof; + private long index; + private long line; + private char previous; + private Reader reader; + private boolean usePrevious; + + + /** + * Construct a JSONTokener from a Reader. + * + * @param reader A reader. + */ + public JSONTokener(Reader reader) { + this.reader = reader.markSupported() + ? reader + : new BufferedReader(reader); + this.eof = false; + this.usePrevious = false; + this.previous = 0; + this.index = 0; + this.character = 1; + this.line = 1; + } + + + /** + * Construct a JSONTokener from an InputStream. + * + * @param inputStream The source. + */ + public JSONTokener(InputStream inputStream) throws JSONException { + this(new InputStreamReader(inputStream)); + } + + + /** + * Construct a JSONTokener from a string. + * + * @param s A source string. + */ + public JSONTokener(String s) { + this(new StringReader(s)); + } + + + /** + * Back up one character. This provides a sort of lookahead capability, + * so that you can test for a digit or letter before attempting to parse + * the next number or identifier. + */ + public void back() throws JSONException { + if (this.usePrevious || this.index <= 0) { + throw new JSONException("Stepping back two steps is not supported"); + } + this.index -= 1; + this.character -= 1; + this.usePrevious = true; + this.eof = false; + } + + + /** + * Get the hex value of a character (base16). + * + * @param c A character between '0' and '9' or between 'A' and 'F' or + * between 'a' and 'f'. + * @return An int between 0 and 15, or -1 if c was not a hex digit. + */ + public static int dehexchar(char c) { + if (c >= '0' && c <= '9') { + return c - '0'; + } + if (c >= 'A' && c <= 'F') { + return c - ('A' - 10); + } + if (c >= 'a' && c <= 'f') { + return c - ('a' - 10); + } + return -1; + } + + public boolean end() { + return this.eof && !this.usePrevious; + } + + + /** + * Determine if the source string still contains characters that next() + * can consume. + * + * @return true if not yet at the end of the source. + */ + public boolean more() throws JSONException { + this.next(); + if (this.end()) { + return false; + } + this.back(); + return true; + } + + + /** + * Get the next character in the source string. + * + * @return The next character, or 0 if past the end of the source string. + */ + public char next() throws JSONException { + int c; + if (this.usePrevious) { + this.usePrevious = false; + c = this.previous; + } else { + try { + c = this.reader.read(); + } catch (IOException exception) { + throw new JSONException(exception); + } + + if (c <= 0) { // End of stream + this.eof = true; + c = 0; + } + } + this.index += 1; + if (this.previous == '\r') { + this.line += 1; + this.character = c == '\n' ? 0 : 1; + } else if (c == '\n') { + this.line += 1; + this.character = 0; + } else { + this.character += 1; + } + this.previous = (char) c; + return this.previous; + } + + + /** + * Consume the next character, and check that it matches a specified + * character. + * + * @param c The character to match. + * @return The character. + * @throws JSONException if the character does not match. + */ + public char next(char c) throws JSONException { + char n = this.next(); + if (n != c) { + throw this.syntaxError("Expected '" + c + "' and instead saw '" + + n + "'"); + } + return n; + } + + + /** + * Get the next n characters. + * + * @param n The number of characters to take. + * @return A string of n characters. + * @throws JSONException Substring bounds error if there are not + * n characters remaining in the source string. + */ + public String next(int n) throws JSONException { + if (n == 0) { + return ""; + } + + char[] chars = new char[n]; + int pos = 0; + + while (pos < n) { + chars[pos] = this.next(); + if (this.end()) { + throw this.syntaxError("Substring bounds error"); + } + pos += 1; + } + return new String(chars); + } + + + /** + * Get the next char in the string, skipping whitespace. + * + * @return A character, or 0 if there are no more characters. + * @throws JSONException + */ + public char nextClean() throws JSONException { + for (; ; ) { + char c = this.next(); + if (c == 0 || c > ' ') { + return c; + } + } + } + + + /** + * Return the characters up to the next close quote character. + * Backslash processing is done. The formal JSON format does not + * allow strings in single quotes, but an implementation is allowed to + * accept them. + * + * @param quote The quoting character, either + * " (double quote) or + * ' (single quote). + * @return A String. + * @throws JSONException Unterminated string. + */ + public String nextString(char quote) throws JSONException { + char c; + StringBuilder sb = new StringBuilder(); + for (; ; ) { + c = this.next(); + switch (c) { + case 0: + case '\n': + case '\r': + throw this.syntaxError("Unterminated string"); + case '\\': + c = this.next(); + switch (c) { + case 'b': + sb.append('\b'); + break; + case 't': + sb.append('\t'); + break; + case 'n': + sb.append('\n'); + break; + case 'f': + sb.append('\f'); + break; + case 'r': + sb.append('\r'); + break; + case 'u': + sb.append((char) Integer.parseInt(this.next(4), 16)); + break; + case '"': + case '\'': + case '\\': + case '/': + sb.append(c); + break; + default: + throw this.syntaxError("Illegal escape."); + } + break; + default: + if (c == quote) { + return sb.toString(); + } + sb.append(c); + } + } + } + + + /** + * Get the text up but not including the specified character or the + * end of line, whichever comes first. + * + * @param delimiter A delimiter character. + * @return A string. + */ + public String nextTo(char delimiter) throws JSONException { + StringBuilder sb = new StringBuilder(); + for (; ; ) { + char c = this.next(); + if (c == delimiter || c == 0 || c == '\n' || c == '\r') { + if (c != 0) { + this.back(); + } + return sb.toString().trim(); + } + sb.append(c); + } + } + + + /** + * Get the text up but not including one of the specified delimiter + * characters or the end of line, whichever comes first. + * + * @param delimiters A set of delimiter characters. + * @return A string, trimmed. + */ + public String nextTo(String delimiters) throws JSONException { + char c; + StringBuilder sb = new StringBuilder(); + for (; ; ) { + c = this.next(); + if (delimiters.indexOf(c) >= 0 || c == 0 || + c == '\n' || c == '\r') { + if (c != 0) { + this.back(); + } + return sb.toString().trim(); + } + sb.append(c); + } + } + + + /** + * Get the next value. The value can be a Boolean, Double, Integer, + * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object. + * + * @return An object. + * @throws JSONException If syntax error. + */ + public Object nextValue() throws JSONException { + char c = this.nextClean(); + String string; + + switch (c) { + case '"': + case '\'': + return this.nextString(c); + case '{': + this.back(); + return new JSONObject(this); + case '[': + this.back(); + return new JSONArray(this); + } + + /* + * Handle unquoted text. This could be the values true, false, or + * null, or it can be a number. An implementation (such as this one) + * is allowed to also accept non-standard forms. + * + * Accumulate characters until we reach the end of the text or a + * formatting character. + */ + + StringBuilder sb = new StringBuilder(); + while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { + sb.append(c); + c = this.next(); + } + this.back(); + + string = sb.toString().trim(); + if ("".equals(string)) { + throw this.syntaxError("Missing value"); + } + return JSONObject.stringToValue(string); + } + + + /** + * Skip characters until the next character is the requested character. + * If the requested character is not found, no characters are skipped. + * + * @param to A character to skip to. + * @return The requested character, or zero if the requested character + * is not found. + */ + public char skipTo(char to) throws JSONException { + char c; + try { + long startIndex = this.index; + long startCharacter = this.character; + long startLine = this.line; + this.reader.mark(1000000); + do { + c = this.next(); + if (c == 0) { + this.reader.reset(); + this.index = startIndex; + this.character = startCharacter; + this.line = startLine; + return c; + } + } while (c != to); + } catch (IOException exception) { + throw new JSONException(exception); + } + this.back(); + return c; + } + + + /** + * Make a JSONException to signal a syntax error. + * + * @param message The error message. + * @return A JSONException object, suitable for throwing + */ + public JSONException syntaxError(String message) { + return new JSONException(message + this.toString()); + } + + + /** + * Make a printable string of this JSONTokener. + * + * @return " at {index} [character {character} line {line}]" + */ + public String toString() { + return " at " + this.index + " [character " + this.character + " line " + + this.line + "]"; + } +} diff --git a/src/main/java/org/json/JSONWriter.java b/src/main/java/org/json/JSONWriter.java new file mode 100644 index 0000000..76f6649 --- /dev/null +++ b/src/main/java/org/json/JSONWriter.java @@ -0,0 +1,341 @@ +package org.json; + +import java.io.IOException; +import java.io.Writer; + +/* +Copyright (c) 2006 JSON.org + +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. +*/ + +/** + * JSONWriter provides a quick and convenient way of producing JSON text. + * The texts produced strictly conform to JSON syntax rules. No whitespace is + * added, so the results are ready for transmission or storage. Each instance of + * JSONWriter can produce one JSON text. + *

+ * A JSONWriter instance provides a value method for appending + * values to the + * text, and a key + * method for adding keys before values in objects. There are array + * and endArray methods that make and bound array values, and + * object and endObject methods which make and bound + * object values. All of these methods return the JSONWriter instance, + * permitting a cascade style. For example,

+ * new JSONWriter(myWriter)
+ *     .object()
+ *         .key("JSON")
+ *         .value("Hello, World!")
+ *     .endObject();
which writes
+ * {"JSON":"Hello, World!"}
+ *

+ * The first method called must be array or object. + * There are no methods for adding commas or colons. JSONWriter adds them for + * you. Objects and arrays can be nested up to 20 levels deep. + *

+ * This can sometimes be easier than using a JSONObject to build a string. + * + * @author JSON.org + * @version 2011-11-24 + */ +public class JSONWriter { + private static final int maxdepth = 200; + + /** + * The comma flag determines if a comma should be output before the next + * value. + */ + private boolean comma; + + /** + * The current mode. Values: + * 'a' (array), + * 'd' (done), + * 'i' (initial), + * 'k' (key), + * 'o' (object). + */ + protected char mode; + + /** + * The object/array stack. + */ + private final JSONObject stack[]; + + /** + * The stack top index. A value of 0 indicates that the stack is empty. + */ + private int top; + + /** + * The writer that will receive the output. + */ + protected Writer writer; + + /** + * Make a fresh JSONWriter. It can be used to build one JSON text. + */ + public JSONWriter(Writer w) { + this.comma = false; + this.mode = 'i'; + this.stack = new JSONObject[maxdepth]; + this.top = 0; + this.writer = w; + } + + /** + * Append a value. + * + * @param string A string value. + * @return this + * @throws JSONException If the value is out of sequence. + */ + private JSONWriter append(String string) throws JSONException { + if (string == null) { + throw new JSONException("Null pointer"); + } + if (this.mode == 'o' || this.mode == 'a') { + try { + if (this.comma && this.mode == 'a') { + this.writer.write(','); + } + this.writer.write(string); + } catch (IOException e) { + throw new JSONException(e); + } + if (this.mode == 'o') { + this.mode = 'k'; + } + this.comma = true; + return this; + } + throw new JSONException("Value out of sequence."); + } + + /** + * Begin appending a new array. All values until the balancing + * endArray will be appended to this array. The + * endArray method must be called to mark the array's end. + * + * @return this + * @throws JSONException If the nesting is too deep, or if the object is + * started in the wrong place (for example as a key or after the end of the + * outermost array or object). + */ + public JSONWriter array() throws JSONException { + if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { + this.push(null); + this.append("["); + this.comma = false; + return this; + } + throw new JSONException("Misplaced array."); + } + + /** + * End something. + * + * @param mode Mode + * @param c Closing character + * @return this + * @throws JSONException If unbalanced. + */ + private JSONWriter end(char mode, char c) throws JSONException { + if (this.mode != mode) { + throw new JSONException(mode == 'a' + ? "Misplaced endArray." + : "Misplaced endObject."); + } + this.pop(mode); + try { + this.writer.write(c); + } catch (IOException e) { + throw new JSONException(e); + } + this.comma = true; + return this; + } + + /** + * End an array. This method most be called to balance calls to + * array. + * + * @return this + * @throws JSONException If incorrectly nested. + */ + public JSONWriter endArray() throws JSONException { + return this.end('a', ']'); + } + + /** + * End an object. This method most be called to balance calls to + * object. + * + * @return this + * @throws JSONException If incorrectly nested. + */ + public JSONWriter endObject() throws JSONException { + return this.end('k', '}'); + } + + /** + * Append a key. The key will be associated with the next value. In an + * object, every value must be preceded by a key. + * + * @param string A key string. + * @return this + * @throws JSONException If the key is out of place. For example, keys + * do not belong in arrays or if the key is null. + */ + public JSONWriter key(String string) throws JSONException { + if (string == null) { + throw new JSONException("Null key."); + } + if (this.mode == 'k') { + try { + this.stack[this.top - 1].putOnce(string, Boolean.TRUE); + if (this.comma) { + this.writer.write(','); + } + this.writer.write(JSONObject.quote(string)); + this.writer.write(':'); + this.comma = false; + this.mode = 'o'; + return this; + } catch (IOException e) { + throw new JSONException(e); + } + } + throw new JSONException("Misplaced key."); + } + + + /** + * Begin appending a new object. All keys and values until the balancing + * endObject will be appended to this object. The + * endObject method must be called to mark the object's end. + * + * @return this + * @throws JSONException If the nesting is too deep, or if the object is + * started in the wrong place (for example as a key or after the end of the + * outermost array or object). + */ + public JSONWriter object() throws JSONException { + if (this.mode == 'i') { + this.mode = 'o'; + } + if (this.mode == 'o' || this.mode == 'a') { + this.append("{"); + this.push(new JSONObject()); + this.comma = false; + return this; + } + throw new JSONException("Misplaced object."); + + } + + + /** + * Pop an array or object scope. + * + * @param c The scope to close. + * @throws JSONException If nesting is wrong. + */ + private void pop(char c) throws JSONException { + if (this.top <= 0) { + throw new JSONException("Nesting error."); + } + char m = this.stack[this.top - 1] == null ? 'a' : 'k'; + if (m != c) { + throw new JSONException("Nesting error."); + } + this.top -= 1; + this.mode = this.top == 0 + ? 'd' + : this.stack[this.top - 1] == null + ? 'a' + : 'k'; + } + + /** + * Push an array or object scope. + * + * @param jo The scope to open. + * @throws JSONException If nesting is too deep. + */ + private void push(JSONObject jo) throws JSONException { + if (this.top >= maxdepth) { + throw new JSONException("Nesting too deep."); + } + this.stack[this.top] = jo; + this.mode = jo == null ? 'a' : 'k'; + this.top += 1; + } + + + /** + * Append either the value true or the value + * false. + * + * @param b A boolean. + * @return this + * @throws JSONException + */ + public JSONWriter value(boolean b) throws JSONException { + return this.append(b ? "true" : "false"); + } + + /** + * Append a double value. + * + * @param d A double. + * @return this + * @throws JSONException If the number is not finite. + */ + public JSONWriter value(double d) throws JSONException { + return this.value(new Double(d)); + } + + /** + * Append a long value. + * + * @param l A long. + * @return this + * @throws JSONException + */ + public JSONWriter value(long l) throws JSONException { + return this.append(Long.toString(l)); + } + + + /** + * Append an object value. + * + * @param object The object to append. It can be null, or a Boolean, Number, + * String, JSONObject, or JSONArray, or an object that implements JSONString. + * @return this + * @throws JSONException If the value is out of sequence. + */ + public JSONWriter value(Object object) throws JSONException { + return this.append(JSONObject.valueToString(object)); + } +} diff --git a/src/main/java/org/json/Kim.java b/src/main/java/org/json/Kim.java new file mode 100644 index 0000000..3101b5d --- /dev/null +++ b/src/main/java/org/json/Kim.java @@ -0,0 +1,353 @@ +package org.json; + + +/* + Copyright (c) 2013 JSON.org + + 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. + */ + +/** + * Kim makes immutable eight bit Unicode strings. If the MSB of a byte is set, + * then the next byte is a continuation byte. The last byte of a character + * never has the MSB reset. Every byte that is not the last byte has the MSB + * set. Kim stands for "Keep it minimal". A Unicode character is never longer + * than 3 bytes. Every byte contributes 7 bits to the character. ASCII is + * unmodified. + *

+ * Kim UTF-8 + * one byte U+007F U+007F + * two bytes U+3FFF U+07FF + * three bytes U+10FFF U+FFFF + * four bytes U+10FFFF + *

+ * Characters in the ranges U+0800..U+3FFF and U+10000..U+10FFFF will be one + * byte smaller when encoded in Kim compared to UTF-8. + *

+ * Kim is beneficial when using scripts such as Old South Arabian, Aramaic, + * Avestan, Balinese, Batak, Bopomofo, Buginese, Buhid, Carian, Cherokee, + * Coptic, Cyrillic, Deseret, Egyptian Hieroglyphs, Ethiopic, Georgian, + * Glagolitic, Gothic, Hangul Jamo, Hanunoo, Hiragana, Kanbun, Kaithi, + * Kannada, Katakana, Kharoshthi, Khmer, Lao, Lepcha, Limbu, Lycian, Lydian, + * Malayalam, Mandaic, Meroitic, Miao, Mongolian, Myanmar, New Tai Lue, + * Ol Chiki, Old Turkic, Oriya, Osmanya, Pahlavi, Parthian, Phags-Pa, + * Phoenician, Samaritan, Sharada, Sinhala, Sora Sompeng, Tagalog, Tagbanwa, + * Takri, Tai Le, Tai Tham, Tamil, Telugu, Thai, Tibetan, Tifinagh, UCAS. + *

+ * A kim object can be constructed from an ordinary UTF-16 string, or from a + * byte array. A kim object can produce a UTF-16 string. + *

+ * As with UTF-8, it is possible to detect character boundaries within a byte + * sequence. UTF-8 is one of the world's great inventions. While Kim is more + * efficient, it is not clear that it is worth the expense of transition. + * + * @version 2013-04-18 + */ +public class Kim { + + /** + * The byte array containing the kim's content. + */ + private byte[] bytes = null; + + /** + * The kim's hashcode, conforming to Java's hashcode conventions. + */ + private int hashcode = 0; + + /** + * The number of bytes in the kim. The number of bytes can be as much as + * three times the number of characters. + */ + public int length = 0; + + /** + * The memoization of toString(). + */ + private String string = null; + + /** + * Make a kim from a portion of a byte array. + * + * @param bytes A byte array. + * @param from The index of the first byte. + * @param thru The index of the last byte plus one. + */ + public Kim(byte[] bytes, int from, int thru) { + +// As the bytes are copied into the new kim, a hashcode is computed using a +// modified Fletcher code. + + int sum = 1; + int value; + this.hashcode = 0; + this.length = thru - from; + if (this.length > 0) { + this.bytes = new byte[this.length]; + for (int at = 0; at < this.length; at += 1) { + value = (int) bytes[at + from] & 0xFF; + sum += value; + this.hashcode += sum; + this.bytes[at] = (byte) value; + } + this.hashcode += sum << 16; + } + } + + /** + * Make a kim from a byte array. + * + * @param bytes The byte array. + * @param length The number of bytes. + */ + public Kim(byte[] bytes, int length) { + this(bytes, 0, length); + } + + /** + * Make a new kim from a substring of an existing kim. The coordinates are + * in byte units, not character units. + * + * @param kim The source of bytes. + * @param from The point at which to take bytes. + * @param thru The point at which to stop taking bytes. + */ + public Kim(Kim kim, int from, int thru) { + this(kim.bytes, from, thru); + } + + /** + * Make a kim from a string. + * + * @param string The string. + * @throws JSONException if surrogate pair mismatch. + */ + public Kim(String string) throws JSONException { + int stringLength = string.length(); + this.hashcode = 0; + this.length = 0; + +// First pass: Determine the length of the kim, allowing for the UTF-16 +// to UTF-32 conversion, and then the UTF-32 to Kim conversion. + + if (stringLength > 0) { + for (int i = 0; i < stringLength; i += 1) { + int c = string.charAt(i); + if (c <= 0x7F) { + this.length += 1; + } else if (c <= 0x3FFF) { + this.length += 2; + } else { + if (c >= 0xD800 && c <= 0xDFFF) { + i += 1; + int d = string.charAt(i); + if (c > 0xDBFF || d < 0xDC00 || d > 0xDFFF) { + throw new JSONException("Bad UTF16"); + } + } + this.length += 3; + } + } + +// Second pass: Allocate a byte array and fill that array with the conversion +// while computing the hashcode. + + this.bytes = new byte[length]; + int at = 0; + int b; + int sum = 1; + for (int i = 0; i < stringLength; i += 1) { + int character = string.charAt(i); + if (character <= 0x7F) { + bytes[at] = (byte) character; + sum += character; + this.hashcode += sum; + at += 1; + } else if (character <= 0x3FFF) { + b = 0x80 | (character >>> 7); + bytes[at] = (byte) b; + sum += b; + this.hashcode += sum; + at += 1; + b = character & 0x7F; + bytes[at] = (byte) b; + sum += b; + this.hashcode += sum; + at += 1; + } else { + if (character >= 0xD800 && character <= 0xDBFF) { + i += 1; + character = (((character & 0x3FF) << 10) | (string + .charAt(i) & 0x3FF)) + 65536; + } + b = 0x80 | (character >>> 14); + bytes[at] = (byte) b; + sum += b; + this.hashcode += sum; + at += 1; + b = 0x80 | ((character >>> 7) & 0xFF); + bytes[at] = (byte) b; + sum += b; + this.hashcode += sum; + at += 1; + b = character & 0x7F; + bytes[at] = (byte) b; + sum += b; + this.hashcode += sum; + at += 1; + } + } + this.hashcode += sum << 16; + } + } + + /** + * Returns the character at the specified index. The index refers to byte + * values and ranges from 0 to length - 1. The index of the next character + * is at index + Kim.characterSize(kim.characterAt(index)). + * + * @param at the index of the char value. The first character is at 0. + * @return a Unicode character between 0 and 0x10FFFF. + * @throws JSONException if at does not point to a valid character. + */ + public int characterAt(int at) throws JSONException { + int c = get(at); + if ((c & 0x80) == 0) { + return c; + } + int character; + int c1 = get(at + 1); + if ((c1 & 0x80) == 0) { + character = ((c & 0x7F) << 7) | c1; + if (character > 0x7F) { + return character; + } + } else { + int c2 = get(at + 2); + character = ((c & 0x7F) << 14) | ((c1 & 0x7F) << 7) | c2; + if ((c2 & 0x80) == 0 && character > 0x3FFF && character <= 0x10FFFF + && (character < 0xD800 || character > 0xDFFF)) { + return character; + } + } + throw new JSONException("Bad character at " + at); + } + + /** + * Returns the number of bytes needed to contain the character in Kim + * format. + * + * @param character a Unicode character between 0 and 0x10FFFF. + * @return 1, 2, or 3 + * @throws JSONException if the character is not representable in a kim. + */ + public static int characterSize(int character) throws JSONException { + if (character < 0 || character > 0x10FFFF) { + throw new JSONException("Bad character " + character); + } + return character <= 0x7F ? 1 : character <= 0x3FFF ? 2 : 3; + } + + /** + * Copy the contents of this kim to a byte array. + * + * @param bytes A byte array of sufficient size. + * @param at The position within the byte array to take the byes. + * @return The position immediately after the copy. + */ + public int copy(byte[] bytes, int at) { + System.arraycopy(this.bytes, 0, bytes, at, this.length); + return at + this.length; + } + + /** + * Two kim objects containing exactly the same bytes in the same order are + * equal to each other. + * + * @param obj the other kim with which to compare. + * @return true if this and obj are both kim objects containing identical + * byte sequences. + */ + public boolean equals(Object obj) { + if (!(obj instanceof Kim)) { + return false; + } + Kim that = (Kim) obj; + if (this == that) { + return true; + } + if (this.hashcode != that.hashcode) { + return false; + } + return java.util.Arrays.equals(this.bytes, that.bytes); + } + + /** + * Get a byte from a kim. + * + * @param at The position of the byte. The first byte is at 0. + * @return The byte. + * @throws JSONException if there is no byte at that position. + */ + public int get(int at) throws JSONException { + if (at < 0 || at > this.length) { + throw new JSONException("Bad character at " + at); + } + return ((int) this.bytes[at]) & 0xFF; + } + + /** + * Returns a hash code value for the kim. + */ + public int hashCode() { + return this.hashcode; + } + + /** + * Produce a UTF-16 String from this kim. The number of codepoints in the + * string will not be greater than the number of bytes in the kim, although + * it could be less. + * + * @return The string. A kim memoizes its string representation. + * @throws JSONException if the kim is not valid. + */ + public String toString() throws JSONException { + if (this.string == null) { + int c; + int length = 0; + char chars[] = new char[this.length]; + for (int at = 0; at < this.length; at += characterSize(c)) { + c = this.characterAt(at); + if (c < 0x10000) { + chars[length] = (char) c; + length += 1; + } else { + chars[length] = (char) (0xD800 | ((c - 0x10000) >>> 10)); + length += 1; + chars[length] = (char) (0xDC00 | (c & 0x03FF)); + length += 1; + } + } + this.string = new String(chars, 0, length); + } + return this.string; + } +} diff --git a/src/main/java/org/json/Property.java b/src/main/java/org/json/Property.java new file mode 100644 index 0000000..9839d5d --- /dev/null +++ b/src/main/java/org/json/Property.java @@ -0,0 +1,75 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +import java.util.Enumeration; +import java.util.Iterator; +import java.util.Properties; + +/** + * Converts a Property file data into JSONObject and back. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class Property { + /** + * Converts a property file object into a JSONObject. The property file object is a table of name value pairs. + * + * @param properties java.util.Properties + * @return JSONObject + * @throws JSONException + */ + public static JSONObject toJSONObject(java.util.Properties properties) throws JSONException { + JSONObject jo = new JSONObject(); + if (properties != null && !properties.isEmpty()) { + Enumeration enumProperties = properties.propertyNames(); + while (enumProperties.hasMoreElements()) { + String name = (String) enumProperties.nextElement(); + jo.put(name, properties.getProperty(name)); + } + } + return jo; + } + + /** + * Converts the JSONObject into a property file object. + * + * @param jo JSONObject + * @return java.util.Properties + * @throws JSONException + */ + public static Properties toProperties(JSONObject jo) throws JSONException { + Properties properties = new Properties(); + if (jo != null) { + Iterator keys = jo.keys(); + while (keys.hasNext()) { + String name = keys.next(); + properties.put(name, jo.getString(name)); + } + } + return properties; + } +} diff --git a/src/main/java/org/json/XML.java b/src/main/java/org/json/XML.java new file mode 100644 index 0000000..9824dca --- /dev/null +++ b/src/main/java/org/json/XML.java @@ -0,0 +1,516 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +import java.util.Iterator; + +/** + * This provides static methods to convert an XML text into a JSONObject, + * and to covert a JSONObject into an XML text. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class XML { + + /** + * The Character '&'. + */ + public static final Character AMP = '&'; + + /** + * The Character '''. + */ + public static final Character APOS = '\''; + + /** + * The Character '!'. + */ + public static final Character BANG = '!'; + + /** + * The Character '='. + */ + public static final Character EQ = '='; + + /** + * The Character '>'. + */ + public static final Character GT = '>'; + + /** + * The Character '<'. + */ + public static final Character LT = '<'; + + /** + * The Character '?'. + */ + public static final Character QUEST = '?'; + + /** + * The Character '"'. + */ + public static final Character QUOT = '"'; + + /** + * The Character '/'. + */ + public static final Character SLASH = '/'; + + /** + * Replace special characters with XML escapes: + *

+     * & (ampersand) is replaced by &amp;
+     * < (less than) is replaced by &lt;
+     * > (greater than) is replaced by &gt;
+     * " (double quote) is replaced by &quot;
+     * 
+ * + * @param string The string to be escaped. + * @return The escaped string. + */ + public static String escape(String string) { + StringBuilder sb = new StringBuilder(string.length()); + for (int i = 0, length = string.length(); i < length; i++) { + char c = string.charAt(i); + switch (c) { + case '&': + sb.append("&"); + break; + case '<': + sb.append("<"); + break; + case '>': + sb.append(">"); + break; + case '"': + sb.append("""); + break; + case '\'': + sb.append("'"); + break; + default: + sb.append(c); + } + } + return sb.toString(); + } + + /** + * Throw an exception if the string contains whitespace. + * Whitespace is not allowed in tagNames and attributes. + * + * @param string A string. + * @throws JSONException + */ + public static void noSpace(String string) throws JSONException { + int i, length = string.length(); + if (length == 0) { + throw new JSONException("Empty string."); + } + for (i = 0; i < length; i += 1) { + if (Character.isWhitespace(string.charAt(i))) { + throw new JSONException("'" + string + + "' contains a space character."); + } + } + } + + /** + * Scan the content following the named tag, attaching it to the context. + * + * @param x The XMLTokener containing the source string. + * @param context The JSONObject that will include the new material. + * @param name The tag name. + * @return true if the close tag is processed. + * @throws JSONException + */ + private static boolean parse(XMLTokener x, JSONObject context, + String name) throws JSONException { + char c; + int i; + JSONObject jsonobject = null; + String string; + String tagName; + Object token; + +// Test for and skip past these forms: +// +// +// +// +// Report errors for these forms: +// <> +// <= +// << + + token = x.nextToken(); + +// "); + return false; + } + x.back(); + } else if (c == '[') { + token = x.nextToken(); + if ("CDATA".equals(token)) { + if (x.next() == '[') { + string = x.nextCDATA(); + if (string.length() > 0) { + context.accumulate("content", string); + } + return false; + } + } + throw x.syntaxError("Expected 'CDATA['"); + } + i = 1; + do { + token = x.nextMeta(); + if (token == null) { + throw x.syntaxError("Missing '>' after ' 0); + return false; + } else if (token == QUEST) { + +// "); + return false; + } else if (token == SLASH) { + +// Close tag + + } else if (token == SLASH) { + if (x.nextToken() != GT) { + throw x.syntaxError("Misshaped tag"); + } + if (jsonobject.length() > 0) { + context.accumulate(tagName, jsonobject); + } else { + context.accumulate(tagName, ""); + } + return false; + +// Content, between <...> and + + } else if (token == GT) { + for (; ; ) { + token = x.nextContent(); + if (token == null) { + if (tagName != null) { + throw x.syntaxError("Unclosed tag " + tagName); + } + return false; + } else if (token instanceof String) { + string = (String) token; + if (string.length() > 0) { + jsonobject.accumulate("content", + XML.stringToValue(string)); + } + +// Nested element + + } else if (token == LT) { + if (parse(x, jsonobject, tagName)) { + if (jsonobject.length() == 0) { + context.accumulate(tagName, ""); + } else if (jsonobject.length() == 1 && + jsonobject.opt("content") != null) { + context.accumulate(tagName, + jsonobject.opt("content")); + } else { + context.accumulate(tagName, jsonobject); + } + return false; + } + } + } + } else { + throw x.syntaxError("Misshaped tag"); + } + } + } + } + + + /** + * Try to convert a string into a number, boolean, or null. If the string + * can't be converted, return the string. This is much less ambitious than + * JSONObject.stringToValue, especially because it does not attempt to + * convert plus forms, octal forms, hex forms, or E forms lacking decimal + * points. + * + * @param string A String. + * @return A simple JSON value. + */ + public static Object stringToValue(String string) { + if ("true".equalsIgnoreCase(string)) { + return Boolean.TRUE; + } + if ("false".equalsIgnoreCase(string)) { + return Boolean.FALSE; + } + if ("null".equalsIgnoreCase(string)) { + return JSONObject.NULL; + } + +// If it might be a number, try converting it, first as a Long, and then as a +// Double. If that doesn't work, return the string. + + try { + char initial = string.charAt(0); + if (initial == '-' || (initial >= '0' && initial <= '9')) { + Long value = new Long(string); + if (value.toString().equals(string)) { + return value; + } + } + } catch (Exception ignore) { + try { + Double value = new Double(string); + if (value.toString().equals(string)) { + return value; + } + } catch (Exception ignoreAlso) { + } + } + return string; + } + + + /** + * Convert a well-formed (but not necessarily valid) XML string into a + * JSONObject. Some information may be lost in this transformation + * because JSON is a data format and XML is a document format. XML uses + * elements, attributes, and content text, while JSON uses unordered + * collections of name/value pairs and arrays of values. JSON does not + * does not like to distinguish between elements and attributes. + * Sequences of similar elements are represented as JSONArrays. Content + * text may be placed in a "content" member. Comments, prologs, DTDs, and + * <[ [ ]]> are ignored. + * + * @param string The source string. + * @return A JSONObject containing the structured data from the XML string. + * @throws JSONException + */ + public static JSONObject toJSONObject(String string) throws JSONException { + JSONObject jo = new JSONObject(); + XMLTokener x = new XMLTokener(string); + while (x.more() && x.skipPast("<")) { + parse(x, jo, null); + } + return jo; + } + + + /** + * Convert a JSONObject into a well-formed, element-normal XML string. + * + * @param object A JSONObject. + * @return A string. + * @throws JSONException + */ + public static String toString(Object object) throws JSONException { + return toString(object, null); + } + + + /** + * Convert a JSONObject into a well-formed, element-normal XML string. + * + * @param object A JSONObject. + * @param tagName The optional name of the enclosing tag. + * @return A string. + * @throws JSONException + */ + public static String toString(Object object, String tagName) + throws JSONException { + StringBuilder sb = new StringBuilder(); + int i; + JSONArray ja; + JSONObject jo; + String key; + Iterator keys; + int length; + String string; + Object value; + if (object instanceof JSONObject) { + +// Emit + + if (tagName != null) { + sb.append('<'); + sb.append(tagName); + sb.append('>'); + } + +// Loop thru the keys. + + jo = (JSONObject) object; + keys = jo.keys(); + while (keys.hasNext()) { + key = keys.next(); + value = jo.opt(key); + if (value == null) { + value = ""; + } + string = value instanceof String ? (String) value : null; + +// Emit content in body + + if ("content".equals(key)) { + if (value instanceof JSONArray) { + ja = (JSONArray) value; + length = ja.length(); + for (i = 0; i < length; i += 1) { + if (i > 0) { + sb.append('\n'); + } + sb.append(escape(ja.get(i).toString())); + } + } else { + sb.append(escape(value.toString())); + } + +// Emit an array of similar keys + + } else if (value instanceof JSONArray) { + ja = (JSONArray) value; + length = ja.length(); + for (i = 0; i < length; i += 1) { + value = ja.get(i); + if (value instanceof JSONArray) { + sb.append('<'); + sb.append(key); + sb.append('>'); + sb.append(toString(value)); + sb.append("'); + } else { + sb.append(toString(value, key)); + } + } + } else if ("".equals(value)) { + sb.append('<'); + sb.append(key); + sb.append("/>"); + +// Emit a new tag + + } else { + sb.append(toString(value, key)); + } + } + if (tagName != null) { + +// Emit the close tag + + sb.append("'); + } + return sb.toString(); + +// XML does not have good support for arrays. If an array appears in a place +// where XML is lacking, synthesize an element. + + } else { + if (object.getClass().isArray()) { + object = new JSONArray(object); + } + if (object instanceof JSONArray) { + ja = (JSONArray) object; + length = ja.length(); + for (i = 0; i < length; i += 1) { + sb.append(toString(ja.opt(i), tagName == null ? "array" : tagName)); + } + return sb.toString(); + } else { + string = (object == null) ? "null" : escape(object.toString()); + return (tagName == null) ? "\"" + string + "\"" : + (string.length() == 0) ? "<" + tagName + "/>" : + "<" + tagName + ">" + string + ""; + } + } + } +} diff --git a/src/main/java/org/json/XMLTokener.java b/src/main/java/org/json/XMLTokener.java new file mode 100644 index 0000000..79ee754 --- /dev/null +++ b/src/main/java/org/json/XMLTokener.java @@ -0,0 +1,373 @@ +package org.json; + +/* +Copyright (c) 2002 JSON.org + +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. +*/ + +/** + * The XMLTokener extends the JSONTokener to provide additional methods + * for the parsing of XML texts. + * + * @author JSON.org + * @version 2014-05-03 + */ +public class XMLTokener extends JSONTokener { + + + /** + * The table of entity values. It initially contains Character values for + * amp, apos, gt, lt, quot. + */ + public static final java.util.HashMap entity; + + static { + entity = new java.util.HashMap(8); + entity.put("amp", XML.AMP); + entity.put("apos", XML.APOS); + entity.put("gt", XML.GT); + entity.put("lt", XML.LT); + entity.put("quot", XML.QUOT); + } + + /** + * Construct an XMLTokener from a string. + * + * @param s A source string. + */ + public XMLTokener(String s) { + super(s); + } + + /** + * Get the text in the CDATA block. + * + * @return The string up to the ]]>. + * @throws JSONException If the ]]> is not found. + */ + public String nextCDATA() throws JSONException { + char c; + int i; + StringBuilder sb = new StringBuilder(); + for (; ; ) { + c = next(); + if (end()) { + throw syntaxError("Unclosed CDATA"); + } + sb.append(c); + i = sb.length() - 3; + if (i >= 0 && sb.charAt(i) == ']' && + sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') { + sb.setLength(i); + return sb.toString(); + } + } + } + + + /** + * Get the next XML outer token, trimming whitespace. There are two kinds + * of tokens: the '<' character which begins a markup tag, and the content + * text between markup tags. + * + * @return A string, or a '<' Character, or null if there is no more + * source text. + * @throws JSONException + */ + public Object nextContent() throws JSONException { + char c; + StringBuilder sb; + do { + c = next(); + } while (Character.isWhitespace(c)); + if (c == 0) { + return null; + } + if (c == '<') { + return XML.LT; + } + sb = new StringBuilder(); + for (; ; ) { + if (c == '<' || c == 0) { + back(); + return sb.toString().trim(); + } + if (c == '&') { + sb.append(nextEntity(c)); + } else { + sb.append(c); + } + c = next(); + } + } + + + /** + * Return the next entity. These entities are translated to Characters: + * & ' > < ". + * + * @param ampersand An ampersand character. + * @return A Character or an entity String if the entity is not recognized. + * @throws JSONException If missing ';' in XML entity. + */ + public Object nextEntity(char ampersand) throws JSONException { + StringBuilder sb = new StringBuilder(); + for (; ; ) { + char c = next(); + if (Character.isLetterOrDigit(c) || c == '#') { + sb.append(Character.toLowerCase(c)); + } else if (c == ';') { + break; + } else { + throw syntaxError("Missing ';' in XML entity: &" + sb); + } + } + String string = sb.toString(); + Object object = entity.get(string); + return object != null ? object : ampersand + string + ";"; + } + + + /** + * Returns the next XML meta token. This is used for skipping over + * and structures. + * + * @return Syntax characters (< > / = ! ?) are returned as + * Character, and strings and names are returned as Boolean. We don't care + * what the values actually are. + * @throws JSONException If a string is not properly closed or if the XML + * is badly structured. + */ + public Object nextMeta() throws JSONException { + char c; + char q; + do { + c = next(); + } while (Character.isWhitespace(c)); + switch (c) { + case 0: + throw syntaxError("Misshaped meta tag"); + case '<': + return XML.LT; + case '>': + return XML.GT; + case '/': + return XML.SLASH; + case '=': + return XML.EQ; + case '!': + return XML.BANG; + case '?': + return XML.QUEST; + case '"': + case '\'': + q = c; + for (; ; ) { + c = next(); + if (c == 0) { + throw syntaxError("Unterminated string"); + } + if (c == q) { + return Boolean.TRUE; + } + } + default: + for (; ; ) { + c = next(); + if (Character.isWhitespace(c)) { + return Boolean.TRUE; + } + switch (c) { + case 0: + case '<': + case '>': + case '/': + case '=': + case '!': + case '?': + case '"': + case '\'': + back(); + return Boolean.TRUE; + } + } + } + } + + + /** + * Get the next XML Token. These tokens are found inside of angle + * brackets. It may be one of these characters: / > = ! ? or it + * may be a string wrapped in single quotes or double quotes, or it may be a + * name. + * + * @return a String or a Character. + * @throws JSONException If the XML is not well formed. + */ + public Object nextToken() throws JSONException { + char c; + char q; + StringBuilder sb; + do { + c = next(); + } while (Character.isWhitespace(c)); + switch (c) { + case 0: + throw syntaxError("Misshaped element"); + case '<': + throw syntaxError("Misplaced '<'"); + case '>': + return XML.GT; + case '/': + return XML.SLASH; + case '=': + return XML.EQ; + case '!': + return XML.BANG; + case '?': + return XML.QUEST; + +// Quoted string + + case '"': + case '\'': + q = c; + sb = new StringBuilder(); + for (; ; ) { + c = next(); + if (c == 0) { + throw syntaxError("Unterminated string"); + } + if (c == q) { + return sb.toString(); + } + if (c == '&') { + sb.append(nextEntity(c)); + } else { + sb.append(c); + } + } + default: + +// Name + + sb = new StringBuilder(); + for (; ; ) { + sb.append(c); + c = next(); + if (Character.isWhitespace(c)) { + return sb.toString(); + } + switch (c) { + case 0: + return sb.toString(); + case '>': + case '/': + case '=': + case '!': + case '?': + case '[': + case ']': + back(); + return sb.toString(); + case '<': + case '"': + case '\'': + throw syntaxError("Bad character in a name"); + } + } + } + } + + + /** + * Skip characters until past the requested string. + * If it is not found, we are left at the end of the source with a result of false. + * + * @param to A string to skip past. + * @throws JSONException + */ + public boolean skipPast(String to) throws JSONException { + boolean b; + char c; + int i; + int j; + int offset = 0; + int length = to.length(); + char[] circle = new char[length]; + + /* + * First fill the circle buffer with as many characters as are in the + * to string. If we reach an early end, bail. + */ + + for (i = 0; i < length; i += 1) { + c = next(); + if (c == 0) { + return false; + } + circle[i] = c; + } + + /* We will loop, possibly for all of the remaining characters. */ + + for (; ; ) { + j = offset; + b = true; + + /* Compare the circle buffer with the to string. */ + + for (i = 0; i < length; i += 1) { + if (circle[j] != to.charAt(i)) { + b = false; + break; + } + j += 1; + if (j >= length) { + j -= length; + } + } + + /* If we exit the loop with b intact, then victory is ours. */ + + if (b) { + return true; + } + + /* Get the next character. If there isn't one, then defeat is ours. */ + + c = next(); + if (c == 0) { + return false; + } + /* + * Shove the character in the circle buffer and advance the + * circle offset. The offset is mod n. + */ + circle[offset] = c; + offset += 1; + if (offset >= length) { + offset -= length; + } + } + } +} diff --git a/src/net/aksingh/java/api/owm/AbstractWeatherData.java b/src/net/aksingh/java/api/owm/AbstractWeatherData.java deleted file mode 100644 index 4d8038e..0000000 --- a/src/net/aksingh/java/api/owm/AbstractWeatherData.java +++ /dev/null @@ -1,760 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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) { - /* - @bugfix It always return "Sat Jan 17 04:10:42 CET 1970" - Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime - Incorrect: this.dateTime = new Date(sec); - Correct: this.dateTime = new Date(sec * 1000); - Reason: Date requires milliseconds but previously, seconds were provided. - */ - this.dateTime = new Date(sec * 1000); - } 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 deleted file mode 100644 index 004f6b6..0000000 --- a/src/net/aksingh/java/api/owm/CurrentWeatherData.java +++ /dev/null @@ -1,722 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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) { - /* - @bugfix Incorrect date and time - Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime - Incorrect: this.sunrise = new Date(sr_secs); - Correct: this.sunrise = new Date(sr_secs * 1000); - Reason: Date requires milliseconds but previously, seconds were provided. - */ - this.sunrise = new Date(sr_secs * 1000); - } else { - this.sunrise = null; - } - - long ss_secs = jsonObj.optLong(this.JSON_SYS_SUNSET, Long.MIN_VALUE); - if (ss_secs != Long.MIN_VALUE) { - /* - @bugfix Incorrect date and time - Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime - Incorrect: this.sunrise = new Date(ss_secs); - Correct: this.sunrise = new Date(ss_secs * 1000); - Reason: Date requires milliseconds but previously, seconds were provided. - */ - this.sunset = new Date(ss_secs * 1000); - } 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 deleted file mode 100644 index cda1647..0000000 --- a/src/net/aksingh/java/api/owm/DailyForecastData.java +++ /dev/null @@ -1,833 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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"; - /** - * Key for JSON variable Rain precipitation - */ - private final String JSON_FORECAST_RAIN = "rain"; - /** - * Key for JSON variable Snow precipitation - */ - private final String JSON_FORECAST_SNOW = "snow"; - - /** - * 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; - /** - * Precipitation of rain in mm. - */ - private final float rain; - /** - * Precipitation of snow in mm. - */ - private final float snow; - - 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.rain = Float.NaN; - this.snow = 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; - this.rain = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_RAIN, Double.NaN) : Float.NaN; - this.snow = (jsonObj != null) ? (float) jsonObj.optDouble(this.JSON_FORECAST_SNOW, 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 boolean hasRain() { - return (this.rain != Float.NaN); - } - - public boolean hasSnow() { - return (this.snow != 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; - } - - public float getRain() { - return this.rain; - } - - public float getSnow() { - return this.snow; - } - - // 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 deleted file mode 100644 index 2a14354..0000000 --- a/src/net/aksingh/java/api/owm/ForecastWeatherData.java +++ /dev/null @@ -1,878 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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 deleted file mode 100644 index 32f8810..0000000 --- a/src/net/aksingh/java/api/owm/OpenWeatherMap.java +++ /dev/null @@ -1,548 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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 java.net.URLEncoder; -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 { - - private static final String ENCODING = "UTF-8"; - - 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 response; - - String address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) + "&" - + 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(address); - - return response; - } - - public String currentWeatherByCityName(String cityName, String countryCode) - throws MalformedURLException, IOException { - String address; - String response; - - address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_CURRENT_WEATHER.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) - + "," + 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(address); - - return response; - } - - public String currentWeatherByCityCode(long cityCode) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - return response; - } - - public String currentWeatherByCoordinates(float latitude, float longitude) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - return response; - } - - public String forecastWeatherByCityName(String cityName) - throws MalformedURLException, IOException { - String address; - String response; - - address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) + "&" - + 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(address); - - return response; - } - - public String forecastWeatherByCityName(String cityName, String countryCode) - throws MalformedURLException, IOException { - String address; - String response; - - address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_FORECAST_WEATHER.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) - + "," + 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(address); - - return response; - } - - public String forecastWeatherByCityCode(long cityCode) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - return response; - } - - public String forecastWeatherByCoordinates(float latitude, float longitude) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - return response; - } - - public String dailyForecastByCityName(String cityName, byte count) - throws MalformedURLException, IOException { - String address; - String response; - - address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) + "&" - + 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(address); - - return response; - } - - public String dailyForecastByCityName(String cityName, String countryCode, byte count) - throws MalformedURLException, IOException { - String address; - String response; - - address = OWM_URL.BASE_URL.getParameter() - + OWM_URL.PARAMETER_DAILY_FORECAST.getParameter() - + OWM_URL.PARAMETER_CITY_NAME.getParameter() - + URLEncoder.encode(cityName, ENCODING) - + "," + 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(address); - - return response; - } - - public String dailyForecastByCityCode(long cityCode, byte count) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - return response; - } - - public String dailyForecastByCoordinates(float latitude, float longitude, byte count) - throws MalformedURLException, IOException { - String address; - String response; - - address = 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(address); - - 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 deleted file mode 100644 index 40a480c..0000000 --- a/src/net/aksingh/java/api/owm/Tools.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2013-2014 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 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, - * 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 2014-07-01 - * @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 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. - *

- * @param degree

- * @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; - } - } -} diff --git a/src/test/java/net/aksingh/owmjapis/CurrentWeatherTest.java b/src/test/java/net/aksingh/owmjapis/CurrentWeatherTest.java new file mode 100644 index 0000000..8179ebc --- /dev/null +++ b/src/test/java/net/aksingh/owmjapis/CurrentWeatherTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import java.io.IOException; + +/** + *

+ * Tests the CurrentWeather's functionality. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/26 + * @since 2.5.0.3 + */ +public class CurrentWeatherTest { + + public static void main(String[] args) throws IOException { + OpenWeatherMap owm = new OpenWeatherMap(""); + CurrentWeather cw = owm.currentWeatherByCityName("London, UK"); + + if (!cw.isValid()) { + System.out.println("Reponse is inValid!"); + } else { + System.out.println("Reponse is Valid!"); + } + } +} diff --git a/src/test/java/net/aksingh/owmjapis/DailyForecastTest.java b/src/test/java/net/aksingh/owmjapis/DailyForecastTest.java new file mode 100644 index 0000000..4ab63f1 --- /dev/null +++ b/src/test/java/net/aksingh/owmjapis/DailyForecastTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import java.io.IOException; + +/** + *

+ * Tests the HourlyForecast's functionality. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/27 + * @since 2.5.0.3 + */ +public class DailyForecastTest { + + public static void main(String[] args) throws IOException { + OpenWeatherMap owm = new OpenWeatherMap(""); + DailyForecast dailyForecast = owm.dailyForecastByCityName("London, UK", Byte.parseByte("5")); + + if (!dailyForecast.isValid()) { + System.out.println("Reponse is inValid!"); + } else { + System.out.println("Reponse is Valid!"); + } + } +} diff --git a/src/test/java/net/aksingh/owmjapis/HourlyForecastTest.java b/src/test/java/net/aksingh/owmjapis/HourlyForecastTest.java new file mode 100644 index 0000000..0400536 --- /dev/null +++ b/src/test/java/net/aksingh/owmjapis/HourlyForecastTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013-2014 Ashutosh Kumar Singh + * + * 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 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.owmjapis; + +import java.io.IOException; + +/** + *

+ * Tests the HourlyForecast's functionality. + *

+ * + * @author Ashutosh Kumar Singh + * @version 2014/12/27 + * @since 2.5.0.3 + */ +public class HourlyForecastTest { + + public static void main(String[] args) throws IOException { + OpenWeatherMap owm = new OpenWeatherMap(""); + HourlyForecast hourlyForecast = owm.hourlyForecastByCityName("London, UK"); + + if (!hourlyForecast.isValid()) { + System.out.println("Reponse is inValid!"); + } else { + System.out.println("Reponse is Valid!"); + } + } +}