1 /* 2 * Copyright 2001-2008 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 19 package org.uddi.api_v3; 20 21 import java.io.Serializable; 22 import java.util.ArrayList; 23 import java.util.List; 24 import javax.xml.bind.annotation.XmlAccessType; 25 import javax.xml.bind.annotation.XmlAccessorType; 26 import javax.xml.bind.annotation.XmlAttribute; 27 import javax.xml.bind.annotation.XmlElement; 28 import javax.xml.bind.annotation.XmlTransient; 29 import javax.xml.bind.annotation.XmlType; 30 31 32 /** 33 * <h4 style="margin-left:0in;text-indent:0in"><a name="_Ref8977291">3.3.2.7 address</a></h4> 34 35 <p class="MsoBodyText"><b>address</b> represents the contact’s postal address, in 36 a form suitable for addressing an envelope. The address structure is a simple 37 list of address lines.</p> 38 39 <p class="MsoBodyText"><b>Attributes</b></p> 40 41 <table class="MsoNormalTable" style="margin-left:.5in;border-collapse:collapse;border:none" border="1" cellpadding="0" cellspacing="0"> 42 <tbody><tr> 43 <td style="border:solid black 1.0pt;background:#FFFFCA;padding: 44 0in 5.4pt 0in 5.4pt" valign="top"> 45 <p class="MsoNormal"><b>Name </b></p> 46 </td> 47 <td style="border:solid black 1.0pt;border-left:none;background: 48 #FFFFCA;padding:0in 5.4pt 0in 5.4pt" valign="top"> 49 <p class="MsoNormal"><b>Use </b></p> 50 </td> 51 </tr> 52 <tr> 53 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 54 <p class="MsoNormal">xml:lang </p> 55 </td> 56 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 57 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 58 <p class="MsoNormal">optional </p> 59 </td> 60 </tr> 61 <tr> 62 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 63 <p class="MsoNormal">useType</p> 64 </td> 65 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 66 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 67 <p class="MsoNormal">optional</p> 68 </td> 69 </tr> 70 <tr> 71 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 72 <p class="MsoNormal">sortCode</p> 73 </td> 74 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 75 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 76 <p class="MsoNormal">optional</p> 77 </td> 78 </tr> 79 <tr> 80 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 81 <p class="MsoNormal">tModelKey</p> 82 </td> 83 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 84 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 85 <p class="MsoNormal">optional</p> 86 </td> 87 </tr> 88 </tbody></table> 89 90 <p class="MsoBodyText"> </p> 91 92 <p class="MsoBodyText">Address structures have four optional attributes.</p> 93 94 <p class="MsoBodyText">The <b>xml:lang</b> value describes the language the 95 address is expressed in. There is no restriction on the number of addresses or 96 what xml:lang value they may have. Publication of addresses in several 97 languages, e.g. for use in multilingual countries, is supported. See Appendix D 98 <i>Internationalization</i> for an example.</p> 99 100 <p class="MsoBodyText">The <b>useType</b> describes the address’ type in 101 unstructured text. Suggested examples include "headquarters", "sales 102 office", "billing department", etc.</p> 103 104 <p class="MsoBodyText">The <b>sortCode</b> attribute is deprecated because of the 105 guarantee of preserving the document order (see Section <a href="#_Ref8978002 ">4.5.3</a> 106 <i>Preservation of Document Order</i>). In order to achieve this behavior, the 107 data has just to be published in the desired order.</p> 108 109 <p class="MsoBodyText">The <b>tModelKey</b> is a tModel reference that specifies 110 that keyName keyValue pairs given by subsequent addressLine elements, if 111 addressLine elements are present at all, are to be interpreted by the address 112 structure associated with the tModel that is referenced. For a description of 113 how to use tModels in order to give the addressLine list structure and meaning, 114 see Appendix D<i> Internationalization</i>.</p> 115 * <p>Java class for address complex type. 116 * 117 * <p>The following schema fragment specifies the expected content contained within this class. 118 * 119 * <pre> 120 * <complexType name="address"> 121 * <complexContent> 122 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 123 * <sequence> 124 * <element ref="{urn:uddi-org:api_v3}addressLine" maxOccurs="unbounded"/> 125 * </sequence> 126 * <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/> 127 * <attribute name="useType" type="{urn:uddi-org:api_v3}useType" default="" /> 128 * <attribute name="sortCode" type="{urn:uddi-org:api_v3}sortCode" default="" /> 129 * <attribute name="tModelKey" type="{urn:uddi-org:api_v3}tModelKey" /> 130 * </restriction> 131 * </complexContent> 132 * </complexType> 133 * </pre> 134 * 135 * 136 */ 137 @XmlAccessorType(XmlAccessType.FIELD) 138 @XmlType(name = "address", propOrder = { 139 "addressLine" 140 }) 141 public class Address implements Serializable{ 142 @XmlTransient 143 private static final long serialVersionUID = -8188040108029962551L; 144 @XmlElement(required = true) 145 protected List<AddressLine> addressLine; 146 @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace") 147 protected String lang; 148 @XmlAttribute 149 protected String useType; 150 @XmlAttribute 151 protected String sortCode; 152 @XmlAttribute 153 protected String tModelKey; 154 155 /** 156 * Gets the value of the addressLine property. 157 * 158 * <p> 159 * This accessor method returns a reference to the live list, 160 * not a snapshot. Therefore any modification you make to the 161 * returned list will be present inside the JAXB object. 162 * This is why there is not a <CODE>set</CODE> method for the addressLine property. 163 * 164 * <p> 165 * For example, to add a new item, do as follows: 166 * <pre> 167 * getAddressLine().add(newItem); 168 * </pre> 169 * 170 * 171 * <p> 172 * Objects of the following type(s) are allowed in the list 173 * {@link AddressLine } 174 * 175 * 176 */ 177 public List<AddressLine> getAddressLine() { 178 if (addressLine == null) { 179 addressLine = new ArrayList<AddressLine>(); 180 } 181 return this.addressLine; 182 } 183 184 /** 185 * Gets the value of the lang property. 186 * 187 * @return 188 * possible object is 189 * {@link String } 190 * 191 */ 192 public String getLang() { 193 return lang; 194 } 195 196 /** 197 * Sets the value of the lang property. 198 * 199 * @param value 200 * allowed object is 201 * {@link String } 202 * 203 */ 204 public void setLang(String value) { 205 this.lang = value; 206 } 207 208 /** 209 * Gets the value of the useType property. 210 * 211 * @return 212 * possible object is 213 * {@link String } 214 * 215 */ 216 public String getUseType() { 217 if (useType == null) { 218 return ""; 219 } else { 220 return useType; 221 } 222 } 223 224 /** 225 * Sets the value of the useType property. 226 * 227 * @param value 228 * allowed object is 229 * {@link String } 230 * 231 */ 232 public void setUseType(String value) { 233 this.useType = value; 234 } 235 236 /** 237 * Gets the value of the sortCode property. 238 * The sortCode attribute is deprecated because of the guarantee of preserving the document order (see Section 4.5.3 Preservation of Document Order). In order to achieve this behavior, the data has just to be published in the desired order. 239 * @return 240 * possible object is 241 * {@link String } 242 * 243 */ 244 public String getSortCode() { 245 if (sortCode == null) { 246 return ""; 247 } else { 248 return sortCode; 249 } 250 } 251 252 /** 253 * Sets the value of the sortCode property. 254 * The sortCode attribute is deprecated because of the guarantee of preserving the document order (see Section 4.5.3 Preservation of Document Order). In order to achieve this behavior, the data has just to be published in the desired order. 255 * @param value 256 * allowed object is 257 * {@link String } 258 * 259 */ 260 public void setSortCode(String value) { 261 this.sortCode = value; 262 } 263 264 /** 265 * Gets the value of the tModelKey property. 266 * 267 * @return 268 * possible object is 269 * {@link String } 270 * 271 */ 272 public String getTModelKey() { 273 return tModelKey; 274 } 275 276 /** 277 * Sets the value of the tModelKey property. 278 * 279 * @param value 280 * allowed object is 281 * {@link String } 282 * 283 */ 284 public void setTModelKey(String value) { 285 this.tModelKey = value; 286 } 287 288 }