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