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">3.3.2.6 contact</h4> 34 35 <p class="MsoBodyText">The contact structure records contact information for a 36 person or a job role within the businessEntity so that someone who finds the 37 information can make human contact for any purpose. This information consists 38 of one or more optional elements, along with a person’s name. Contact 39 information exists by containment relationship alone; the contact structure 40 does not provide keys for tracking individual contact instances.</p> 41 42 <p class="MsoBodyText"><img src="http://uddi.org/pubs/uddi-v3.0.2-20041019_files/image012.jpg" border="0" width="508" height="330"></p> 43 44 <p class="MsoBodyText"><b>Attributes</b></p> 45 46 <table class="MsoNormalTable" style="margin-left:.5in;border-collapse:collapse;border:none" border="1" cellpadding="0" cellspacing="0"> 47 <tbody><tr> 48 <td style="border:solid black 1.0pt;background:#FFFFCA;padding: 49 0in 5.4pt 0in 5.4pt" valign="top"> 50 <p class="MsoNormal"><b>Name </b></p> 51 </td> 52 <td style="border:solid black 1.0pt;border-left:none;background: 53 #FFFFCA;padding:0in 5.4pt 0in 5.4pt" valign="top"> 54 <p class="MsoNormal"><b>Use </b></p> 55 </td> 56 </tr> 57 <tr> 58 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 59 <p class="MsoNormal">useType </p> 60 </td> 61 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 62 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 63 <p class="MsoNormal">optional </p> 64 </td> 65 </tr> 66 </tbody></table> 67 68 <p class="MsoBodyText"> </p> 69 70 <p class="MsoBodyText">The <b>useType</b> attribute is used to describe the type 71 of contact in unstructured text. Suggested examples include "technical 72 questions", "technical contact", "establish account", "sales 73 contact", etc.</p> 74 75 <p class="MsoBodyText"><b>description</b> is used to describe how the contact 76 information should be used. Publishing several descriptions, e.g. in different 77 languages, is supported. To signify the language in which the descriptions are 78 expressed, they MAY carry <b>xml:lang</b> values.</p> 79 80 <p class="MsoBodyText"><b>personName</b> is the name of the person or name of the 81 job role supporting the contact. Publishing several names, e.g. for 82 romanization purposes, is supported.</p> 83 84 <p class="MsoBodyText"> </p> 85 86 <p class="MsoBodyText"> </p> 87 88 <p class="MsoBodyText"><b>Attributes</b></p> 89 90 <table class="specTable" style="margin-left: 91 .5in;border-collapse:collapse;border:none" border="1" cellpadding="0" cellspacing="0"> 92 <tbody><tr> 93 <td style="border:solid black 1.0pt;background:#FFFFCA;padding: 94 0in 5.4pt 0in 5.4pt" valign="top"> 95 <p class="MsoNormal"><b>Name </b></p> 96 </td> 97 <td style="border:solid black 1.0pt;border-left:none;background: 98 #FFFFCA;padding:0in 5.4pt 0in 5.4pt" valign="top"> 99 <p class="MsoNormal"><b>Use </b></p> 100 </td> 101 </tr> 102 <tr> 103 <td style="border:solid black 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt" valign="top"> 104 <p class="MsoNormal">xml:lang </p> 105 </td> 106 <td style="border-top:none;border-left:none;border-bottom:solid black 1.0pt; 107 border-right:solid black 1.0pt;padding:0in 5.4pt 0in 5.4pt" valign="top"> 108 <p class="MsoNormal">optional </p> 109 </td> 110 </tr> 111 </tbody></table> 112 113 <p class="MsoBodyText"> </p> 114 115 <p class="MsoBodyText">In order to signify the contextual language (if any) in 116 which a given name is expressed in (such as the language into which a name has 117 been romanized), it SHOULD carry the <b>xml:lang</b> attribute See Section <a href="#_Ref8977786 ">3.3.2.3</a> <i>name</i> for details on using xml:lang 118 values in name elements. There is no restriction on the number of personNames 119 or what xml:lang value each may have. An example for a role might be:</p> 120 121 <p class="codeSample"><contact useType="Technical support"></p> 122 123 <p class="codeSample"> <personName>Administrator</personName></p> 124 125 <p class="codeSample"> …</p> 126 127 <p class="codeSample"></contact></p> 128 129 <p class="MsoBodyText"><b> </b></p> 130 131 <p class="MsoBodyText"><b>phone</b> is used to hold telephone numbers for the 132 contact. This element MAY be adorned with an optional <b>useType</b> attribute 133 for descriptive purposes.</p> 134 135 <p class="MsoBodyText"><b>email</b> is the email address for the contact. This 136 element MAY be adorned with an optional <b>useType</b> attribute for 137 descriptive purposes.</p> 138 139 <p class="MsoBodyText"><b>address</b> is the postal address for the contact. </p> 140 * <p>Java class for contact complex type. 141 * 142 * <p>The following schema fragment specifies the expected content contained within this class. 143 * 144 * <pre> 145 * <complexType name="contact"> 146 * <complexContent> 147 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 148 * <sequence> 149 * <element ref="{urn:uddi-org:api_v3}description" maxOccurs="unbounded" minOccurs="0"/> 150 * <element ref="{urn:uddi-org:api_v3}personName" maxOccurs="unbounded"/> 151 * <element ref="{urn:uddi-org:api_v3}phone" maxOccurs="unbounded" minOccurs="0"/> 152 * <element ref="{urn:uddi-org:api_v3}email" maxOccurs="unbounded" minOccurs="0"/> 153 * <element ref="{urn:uddi-org:api_v3}address" maxOccurs="unbounded" minOccurs="0"/> 154 * </sequence> 155 * <attribute name="useType" type="{urn:uddi-org:api_v3}useType" default="" /> 156 * </restriction> 157 * </complexContent> 158 * </complexType> 159 * </pre> 160 * 161 * 162 */ 163 @XmlAccessorType(XmlAccessType.FIELD) 164 @XmlType(name = "contact", propOrder = { 165 "description", 166 "personName", 167 "phone", 168 "email", 169 "address" 170 }) 171 public class Contact implements Serializable{ 172 @XmlTransient 173 private static final long serialVersionUID = -714656423425450747L; 174 protected List<Description> description; 175 @XmlElement(required = true) 176 protected List<PersonName> personName; 177 protected List<Phone> phone; 178 protected List<Email> email; 179 protected List<Address> address; 180 @XmlAttribute 181 protected String useType; 182 183 /** 184 * Gets the value of the description property. 185 * 186 * <p> 187 * This accessor method returns a reference to the live list, 188 * not a snapshot. Therefore any modification you make to the 189 * returned list will be present inside the JAXB object. 190 * This is why there is not a <CODE>set</CODE> method for the description property. 191 * 192 * <p> 193 * For example, to add a new item, do as follows: 194 * <pre> 195 * getDescription().add(newItem); 196 * </pre> 197 * 198 * 199 * <p> 200 * Objects of the following type(s) are allowed in the list 201 * {@link Description } 202 * 203 * 204 */ 205 public List<Description> getDescription() { 206 if (description == null) { 207 description = new ArrayList<Description>(); 208 } 209 return this.description; 210 } 211 212 /** 213 * Gets the value of the personName property. 214 * 215 * <p> 216 * This accessor method returns a reference to the live list, 217 * not a snapshot. Therefore any modification you make to the 218 * returned list will be present inside the JAXB object. 219 * This is why there is not a <CODE>set</CODE> method for the personName property. 220 * 221 * <p> 222 * For example, to add a new item, do as follows: 223 * <pre> 224 * getPersonName().add(newItem); 225 * </pre> 226 * 227 * 228 * <p> 229 * Objects of the following type(s) are allowed in the list 230 * {@link PersonName } 231 * 232 * 233 */ 234 public List<PersonName> getPersonName() { 235 if (personName == null) { 236 personName = new ArrayList<PersonName>(); 237 } 238 return this.personName; 239 } 240 241 /** 242 * Gets the value of the phone property. 243 * 244 * <p> 245 * This accessor method returns a reference to the live list, 246 * not a snapshot. Therefore any modification you make to the 247 * returned list will be present inside the JAXB object. 248 * This is why there is not a <CODE>set</CODE> method for the phone property. 249 * 250 * <p> 251 * For example, to add a new item, do as follows: 252 * <pre> 253 * getPhone().add(newItem); 254 * </pre> 255 * 256 * 257 * <p> 258 * Objects of the following type(s) are allowed in the list 259 * {@link Phone } 260 * 261 * 262 */ 263 public List<Phone> getPhone() { 264 if (phone == null) { 265 phone = new ArrayList<Phone>(); 266 } 267 return this.phone; 268 } 269 270 /** 271 * Gets the value of the email property. 272 * 273 * <p> 274 * This accessor method returns a reference to the live list, 275 * not a snapshot. Therefore any modification you make to the 276 * returned list will be present inside the JAXB object. 277 * This is why there is not a <CODE>set</CODE> method for the email property. 278 * 279 * <p> 280 * For example, to add a new item, do as follows: 281 * <pre> 282 * getEmail().add(newItem); 283 * </pre> 284 * 285 * 286 * <p> 287 * Objects of the following type(s) are allowed in the list 288 * {@link Email } 289 * 290 * 291 */ 292 public List<Email> getEmail() { 293 if (email == null) { 294 email = new ArrayList<Email>(); 295 } 296 return this.email; 297 } 298 299 /** 300 * Gets the value of the address property. 301 * 302 * <p> 303 * This accessor method returns a reference to the live list, 304 * not a snapshot. Therefore any modification you make to the 305 * returned list will be present inside the JAXB object. 306 * This is why there is not a <CODE>set</CODE> method for the address property. 307 * 308 * <p> 309 * For example, to add a new item, do as follows: 310 * <pre> 311 * getAddress().add(newItem); 312 * </pre> 313 * 314 * 315 * <p> 316 * Objects of the following type(s) are allowed in the list 317 * {@link Address } 318 * 319 * 320 */ 321 public List<Address> getAddress() { 322 if (address == null) { 323 address = new ArrayList<Address>(); 324 } 325 return this.address; 326 } 327 328 /** 329 * Gets the value of the useType property. 330 * 331 * @return 332 * possible object is 333 * {@link String } 334 * 335 */ 336 public String getUseType() { 337 if (useType == null) { 338 return ""; 339 } else { 340 return useType; 341 } 342 } 343 344 /** 345 * Sets the value of the useType property. 346 * 347 * @param value 348 * allowed object is 349 * {@link String } 350 * 351 */ 352 public void setUseType(String value) { 353 this.useType = value; 354 } 355 356 }