]> git.basschouten.com Git - openhab-addons.git/blob
0cd364fffbd2fb075f33367507b060b1580764ee
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.weatherunderground.internal.json;
14
15 import java.net.URL;
16
17 /**
18  * The {@link WeatherUndergroundJsonLocation} is the Java class used
19  * to map the entry "location" from the JSON response to a Weather
20  * Underground request.
21  *
22  * @author Laurent Garnier - Initial contribution
23  */
24 public class WeatherUndergroundJsonLocation {
25
26     // Commented members indicate properties returned by the API not used by the binding
27
28     private String type;
29     private String country;
30     private String country_iso3166;
31     private String country_name;
32     private String state;
33     private String city;
34     private String tz_short;
35     private String tz_long;
36     private String lat;
37     private String lon;
38     private String zip;
39     private String magic;
40     private String wmo;
41     private String l;
42     private String requesturl;
43     private String wuiurl;
44     // private Object nearby_weather_stations;
45
46     public WeatherUndergroundJsonLocation() {
47     }
48
49     public String getType() {
50         return type;
51     }
52
53     public String getCountry() {
54         return country;
55     }
56
57     public String getCountryIso3166() {
58         return country_iso3166;
59     }
60
61     public String getCountryName() {
62         return country_name;
63     }
64
65     public String getState() {
66         return state;
67     }
68
69     public String getCity() {
70         return city;
71     }
72
73     public String getTzShort() {
74         return tz_short;
75     }
76
77     public String getTzLong() {
78         return tz_long;
79     }
80
81     public String getLat() {
82         return lat;
83     }
84
85     public String getLon() {
86         return lon;
87     }
88
89     public String getZip() {
90         return zip;
91     }
92
93     public String getMagic() {
94         return magic;
95     }
96
97     public String getWmo() {
98         return wmo;
99     }
100
101     public String getL() {
102         return l;
103     }
104
105     public URL getRequesturl() {
106         return WeatherUndergroundJsonUtils.getValidUrl(requesturl);
107     }
108
109     public URL getWuiurl() {
110         return WeatherUndergroundJsonUtils.getValidUrl(wuiurl);
111     }
112 }