< prev index next >

## src/com/sun/javatest/cof/COFTestAttribute.java

Print this page

      68  *   &lt;complexContent>
      69  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      70  *       &lt;sequence>
      71  *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
      72  *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
      73  *       &lt;/sequence>
      74  *     &lt;/restriction>
      75  *   &lt;/complexContent>
      76  * &lt;/complexType>
      77  * </pre>
      78  *
      79  *
      80  */
      81 /*@XmlAccessorType(XmlAccessType.FIELD)
      82 @XmlType(name = "TestAttribute", propOrder = {
      83     "name",
      84     "value"
      85 })*/
      86 public class COFTestAttribute extends COFItem{
      87
      88 static LinkedHashMap xmlAttributes;
      89 static LinkedHashMap xmlElements;
      90
      91     static String xmlTagName;
      92
      93     static {
      94                 xmlElements = new LinkedHashMap();
      95                 xmlElements.put("name","name");
      96                 xmlElements.put("value","value");
      97                 xmlTagName = "attribute";
      98         }
      99
     100     //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     101     protected List/*<String>*/ name;
     102
     103         //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     104     protected List/*<String>*/ value;
     105
     106         public COFTestAttribute(String name, String value) {
     107                 this.getName().add(name);
     108                 this.getValue().add(value);
     109         }
     110
     111         LinkedHashMap getItemAttributes() {
     112                 return xmlAttributes;
     113         }
     114
     115         LinkedHashMap getItemElements() {
     116                 return xmlElements;
     117         }
     118
     119         String getItemTagName() {
     120                 return xmlTagName;
     121         }
     122
     123         /**
     124      * Gets the value of the name property.
     125      *
     126      * <p>
     127      * This accessor method returns a reference to the live list,
     128      * not a snapshot. Therefore any modification you make to the
     129      * returned list will be present inside the JAXB object.
     130      * This is why there is not a <CODE>set</CODE> method for the name property.
     131      *
     132      * <p>
     133      * For example, to add a new item, do as follows:
     134      * <pre>
     135      *    getName().add(newItem);
     136      * </pre>
     137      *
     138      *
     139      * <p>
     140      * Objects of the following type(s) are allowed in the list
     141      * {@link String }
     142      *
     143      *
     144      */
     145     public List/*<String>*/ getName() {
     146         if (name == null) {
     147             name = new ArrayList/*<String>*/();
     148         }
     149         return this.name;
     150     }
     151
     152         /**
     153      * Gets the value of the value property.
     154      *
     155      * <p>
     156      * This accessor method returns a reference to the live list,
     157      * not a snapshot. Therefore any modification you make to the
     158      * returned list will be present inside the JAXB object.
     159      * This is why there is not a <CODE>set</CODE> method for the value property.
     160      *
     161      * <p>
     162      * For example, to add a new item, do as follows:
     163      * <pre>
     164      *    getValue().add(newItem);
     165      * </pre>
     166      *
     167      *
     168      * <p>
     169      * Objects of the following type(s) are allowed in the list
     170      * {@link String }
     171      *
     172      *
     173      */
     174     public List/*<String>*/ getValue() {
     175         if (value == null) {
     176             value = new ArrayList/*<String>*/();
     177         }
     178         return this.value;
     179     }
     180
     181 }
      68  *   &lt;complexContent>
      69  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      70  *       &lt;sequence>
      71  *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
      72  *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
      73  *       &lt;/sequence>
      74  *     &lt;/restriction>
      75  *   &lt;/complexContent>
      76  * &lt;/complexType>
      77  * </pre>
      78  *
      79  *
      80  */
      81 /*@XmlAccessorType(XmlAccessType.FIELD)
      82 @XmlType(name = "TestAttribute", propOrder = {
      83     "name",
      84     "value"
      85 })*/
      86 public class COFTestAttribute extends COFItem{
      87
      88 static LinkedHashMap<String, String> xmlAttributes;
      89 static LinkedHashMap<String, String> xmlElements;
      90
      91     static String xmlTagName;
      92
      93     static {
      94                 xmlElements = new LinkedHashMap<>();
      95                 xmlElements.put("name","name");
      96                 xmlElements.put("value","value");
      97                 xmlTagName = "attribute";
      98         }
      99
     100     //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     101     protected List<String> name;
     102
     103         //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     104     protected List<String> value;
     105
     106         public COFTestAttribute(String name, String value) {
     107                 this.getName().add(name);
     108                 this.getValue().add(value);
     109         }
     110
     111         LinkedHashMap<String, String> getItemAttributes() {
     112                 return xmlAttributes;
     113         }
     114
     115         LinkedHashMap<String, String> getItemElements() {
     116                 return xmlElements;
     117         }
     118
     119         String getItemTagName() {
     120                 return xmlTagName;
     121         }
     122
     123         /**
     124      * Gets the value of the name property.
     125      *
     126      * <p>
     127      * This accessor method returns a reference to the live list,
     128      * not a snapshot. Therefore any modification you make to the
     129      * returned list will be present inside the JAXB object.
     130      * This is why there is not a <CODE>set</CODE> method for the name property.
     131      *
     132      * <p>
     133      * For example, to add a new item, do as follows:
     134      * <pre>
     135      *    getName().add(newItem);
     136      * </pre>
     137      *
     138      *
     139      * <p>
     140      * Objects of the following type(s) are allowed in the list
     141      * {@link String }
     142      *
     143      *
     144      */
     145     public List<String> getName() {
     146         if (name == null) {
     147             name = new ArrayList<>();
     148         }
     149         return this.name;
     150     }
     151
     152         /**
     153      * Gets the value of the value property.
     154      *
     155      * <p>
     156      * This accessor method returns a reference to the live list,
     157      * not a snapshot. Therefore any modification you make to the
     158      * returned list will be present inside the JAXB object.
     159      * This is why there is not a <CODE>set</CODE> method for the value property.
     160      *
     161      * <p>
     162      * For example, to add a new item, do as follows:
     163      * <pre>
     164      *    getValue().add(newItem);
     165      * </pre>
     166      *
     167      *
     168      * <p>
     169      * Objects of the following type(s) are allowed in the list
     170      * {@link String }
     171      *
     172      *
     173      */
     174     public List<String> getValue() {
     175         if (value == null) {
     176             value = new ArrayList<>();
     177         }
     178         return this.value;
     179     }
     180
     181 }

< prev index next >