]> git.basschouten.com Git - openhab-addons.git/blob
c9f60e8cfddead7d6aa8d9b59dd0c1e1581f43cb
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.xmltv.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 XmlTVBindingConstants} class defines common constants, which are
25  * used across the whole binding.
26  *
27  * @author GaĆ«l L'hopital - Initial contribution
28  */
29 @NonNullByDefault
30 public class XmlTVBindingConstants {
31
32     private static final String BINDING_ID = "xmltv";
33
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");
37
38     // Channel groups
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";
42
43     // List of all Channel ids
44     public static final String CHANNEL_CHANNEL_URL = "iconUrl";
45     public static final String CHANNEL_ICON = "icon";
46
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";
52
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";
57
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()));
61 }