]> git.basschouten.com Git - openhab-addons.git/blob
ccb5648e1f96c01e0f1b77574e1b0fea59decda5
[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.boschindego.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Translates from tool number to model names.
19  *
20  * @author Jacob Laursen - Initial contribution
21  */
22 @NonNullByDefault
23 public class IndegoTypeDatabase {
24
25     /**
26      * Return tool name from tool type number.
27      *
28      * @see https://www.boschtoolservice.com/gb/en/boschdiy/spareparts/search-results?q=Indego
29      *
30      * @param toolTypeNumber condensed tool type number, e.g. "3600HA2200" rather than "3 600 HA2 200".
31      * @return tool type name
32      */
33     public static String nameFromTypeNumber(String toolTypeNumber) {
34         String name = switch (toolTypeNumber) {
35             case "3600HA2103" -> "800";
36             case "3600HA2104" -> "850";
37             case "3600HA2200", "3600HA2201" -> "1300";
38             case "3600HA2300" -> "1000 Connect";
39             case "3600HA2301" -> "1200 Connect";
40             case "3600HA2302" -> "1100 Connect";
41             case "3600HA2303" -> "13C";
42             case "3600HA2304" -> "10C";
43             case "3600HB0000" -> "350";
44             case "3600HB0001" -> "400";
45             case "3600HB0004" -> "XS 300";
46             case "3600HB0006" -> "350";
47             case "3600HB0007" -> "400";
48             case "3600HB0100" -> "350 Connect";
49             case "3600HB0101" -> "400 Connect";
50             case "3600HB0102" -> "S+ 350";
51             case "3600HB0103" -> "S+ 400";
52             case "3600HB0105" -> "S+ 350";
53             case "3600HB0106" -> "S+ 400";
54             case "3600HB0201" -> "M";
55             case "3600HB0202" -> "S 500";
56             case "3600HB0203" -> "M 700";
57             case "3600HB0301" -> "M+";
58             case "3600HB0302" -> "S+ 500";
59             case "3600HB0303" -> "M+ 700";
60             default -> "";
61         };
62
63         return (name.isEmpty() ? "Indego" : "Indego " + name);
64     }
65 }