]> git.basschouten.com Git - openhab-addons.git/blob
960c637577639696b86ac45d609791217db52a00
[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.kvv.internal;
14
15 import java.util.Arrays;
16 import java.util.List;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link KVVBindingConstants} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Maximilian Hess - Initial contribution
26  */
27 @NonNullByDefault
28 public class KVVBindingConstants {
29
30     private static final String BINDING_ID = "kvv";
31
32     /** the thing type of the bridges */
33     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
34
35     /** the thing type of the stop */
36     public static final ThingTypeUID THING_TYPE_STOP = new ThingTypeUID(BINDING_ID, "stop");
37
38     /** all of the supported types */
39     public static final List<ThingTypeUID> SUPPORTED_THING_TYPES = Arrays.asList(THING_TYPE_BRIDGE, THING_TYPE_STOP);
40
41     /** URL of the KVV API */
42     public static final String API_FORMAT = "https://projekte.kvv-efa.de/sl3-alone/XSLT_DM_REQUEST?outputFormat=JSON&coordOutputFormat=WGS84%%5Bdd.ddddd%%5D&depType=stopEvents&locationServerActive=1&mode=direct&name_dm=%s&type_dm=stop&useOnlyStops=1&useRealtime=1&limit=%d";
43
44     /** timeout for API calls in seconds */
45     public static final int TIMEOUT_IN_SECONDS = 10;
46
47     /** default value to initialize the API cache */
48     public static final int CACHE_DEFAULT_UPDATEINTERVAL = 10;
49 }