]> git.basschouten.com Git - openhab-addons.git/blob
a12a9e6604d93df887d7b6b5696e3302232abe96
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.synopanalyzer.internal.synop;
14
15 import java.util.List;
16
17 import com.google.gson.annotations.SerializedName;
18
19 /**
20  * The {@link StationDB} creates is a DTO for stations.json database.
21  *
22  * @author GaĆ«l L'hopital - Initial Contribution
23  */
24 public class StationDB {
25     public class Station {
26         public String country;
27         public String pack;
28         @SerializedName("id_omm")
29         public int idOmm;
30         @SerializedName("numer_sta")
31         public long numerSta;
32         @SerializedName("usual_name")
33         public String usualName;
34         public double latitude;
35         public double longitude;
36         public double elevation;
37         @SerializedName("station_type")
38         public int stationType;
39
40         public String getLocation() {
41             return Double.toString(latitude) + "," + Double.toString(longitude);
42         }
43     }
44
45     public List<Station> stations;
46 }