2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.coronastats.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link CoronaStatsBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Johannes Ott - Initial contribution
30 public class CoronaStatsBindingConstants {
31 public static final String BINDING_ID = "coronastats";
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)";
39 public static final ThingTypeUID THING_TYPE_COUNTRY = new ThingTypeUID(BINDING_ID, "country");
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())
50 public static final String PROPERTY_COUNTRY = "country";
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";