2 * Copyright (c) 2010-2024 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.roku.internal.dto;
15 import java.util.ArrayList;
16 import java.util.List;
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;
23 import org.eclipse.jdt.annotation.NonNullByDefault;
26 * Maps the XML response from the Roku HTTP endpoint '/query/tv-channels' (List of available TV channels)
28 * @author Michael Lobstein - Initial contribution
32 @XmlAccessorType(XmlAccessType.FIELD)
33 @XmlRootElement(name = "tv-channels")
34 public class TvChannels {
36 private List<TvChannels.Channel> channel = new ArrayList<TvChannels.Channel>();
38 public List<TvChannels.Channel> getChannel() {
42 @XmlAccessorType(XmlAccessType.FIELD)
43 public static class Channel {
44 @XmlElement(name = "number")
45 private String number = "";
47 @XmlElement(name = "name")
48 private String name = "";
50 @XmlElement(name = "type")
51 private String type = "";
53 @XmlElement(name = "user-hidden")
54 private boolean userHidden = false;
56 @XmlElement(name = "user-favorite")
57 private boolean userFavorite = false;
59 @XmlElement(name = "physical-channel")
60 private int physicalChannel = 0;
62 @XmlElement(name = "physical-frequency")
63 private int physicalFrequency = 0;
65 public String getNumber() {
69 public void setNumber(String value) {
73 public String getName() {
77 public void setName(String value) {
81 public String getType() {
85 public void setType(String value) {
89 public boolean isUserHidden() {
93 public void setUserHidden(boolean value) {
94 this.userHidden = value;
97 public boolean isUserFavorite() {
101 public void setUserFavorite(boolean value) {
102 this.userFavorite = value;
105 public int getPhysicalChannel() {
106 return physicalChannel;
109 public void setPhysicalChannel(int value) {
110 this.physicalChannel = value;
113 public int getPhysicalFrequency() {
114 return physicalFrequency;
117 public void setPhysicalFrequency(int value) {
118 this.physicalFrequency = value;