1 /***
2 * Java DAB EPG API - Serialize/Deserialize To/From POJOs to XML/Binary as per
3 * ETSI specifications TS 102 818 (XML Specification for DAB EPG) and TS 102
4 * 371 (Transportation and Binary Encoding Specification for EPG).
5 *
6 * Copyright (C) 2007 GCap Media PLC
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22 package com.gcapmedia.dab.epg;
23
24 /***
25 * Broadcast flag is on-air by default, but can be set to <b>off-air</b> in order
26 * to define a dummy programme for when a service is not being broadcast.
27 */
28 public enum BroadcastFlag {
29
30 /***
31 *
32 */
33 ON_AIR("on-air"),
34
35 /***
36 *
37 */
38 OFF_AIR("off-air");
39
40 /***
41 *
42 */
43 private final String value;
44
45 /***
46 *
47 */
48 BroadcastFlag(String v) {
49 value = v;
50 }
51
52 /***
53 *
54 */
55 public String value() {
56 return value;
57 }
58
59 /***
60 *
61 */
62 public static BroadcastFlag fromValue(String v) {
63 for (BroadcastFlag c: BroadcastFlag.values()) {
64 if (c.value.equals(v)) {
65 return c;
66 }
67 }
68 throw new IllegalArgumentException(v);
69 }
70
71 /***
72 * @see java.lang.Enum#toString()
73 */
74 public String toString() {
75 return value;
76 }
77
78 }