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.kvv.internal;
15 import java.util.Arrays;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
22 * The {@link KVVBindingConstants} class defines common constants, which are
23 * used across the whole binding.
25 * @author Maximilian Hess - Initial contribution
28 public class KVVBindingConstants {
30 private static final String BINDING_ID = "kvv";
32 /** the thing type of the bridges */
33 public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
35 /** the thing type of the stop */
36 public static final ThingTypeUID THING_TYPE_STOP = new ThingTypeUID(BINDING_ID, "stop");
38 /** all of the supported types */
39 public static final List<ThingTypeUID> SUPPORTED_THING_TYPES = Arrays.asList(THING_TYPE_BRIDGE, THING_TYPE_STOP);
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";
44 /** timeout for API calls in seconds */
45 public static final int TIMEOUT_IN_SECONDS = 10;
47 /** default value to initialize the API cache */
48 public static final int CACHE_DEFAULT_UPDATEINTERVAL = 10;