2 * Copyright (c) 2010-2021 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.xmltv.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 XmlTVBindingConstants} class defines common constants, which are
25 * used across the whole binding.
27 * @author Gaƫl L'hopital - Initial contribution
30 public class XmlTVBindingConstants {
32 private static final String BINDING_ID = "xmltv";
34 // List of all Bridge Type UIDs
35 public static final ThingTypeUID XMLTV_FILE_BRIDGE_TYPE = new ThingTypeUID(BINDING_ID, "xmltvfile");
36 public static final ThingTypeUID XMLTV_CHANNEL_THING_TYPE = new ThingTypeUID(BINDING_ID, "channel");
39 public static final String GROUP_CURRENT_PROGRAMME = "currentprog";
40 public static final String GROUP_NEXT_PROGRAMME = "nextprog";
41 public static final String GROUP_CHANNEL_PROPERTIES = "channelprops";
43 // List of all Channel ids
44 public static final String CHANNEL_CHANNEL_URL = "iconUrl";
45 public static final String CHANNEL_ICON = "icon";
47 public static final String CHANNEL_PROGRAMME_START = "progStart";
48 public static final String CHANNEL_PROGRAMME_END = "progEnd";
49 public static final String CHANNEL_PROGRAMME_TITLE = "progTitle";
50 public static final String CHANNEL_PROGRAMME_CATEGORY = "progCategory";
51 public static final String CHANNEL_PROGRAMME_ICON = "progIconUrl";
53 public static final String CHANNEL_PROGRAMME_ELAPSED = "elapsedTime";
54 public static final String CHANNEL_PROGRAMME_REMAINING = "remainingTime";
55 public static final String CHANNEL_PROGRAMME_PROGRESS = "progress";
56 public static final String CHANNEL_PROGRAMME_TIMELEFT = "timeLeft";
58 // Supported Thing types
59 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
60 .unmodifiableSet(Stream.of(XMLTV_FILE_BRIDGE_TYPE, XMLTV_CHANNEL_THING_TYPE).collect(Collectors.toSet()));