]> git.basschouten.com Git - openhab-addons.git/blob
01b9aa7cba252da98aa25c9b26148c4b423ec981
[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.weathercompany.internal.model;
14
15 /**
16  * The {@link ForecastDTO} is the JSON object that contains the n-day forecast.
17  *
18  * The daypart object as well as the temperatureMax field OUTSIDE of the daypart object will
19  * appear as null in the API after 3:00pm Local Apparent Time.
20  *
21  * Standard HTTP Cache-Control headers are used to define caching length. The TTL value is
22  * provided in the HTTP Header as an absolute time value using the “Expires” parameter.
23  * Example: “Expires: Fri, 12 Jul 2013 12:00:00 GMT”. The response provides a data element
24  * expirationTimeUtc, this should be used to expire and remove a record from your system
25  *
26  * Translated fields:
27  * - dayOfWeek
28  * - daypartName
29  * - moonPhase
30  * - narrative
31  * - qualifierPhrase
32  * - uvDescription
33  * - windDirectionCardinal
34  * - windPhrase
35  * - wxPhraseLong
36  *
37  * @author Mark Hilbush - Initial contribution
38  */
39 public class ForecastDTO {
40     /*
41      * Day of week
42      */
43     public String[] dayOfWeek;
44
45     /*
46      * For the purposes of this product day(D) = 7am to 7pm and night(N) = 7pm to 7am
47      */
48     public Object daypart;
49
50     /*
51      * The narrative forecast for the 24-hour period.
52      */
53     public String[] narrative;
54
55     /*
56      * Daily maximum temperature
57      */
58     public Double[] temperatureMax;
59
60     /*
61      * Daily minimum temperature
62      */
63     public Double[] temperatureMin;
64
65     /*
66      * The forecasted measurable precipitation (liquid or liquid equivalent) during 12 or 24 hour period.
67      */
68     public Double[] qpf;
69
70     /*
71      * The forecasted measurable precipitation as snow during the 12 or 24 hour forecast period.
72      */
73     public Double[] qpfSnow;
74
75     /*
76      * Time forecast is valid in local apparent time.
77      * ISO 8601 - YYYY-MM-DDTHH:MM:SS-NNNN; NNNN=GMT offset
78      */
79     public String[] validTimeLocal;
80
81     /*
82      * Time forecast is valid in UNIX seconds
83      */
84     public Integer[] validTimeUtc;
85
86     /*
87      * Expiration time in UNIX seconds
88      */
89     public Integer[] expirationTimeUtc;
90
91     /*
92      * The local time of the sunrise. It reflects any local daylight savings conventions.
93      * For a few Arctic and Antarctic regions, the Sunrise and Sunset data values may be the
94      * same (each with a value of 12:01am) to reflect conditions where a sunrise or sunset does not occur.
95      * ISO 8601 - YYYY-MM-DDTHH:MM:SS-NNNN; NNNN=GMT offset
96      */
97     public String[] sunriseTimeLocal;
98
99     /*
100      * Sunrise time in UNIX epoch value
101      */
102     public Integer[] sunriseTimeUtc;
103
104     /*
105      * The local time of the sunset. It reflects any local daylight savings conventions.
106      * For a few Arctic and Antarctic regions, the Sunrise and Sunset data values may be the
107      * same (each with a value of 12:01am) to reflect conditions where a sunrise or sunset does not occur.
108      * ISO 8601 - YYYY-MM-DDTHH:MM:SS-NNNN; NNNN=GMT offset
109      */
110     public String[] sunsetTimeLocal;
111
112     /*
113      * Sunset time in UNIX epoch value
114      */
115     public Integer[] sunsetTimeUtc;
116
117     /*
118      * Description phrase for the current lunar phase
119      */
120     public String[] moonPhase;
121
122     /*
123      * 3 character short code for lunar phases WNG, WXC, FQ, WNC, LQ, F, WXG, N()
124      */
125     public String[] moonPhaseCode;
126
127     /*
128      * Day number within monthly lunar cycle
129      */
130     public Integer[] moonPhaseDay;
131
132     /*
133      * First moonrise in local time. It reflects daylight savings time conventions
134      * ISO 8601 - YYYY-MM-DDTHH:MM:SS-NNNN; NNNN=GMT offset
135      */
136     public String[] moonriseTimeLocal;
137
138     /*
139      * Moonrise time in UNIX epoch value
140      */
141     public Integer[] moonriseTimeUtc;
142
143     /*
144      * First Moonset in local time. It reflects daylight savings time conventions
145      * ISO 8601 - YYYY-MM-DDTHH:MM:SS-NNNN; NNNN=GMT offset
146      */
147     public String[] moonSetTimeLocal;
148
149     /*
150      * Moonset time in UNIX epoch value
151      */
152     public Integer[] moonsetTimeUtc;
153 }