1 /* 2 * Copyright 2017 the original author or authors. 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 package org.openehealth.ipf.commons.ihe.hpd.stub.dsmlv2; 17 18 import java.util.ArrayList; 19 import java.util.List; 20 import javax.xml.bind.annotation.*; 21 22 23 /** 24 * <p>Java class for DsmlAttr complex type. 25 * 26 * <p>The following schema fragment specifies the expected content contained within this class. 27 * 28 * <pre> 29 * <complexType name="DsmlAttr"> 30 * <complexContent> 31 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 32 * <sequence> 33 * <element name="value" type="{urn:oasis:names:tc:DSML:2:0:core}DsmlValue" maxOccurs="unbounded" minOccurs="0"/> 34 * </sequence> 35 * <attribute name="name" use="required" type="{urn:oasis:names:tc:DSML:2:0:core}AttributeDescriptionValue" /> 36 * </restriction> 37 * </complexContent> 38 * </complexType> 39 * </pre> 40 * 41 * 42 */ 43 @XmlAccessorType(XmlAccessType.FIELD) 44 @XmlType(name = "DsmlAttr", propOrder = { 45 "value" 46 }) 47 public class DsmlAttr { 48 49 @XmlElement(type = String.class) 50 @XmlSchemaType(name = "anySimpleType") 51 protected List<Object> value; 52 @XmlAttribute(name = "name", required = true) 53 protected String name; 54 55 /** 56 * Gets the value of the value property. 57 * 58 * <p> 59 * This accessor method returns a reference to the live list, 60 * not a snapshot. Therefore any modification you make to the 61 * returned list will be present inside the JAXB object. 62 * This is why there is not a <CODE>set</CODE> method for the value property. 63 * 64 * <p> 65 * For example, to add a new item, do as follows: 66 * <pre> 67 * getValue().add(newItem); 68 * </pre> 69 * 70 * 71 * <p> 72 * Objects of the following type(s) are allowed in the list 73 * {@link String } 74 * 75 * 76 */ 77 public List<Object> getValue() { 78 if (value == null) { 79 value = new ArrayList<>(); 80 } 81 return this.value; 82 } 83 84 /** 85 * Gets the value of the name property. 86 * 87 * @return 88 * possible object is 89 * {@link String } 90 * 91 */ 92 public String getName() { 93 return name; 94 } 95 96 /** 97 * Sets the value of the name property. 98 * 99 * @param value 100 * allowed object is 101 * {@link String } 102 * 103 */ 104 public void setName(String value) { 105 this.name = value; 106 } 107 108 }