]> git.basschouten.com Git - openhab-addons.git/blob
4b12876e29209fa3494d618ddab65bdf064b1708
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.roku.internal.dto;
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.XmlElement;
21 import javax.xml.bind.annotation.XmlRootElement;
22
23 import org.eclipse.jdt.annotation.NonNullByDefault;
24
25 /**
26  * Maps the XML response from the Roku HTTP endpoint '/query/tv-channels' (List of available TV channels)
27  *
28  * @author Michael Lobstein - Initial contribution
29  */
30
31 @NonNullByDefault
32 @XmlAccessorType(XmlAccessType.FIELD)
33 @XmlRootElement(name = "tv-channels")
34 public class TvChannels {
35     @XmlElement
36     private List<TvChannels.Channel> channel = new ArrayList<TvChannels.Channel>();
37
38     public List<TvChannels.Channel> getChannel() {
39         return this.channel;
40     }
41
42     @XmlAccessorType(XmlAccessType.FIELD)
43     public static class Channel {
44         @XmlElement(name = "number")
45         private String number = "";
46
47         @XmlElement(name = "name")
48         private String name = "";
49
50         @XmlElement(name = "type")
51         private String type = "";
52
53         @XmlElement(name = "user-hidden")
54         private boolean userHidden = false;
55
56         @XmlElement(name = "user-favorite")
57         private boolean userFavorite = false;
58
59         @XmlElement(name = "physical-channel")
60         private int physicalChannel = 0;
61
62         @XmlElement(name = "physical-frequency")
63         private int physicalFrequency = 0;
64
65         public String getNumber() {
66             return number;
67         }
68
69         public void setNumber(String value) {
70             this.number = value;
71         }
72
73         public String getName() {
74             return name;
75         }
76
77         public void setName(String value) {
78             this.name = value;
79         }
80
81         public String getType() {
82             return type;
83         }
84
85         public void setType(String value) {
86             this.type = value;
87         }
88
89         public boolean isUserHidden() {
90             return userHidden;
91         }
92
93         public void setUserHidden(boolean value) {
94             this.userHidden = value;
95         }
96
97         public boolean isUserFavorite() {
98             return userFavorite;
99         }
100
101         public void setUserFavorite(boolean value) {
102             this.userFavorite = value;
103         }
104
105         public int getPhysicalChannel() {
106             return physicalChannel;
107         }
108
109         public void setPhysicalChannel(int value) {
110             this.physicalChannel = value;
111         }
112
113         public int getPhysicalFrequency() {
114             return physicalFrequency;
115         }
116
117         public void setPhysicalFrequency(int value) {
118             this.physicalFrequency = value;
119         }
120     }
121 }