]> git.basschouten.com Git - openhab-addons.git/blob
971737fc82b9cf05e58b1ac7d1fa21e7fac1953d
[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.coronastats.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
22
23 /**
24  * The {@link CoronaStatsBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author Johannes Ott - Initial contribution
28  */
29 @NonNullByDefault
30 public class CoronaStatsBindingConstants {
31     public static final String BINDING_ID = "coronastats";
32
33     // World
34     public static final ThingTypeUID THING_TYPE_WORLD = new ThingTypeUID(BINDING_ID, "world");
35     public static final String STATS = "stats";
36     public static final String WORLD_LABEL = "Corona Statistics (World)";
37
38     // Country
39     public static final ThingTypeUID THING_TYPE_COUNTRY = new ThingTypeUID(BINDING_ID, "country");
40
41     // @formatter:off
42     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = 
43         Collections.unmodifiableSet(Stream
44             .of(THING_TYPE_WORLD, THING_TYPE_COUNTRY)
45             .collect(Collectors.toSet())
46         );
47     // @formatter:on
48
49     // Properties country
50     public static final String PROPERTY_COUNTRY = "country";
51
52     // Channels world/country
53     public static final String CHANNEL_CASES = "cases";
54     public static final String CHANNEL_NEW_CASES = "today_cases";
55     public static final String CHANNEL_DEATHS = "deaths";
56     public static final String CHANNEL_NEW_DEATHS = "today_deaths";
57     public static final String CHANNEL_RECOVERED = "recovered";
58     public static final String CHANNEL_ACTIVE = "active";
59     public static final String CHANNEL_CRITICAL = "critical";
60     public static final String CHANNEL_TESTS = "tests";
61     public static final String CHANNEL_UPDATED = "updated";
62 }