]> git.basschouten.com Git - openhab-addons.git/blob
c8edfc601c6e000d5aec9e7476b03683073c6d02
[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.xmltv.internal.jaxb;
14
15 import java.util.ArrayList;
16 import java.util.List;
17
18 import javax.xml.bind.annotation.XmlAccessType;
19 import javax.xml.bind.annotation.XmlAccessorType;
20 import javax.xml.bind.annotation.XmlAttribute;
21 import javax.xml.bind.annotation.XmlElement;
22 import javax.xml.bind.annotation.XmlSchemaType;
23 import javax.xml.bind.annotation.XmlType;
24 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
25 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
26
27 import org.eclipse.jdt.annotation.NonNullByDefault;
28
29 /**
30  * Java class for a channel XML element
31  * Renamed to MediaChannel in order to avoid confusion with Framework Channels
32  *
33  * @author GaĆ«l L'hopital - Initial contribution
34  */
35 @XmlAccessorType(XmlAccessType.FIELD)
36 @XmlType
37 @NonNullByDefault
38 public class MediaChannel {
39
40     @XmlElement(name = "display-name", required = true)
41     protected List<WithLangType> displayNames = new ArrayList<>();
42
43     @XmlElement(name = "icon")
44     protected List<Icon> icons = new ArrayList<>();
45
46     @XmlAttribute(required = true)
47     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
48     @XmlSchemaType(name = "token")
49     protected String id = "";
50
51     public List<WithLangType> getDisplayNames() {
52         return this.displayNames;
53     }
54
55     public List<Icon> getIcons() {
56         return this.icons;
57     }
58
59     public String getId() {
60         return id;
61     }
62 }