View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  
16  package org.fourthline.cling.support.model.item;
17  
18  import org.fourthline.cling.support.model.Res;
19  
20  import static org.fourthline.cling.support.model.DIDLObject.Property.UPNP;
21  
22  /**
23   * @author Christian Bauer
24   */
25  public class AudioBroadcast extends AudioItem {
26  
27      public static final Class CLASS = new Class("object.item.audioItem.audioBroadcast");
28  
29      public AudioBroadcast() {
30          setClazz(CLASS);
31      }
32  
33      public AudioBroadcast(Item other) {
34          super(other);
35      }
36  
37      public AudioBroadcast(String id, String parentID, String title, String creator, Res... resource) {
38          super(id, parentID, title, creator, resource);
39          setClazz(CLASS);
40      }
41  
42      public String getRegion() {
43          return getFirstPropertyValue(UPNP.REGION.class);
44      }
45  
46      public AudioBroadcast setRegion(String region) {
47          replaceFirstProperty(new UPNP.REGION(region));
48          return this;
49      }
50  
51      public String getRadioCallSign() {
52          return getFirstPropertyValue(UPNP.RADIO_CALL_SIGN.class);
53      }
54  
55      public AudioBroadcast setRadioCallSign(String radioCallSign) {
56          replaceFirstProperty(new UPNP.RADIO_CALL_SIGN(radioCallSign));
57          return this;
58      }
59  
60      public String getRadioStationID() {
61          return getFirstPropertyValue(UPNP.RADIO_STATION_ID.class);
62      }
63  
64      public AudioBroadcast setRadioStationID(String radioStationID) {
65          replaceFirstProperty(new UPNP.RADIO_STATION_ID(radioStationID));
66          return this;
67      }
68  
69      public String getRadioBand() {
70          return getFirstPropertyValue(UPNP.RADIO_BAND.class);
71      }
72  
73      public AudioBroadcast setRadioBand(String radioBand) {
74          replaceFirstProperty(new UPNP.RADIO_BAND(radioBand));
75          return this;
76      }
77  
78      public Integer getChannelNr() {
79          return getFirstPropertyValue(UPNP.CHANNEL_NR.class);
80      }
81  
82      public AudioBroadcast setChannelNr(Integer channelNr) {
83          replaceFirstProperty(new UPNP.CHANNEL_NR(channelNr));
84          return this;
85      }
86  }