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 import java.net.URL; 25 import java.util.Locale; 26 27 import org.joda.time.DateTime; 28 29 /*** 30 * This is used to link to additional information or content. The url attribute 31 * gives the protocol and address of the link. The mimeValue attribute indicates 32 * the MIME type (RFC 2045) of any data linked to and must be used where it is 33 * applicable. The language attribute indicates the language of the descriptive 34 * information and is in the form of an xml:lang attribute and RFC 3066. The 35 * description attribute is used to describe the link. The expiryTime attribute 36 * indicates when a link will expire. 37 */ 38 public class Link { 39 40 /*** 41 * Link URL 42 */ 43 protected URL url; 44 45 /*** 46 * Link MIME type 47 */ 48 protected String mimeType; 49 50 /*** 51 * Language locale 52 */ 53 protected Locale locale; 54 55 /*** 56 * Link description 57 */ 58 protected String description; 59 60 /*** 61 * Link expiry time 62 */ 63 protected DateTime expiryTime; 64 65 /*** 66 * Create a new link 67 * @param url Link URL 68 */ 69 public Link(URL url) { 70 this.url = url; 71 } 72 73 /*** 74 * @return Returns the link URL 75 */ 76 public URL getUrl() { 77 return url; 78 } 79 80 /*** 81 * @return Returns the link MIME type 82 */ 83 public String getMimeType() { 84 return mimeType; 85 } 86 87 /*** 88 * Sets the link MIME type 89 * @param mimeType Link MIME type 90 */ 91 public void setMimeType(String mimeType) { 92 this.mimeType = mimeType; 93 } 94 95 /*** 96 * @return Returns the link description language 97 */ 98 public String getLanguage() { 99 return locale.getLanguage(); 100 } 101 102 /*** 103 * Sets the link locale 104 * @param locale Link locale 105 */ 106 public void setLocale(Locale locale) { 107 this.locale = locale; 108 } 109 110 /*** 111 * @return Returns the link description 112 */ 113 public String getDescription() { 114 return description; 115 } 116 117 /*** 118 * Sets the link description 119 * @param description Link description 120 */ 121 public void setDescription(String description) { 122 this.description = description; 123 } 124 125 /*** 126 * @return Returns the link expiry time 127 */ 128 public DateTime getExpiryTime() { 129 return expiryTime; 130 } 131 132 /*** 133 * Sets the link expiry time 134 * @param expiryTime Link expiry time 135 */ 136 public void setExpiryTime(DateTime expiryTime) { 137 this.expiryTime = expiryTime; 138 } 139 }