< prev index next >

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

Print this page

      46  * <pre>
      47  * &lt;complexType name="TestCases">
      48  *   &lt;complexContent>
      49  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      50  *       &lt;sequence>
      51  *         &lt;element name="testcase" type="{http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema}TestCase" maxOccurs="unbounded"/>
      52  *       &lt;/sequence>
      53  *     &lt;/restriction>
      54  *   &lt;/complexContent>
      55  * &lt;/complexType>
      56  * </pre>
      57  *
      58  *
      59  */
      60 /*@XmlAccessorType(XmlAccessType.FIELD)
      61 @XmlType(name = "TestCases", propOrder = {
      62     "testcase"
      63 })*/
      64 public class COFTestCases extends COFItem{
      65
      66         static LinkedHashMap xmlAttributes;
      67
      68         static LinkedHashMap xmlElements;
      69
      70         static String xmlTagName;
      71
      72         static {
      73                 xmlTagName = "testcases";
      74                 xmlElements = new LinkedHashMap();
      75                 xmlElements.put("testcase", "testcase");
      76         }
      77
      78         //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
      79     protected List/*<COFTestCase>*/ testcase;
      80
      81         LinkedHashMap getItemAttributes() {
      82                 return xmlAttributes;
      83         }
      84
      85         LinkedHashMap getItemElements() {
      86                 return xmlElements;
      87         }
      88
      89
      90         String getItemTagName() {
      91                 return xmlTagName;
      92         }
      93
      94     /**
      95      * Gets the value of the testcase property.
      96      *
      97      * <p>
      98      * This accessor method returns a reference to the live list,
      99      * not a snapshot. Therefore any modification you make to the
     100      * returned list will be present inside the JAXB object.
     101      * This is why there is not a <CODE>set</CODE> method for the testcase property.
     102      *
     103      * <p>
     104      * For example, to add a new item, do as follows:
     105      * <pre>
     106      *    getTestcase().add(newItem);
     107      * </pre>
     108      *
     109      *
     110      * <p>
     111      * Objects of the following type(s) are allowed in the list
     112      * {@link COFTestCase }
     113      *
     114      *
     115      */
     116     public List/*<COFTestCase>*/ getTestcase() {
     117         if (testcase == null) {
     118             testcase = new ArrayList/*<COFTestCase>*/();
     119         }
     120         return this.testcase;
     121     }
     122
     123         /* (non-Javadoc)
     124          * @see com.sun.javatest.cof.COFItem#write(com.sun.javatest.util.XMLWriter)
     125          */
     126         void write(XMLWriter out) throws IOException {
     127                 if (getTestcase().size() != 0) {
     128                         out.newLine();
     129                         super.write(out);
     130                 }
     131         }
     132
     133 }
      46  * <pre>
      47  * &lt;complexType name="TestCases">
      48  *   &lt;complexContent>
      49  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
      50  *       &lt;sequence>
      51  *         &lt;element name="testcase" type="{http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema}TestCase" maxOccurs="unbounded"/>
      52  *       &lt;/sequence>
      53  *     &lt;/restriction>
      54  *   &lt;/complexContent>
      55  * &lt;/complexType>
      56  * </pre>
      57  *
      58  *
      59  */
      60 /*@XmlAccessorType(XmlAccessType.FIELD)
      61 @XmlType(name = "TestCases", propOrder = {
      62     "testcase"
      63 })*/
      64 public class COFTestCases extends COFItem{
      65
      66         static LinkedHashMap<String, String> xmlAttributes;
      67
      68         static LinkedHashMap<String, String> xmlElements;
      69
      70         static String xmlTagName;
      71
      72         static {
      73                 xmlTagName = "testcases";
      74                 xmlElements = new LinkedHashMap<>();
      75                 xmlElements.put("testcase", "testcase");
      76         }
      77
      78         //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
      79     protected List<COFTestCase> testcase;
      80
      81         LinkedHashMap<String, String> getItemAttributes() {
      82                 return xmlAttributes;
      83         }
      84
      85         LinkedHashMap<String, String> getItemElements() {
      86                 return xmlElements;
      87         }
      88
      89
      90         String getItemTagName() {
      91                 return xmlTagName;
      92         }
      93
      94     /**
      95      * Gets the value of the testcase property.
      96      *
      97      * <p>
      98      * This accessor method returns a reference to the live list,
      99      * not a snapshot. Therefore any modification you make to the
     100      * returned list will be present inside the JAXB object.
     101      * This is why there is not a <CODE>set</CODE> method for the testcase property.
     102      *
     103      * <p>
     104      * For example, to add a new item, do as follows:
     105      * <pre>
     106      *    getTestcase().add(newItem);
     107      * </pre>
     108      *
     109      *
     110      * <p>
     111      * Objects of the following type(s) are allowed in the list
     112      * {@link COFTestCase }
     113      *
     114      *
     115      */
     116     public List<COFTestCase> getTestcase() {
     117         if (testcase == null) {
     118             testcase = new ArrayList<>();
     119         }
     120         return this.testcase;
     121     }
     122
     123         /* (non-Javadoc)
     124          * @see com.sun.javatest.cof.COFItem#write(com.sun.javatest.util.XMLWriter)
     125          */
     126         void write(XMLWriter out) throws IOException {
     127                 if (getTestcase().size() != 0) {
     128                         out.newLine();
     129                         super.write(out);
     130                 }
     131         }
     132
     133 }

< prev index next >