]> git.basschouten.com Git - openhab-addons.git/blob
41b294d4385a4ecfd9ad2d5b745c7c30f076884f
[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.onebusaway.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17
18 /**
19  * The {@link OneBusAwayBindingConstants} class defines common constants, which are
20  * used across the whole binding.
21  *
22  * @author Shawn Wilsher - Initial contribution
23  */
24 @NonNullByDefault
25 public class OneBusAwayBindingConstants {
26
27     public static final String BINDING_ID = "onebusaway";
28
29     // Things
30     public static final ThingTypeUID THING_TYPE_API = new ThingTypeUID(BINDING_ID, "api");
31     public static final ThingTypeUID THING_TYPE_ROUTE = new ThingTypeUID(BINDING_ID, "route");
32     public static final ThingTypeUID THING_TYPE_STOP = new ThingTypeUID(BINDING_ID, "stop");
33
34     // Channel IDs
35     public static final String CHANNEL_ID_ARRIVAL = "arrival";
36     public static final String CHANNEL_ID_DEPARTURE = "departure";
37     public static final String CHANNEL_ID_UPDATE = "update";
38
39     // Events
40     public static final String EVENT_ARRIVAL = "ARRIVAL";
41     public static final String EVENT_DEPARTURE = "DEPARTURE";
42
43     // Event channel IDs
44     public static final String EVENT_CHANNEL_ID_ARRIVAL = "arrivalDeparture#event";
45
46     // Channel configs
47     public static final String CHANNEL_CONFIG_OFFSET = "offset";
48
49     // API configs
50     public static final String API_CONFIG_API_KEY = "apiKey";
51     public static final String API_CONFIG_API_SERVER = "apiServer";
52
53     // Route configs
54     public static final String ROUTE_CONFIG_ROUTE_ID = "routeId";
55
56     // Stop configs
57     public static final String STOP_CONFIG_ID = "stopId";
58     public static final String STOP_CONFIG_INTERVAL = "interval";
59
60     // Route properties
61     public static final String ROUTE_PROPERTY_HEADSIGN = "headsign";
62     public static final String ROUTE_PROPERTY_LONG_NAME = "longName";
63     public static final String ROUTE_PROPERTY_SHORT_NAME = "shortName";
64 }