       1 /*
       2  * $Id$
       3  *
       4  * Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
       5  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       6  *
       7  * This code is free software; you can redistribute it and/or modify it
       8  * under the terms of the GNU General Public License version 2 only, as
       9  * published by the Free Software Foundation.  Oracle designates this
      10  * particular file as subject to the "Classpath" exception as provided
      11  * by Oracle in the LICENSE file that accompanied this code.
      12  *
      13  * This code is distributed in the hope that it will be useful, but WITHOUT
      14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      15  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      16  * version 2 for more details (a copy is included in the LICENSE file that
      17  * accompanied this code).
      18  *
      19  * You should have received a copy of the GNU General Public License version
      20  * 2 along with this work; if not, write to the Free Software Foundation,
      21  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
      22  *
      23  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      24  * or visit www.oracle.com if you need additional information or have any
      25  * questions.
      26  */
      27 package com.sun.javatest.cof;
      28
      29 import java.util.LinkedHashMap;
      30
      31 /*import javax.xml.bind.annotation.XmlAccessType;
      32 import javax.xml.bind.annotation.XmlAccessorType;
      33 import javax.xml.bind.annotation.XmlAttribute;
      34 import javax.xml.bind.annotation.XmlElement;
      35 import javax.xml.bind.annotation.XmlType;
      36 */
      37
      38 /**
      39  *
      40  *         Software is tracked in the hardware/software database that backs
      41  *         up the COF XML. The elements in the SW type map to fields in the
      42  *         software table of that database. Type is enumerated. See below.
      43  *         Name is a product name with no version string. For example,
      44  *         "Tomcat". Version is a product version. For instance, "8i".
      45  *
      46  *
      47  * <p>Java class for SWEntity complex type.
      48  *
      49  * <p>The following schema fragment specifies the expected content contained within this class.
      50  *
      51  * <pre>
      52  * &lt;complexType name="SWEntity">
      53  *   &lt;complexContent>
      54  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      55  *       &lt;sequence>
      56  *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
      57  *         &lt;element name="type">
      58  *           &lt;simpleType>
      59  *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
      60  *               &lt;enumeration value="appserver"/>
      61  *               &lt;enumeration value="browser"/>
      62  *               &lt;enumeration value="database"/>
      63  *               &lt;enumeration value="editor"/>
      64  *               &lt;enumeration value="java"/>
      65  *               &lt;enumeration value="webserver"/>
      66  *             &lt;/restriction>
      67  *           &lt;/simpleType>
      68  *         &lt;/element>
      69  *         &lt;element name="version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
      70  *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
      71  *       &lt;/sequence>
      72  *       &lt;attribute name="id" use="required" type="{http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema}IDWithColon" />
      73  *     &lt;/restriction>
      74  *   &lt;/complexContent>
      75  * &lt;/complexType>
      76  * </pre>
      77  *
      78  *
      79  */
      80 /*@XmlAccessorType(XmlAccessType.FIELD)
      81 @XmlType(name = "SWEntity", propOrder = {
      82     "name",
      83     "type",
      84     "version",
      85     "description"
      86 })*/
      87 public class COFSWEntity extends COFItem{
      88
      89 static LinkedHashMap xmlAttributes;
      90 static LinkedHashMap xmlElements;
      91 static String xmlTagName;
      92 static {
      93                 xmlTagName = "swentity";
      94                 xmlElements = new LinkedHashMap();
      95                 xmlElements.put("name","name");
      96                 xmlElements.put("type","type");
      97                 xmlElements.put("version","version");
      98                 xmlElements.put("description","description");
      99                 xmlAttributes = new LinkedHashMap();
     100                 xmlAttributes.put("id","id");
     101         }
     102 //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
     103     protected String description;
     104
     105     //    @XmlAttribute(required = true)
     106     protected String id="swentity:0";
     107
     108     //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     109     protected String name;
     110
     111     //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
     112     protected String type;
     113
     114     //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
     115     protected String version;
     116
     117     /**
     118      * Gets the value of the description property.
     119      *
     120      * @return
     121      *     possible object is
     122      *     {@link String }
     123      *
     124      */
     125     public String getDescription() {
     126         return description;
     127     }
     128
     129     /**
     130      * Gets the value of the id property.
     131      *
     132      * @return
     133      *     possible object is
     134      *     {@link String }
     135      *
     136      */
     137     public String getId() {
     138         return id;
     139     }
     140
     141     LinkedHashMap getItemAttributes() {
     142                 return xmlAttributes;
     143         }
     144
     145     LinkedHashMap getItemElements() {
     146                 return xmlElements;
     147         }
     148
     149     String getItemTagName() {
     150                 return xmlTagName;
     151         }
     152
     153     /**
     154      * Gets the value of the name property.
     155      *
     156      * @return
     157      *     possible object is
     158      *     {@link String }
     159      *
     160      */
     161     public String getName() {
     162         return name;
     163     }
     164
     165     /**
     166      * Gets the value of the type property.
     167      *
     168      * @return
     169      *     possible object is
     170      *     {@link String }
     171      *
     172      */
     173     public String getType() {
     174         return type;
     175     }
     176
     177         /**
     178      * Gets the value of the version property.
     179      *
     180      * @return
     181      *     possible object is
     182      *     {@link String }
     183      *
     184      */
     185     public String getVersion() {
     186         return version;
     187     }
     188
     189         /**
     190      * Sets the value of the description property.
     191      *
     192      * @param value
     193      *     allowed object is
     194      *     {@link String }
     195      *
     196      */
     197     public void setDescription(String value) {
     198         this.description = value;
     199     }
     200
     201         /**
     202      * Sets the value of the id property.
     203      *
     204      * @param value
     205      *     allowed object is
     206      *     {@link String }
     207      *
     208      */
     209     public void setId(String value) {
     210         this.id = value;
     211     }
     212
     213         /**
     214      * Sets the value of the name property.
     215      *
     216      * @param value
     217      *     allowed object is
     218      *     {@link String }
     219      *
     220      */
     221     public void setName(String value) {
     222         this.name = value;
     223     }
     224
     225         /**
     226      * Sets the value of the type property.
     227      *
     228      * @param value
     229      *     allowed object is
     230      *     {@link String }
     231      *
     232      */
     233     public void setType(String value) {
     234         this.type = value;
     235     }
     236         /**
     237      * Sets the value of the version property.
     238      *
     239      * @param value
     240      *     allowed object is
     241      *     {@link String }
     242      *
     243      */
     244     public void setVersion(String value) {
     245         this.version = value;
     246     }
     247
     248 }
    --- EOF ---