001//
002// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
003// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004// Any modifications to this file will be lost upon recompilation of the source schema. 
005// Generated on: 2013.04.21 at 08:43:19 PM CEST 
006//
007
008
009package org.jomc.model.test;
010
011import java.util.ArrayList;
012import java.util.Iterator;
013import java.util.List;
014import javax.annotation.Generated;
015import javax.xml.bind.annotation.XmlAccessType;
016import javax.xml.bind.annotation.XmlAccessorType;
017import javax.xml.bind.annotation.XmlElement;
018import javax.xml.bind.annotation.XmlType;
019
020
021/**
022 * List of tests.
023 * 
024 * <p>Java class for TestSuite complex type.
025 * 
026 * <p>The following schema fragment specifies the expected content contained within this class.
027 * 
028 * <pre>
029 * &lt;complexType name="TestSuite">
030 *   &lt;complexContent>
031 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
032 *       &lt;sequence>
033 *         &lt;element name="schema-constraints-test" type="{http://jomc.org/model/test}SchemaConstraintsTestType" maxOccurs="unbounded" minOccurs="0"/>
034 *         &lt;element name="modules-constraints-test" type="{http://jomc.org/model/test}ModulesConstraintsTestType" maxOccurs="unbounded" minOccurs="0"/>
035 *         &lt;element name="implementation-test" type="{http://jomc.org/model/test}ImplementationTestType" maxOccurs="unbounded" minOccurs="0"/>
036 *         &lt;element name="instance-test" type="{http://jomc.org/model/test}InstanceTestType" maxOccurs="unbounded" minOccurs="0"/>
037 *       &lt;/sequence>
038 *     &lt;/restriction>
039 *   &lt;/complexContent>
040 * &lt;/complexType>
041 * </pre>
042 * 
043 * 
044 */
045@XmlAccessorType(XmlAccessType.FIELD)
046@XmlType(name = "TestSuite", namespace = "http://jomc.org/model/test", propOrder = {
047    "schemaConstraintsTest",
048    "modulesConstraintsTest",
049    "implementationTest",
050    "instanceTest"
051})
052@Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
053public class TestSuite implements Cloneable
054{
055
056    @XmlElement(name = "schema-constraints-test", namespace = "http://jomc.org/model/test")
057    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
058    protected List<SchemaConstraintsTestType> schemaConstraintsTest;
059    @XmlElement(name = "modules-constraints-test", namespace = "http://jomc.org/model/test")
060    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
061    protected List<ModulesConstraintsTestType> modulesConstraintsTest;
062    @XmlElement(name = "implementation-test", namespace = "http://jomc.org/model/test")
063    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
064    protected List<ImplementationTestType> implementationTest;
065    @XmlElement(name = "instance-test", namespace = "http://jomc.org/model/test")
066    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
067    protected List<InstanceTestType> instanceTest;
068
069    /**
070     * Creates a new {@code TestSuite} instance.
071     * 
072     */
073    public TestSuite() {
074        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
075        super();
076    }
077
078    /**
079     * Creates a new {@code TestSuite} instance by deeply copying a given {@code TestSuite} instance.
080     * 
081     * 
082     * @param o
083     *     The instance to copy.
084     * @throws NullPointerException
085     *     if {@code o} is {@code null}.
086     */
087    public TestSuite(final TestSuite o) {
088        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
089        super();
090        if (o == null) {
091            throw new NullPointerException("Cannot create a copy of 'TestSuite' from 'null'.");
092        }
093        // 'SchemaConstraintsTest' collection.
094        if (o.schemaConstraintsTest!= null) {
095            copySchemaConstraintsTest(o.getSchemaConstraintsTest(), this.getSchemaConstraintsTest());
096        }
097        // 'ModulesConstraintsTest' collection.
098        if (o.modulesConstraintsTest!= null) {
099            copyModulesConstraintsTest(o.getModulesConstraintsTest(), this.getModulesConstraintsTest());
100        }
101        // 'ImplementationTest' collection.
102        if (o.implementationTest!= null) {
103            copyImplementationTest(o.getImplementationTest(), this.getImplementationTest());
104        }
105        // 'InstanceTest' collection.
106        if (o.instanceTest!= null) {
107            copyInstanceTest(o.getInstanceTest(), this.getInstanceTest());
108        }
109    }
110
111    /**
112     * Gets the value of the schemaConstraintsTest property.
113     * 
114     * <p>
115     * This accessor method returns a reference to the live list,
116     * not a snapshot. Therefore any modification you make to the
117     * returned list will be present inside the JAXB object.
118     * This is why there is not a <CODE>set</CODE> method for the schemaConstraintsTest property.
119     * 
120     * <p>
121     * For example, to add a new item, do as follows:
122     * <pre>
123     *    getSchemaConstraintsTest().add(newItem);
124     * </pre>
125     * 
126     * 
127     * <p>
128     * Objects of the following type(s) are allowed in the list
129     * {@link SchemaConstraintsTestType }
130     * 
131     * 
132     */
133    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
134    public List<SchemaConstraintsTestType> getSchemaConstraintsTest() {
135        if (schemaConstraintsTest == null) {
136            schemaConstraintsTest = new ArrayList<SchemaConstraintsTestType>();
137        }
138        return this.schemaConstraintsTest;
139    }
140
141    /**
142     * Gets the value of the modulesConstraintsTest property.
143     * 
144     * <p>
145     * This accessor method returns a reference to the live list,
146     * not a snapshot. Therefore any modification you make to the
147     * returned list will be present inside the JAXB object.
148     * This is why there is not a <CODE>set</CODE> method for the modulesConstraintsTest property.
149     * 
150     * <p>
151     * For example, to add a new item, do as follows:
152     * <pre>
153     *    getModulesConstraintsTest().add(newItem);
154     * </pre>
155     * 
156     * 
157     * <p>
158     * Objects of the following type(s) are allowed in the list
159     * {@link ModulesConstraintsTestType }
160     * 
161     * 
162     */
163    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
164    public List<ModulesConstraintsTestType> getModulesConstraintsTest() {
165        if (modulesConstraintsTest == null) {
166            modulesConstraintsTest = new ArrayList<ModulesConstraintsTestType>();
167        }
168        return this.modulesConstraintsTest;
169    }
170
171    /**
172     * Gets the value of the implementationTest property.
173     * 
174     * <p>
175     * This accessor method returns a reference to the live list,
176     * not a snapshot. Therefore any modification you make to the
177     * returned list will be present inside the JAXB object.
178     * This is why there is not a <CODE>set</CODE> method for the implementationTest property.
179     * 
180     * <p>
181     * For example, to add a new item, do as follows:
182     * <pre>
183     *    getImplementationTest().add(newItem);
184     * </pre>
185     * 
186     * 
187     * <p>
188     * Objects of the following type(s) are allowed in the list
189     * {@link ImplementationTestType }
190     * 
191     * 
192     */
193    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
194    public List<ImplementationTestType> getImplementationTest() {
195        if (implementationTest == null) {
196            implementationTest = new ArrayList<ImplementationTestType>();
197        }
198        return this.implementationTest;
199    }
200
201    /**
202     * Gets the value of the instanceTest property.
203     * 
204     * <p>
205     * This accessor method returns a reference to the live list,
206     * not a snapshot. Therefore any modification you make to the
207     * returned list will be present inside the JAXB object.
208     * This is why there is not a <CODE>set</CODE> method for the instanceTest property.
209     * 
210     * <p>
211     * For example, to add a new item, do as follows:
212     * <pre>
213     *    getInstanceTest().add(newItem);
214     * </pre>
215     * 
216     * 
217     * <p>
218     * Objects of the following type(s) are allowed in the list
219     * {@link InstanceTestType }
220     * 
221     * 
222     */
223    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
224    public List<InstanceTestType> getInstanceTest() {
225        if (instanceTest == null) {
226            instanceTest = new ArrayList<InstanceTestType>();
227        }
228        return this.instanceTest;
229    }
230
231    /**
232     * Copies all values of property {@code SchemaConstraintsTest} deeply.
233     * 
234     * @param source
235     *     The source to copy from.
236     * @param target
237     *     The target to copy {@code source} to.
238     * @throws NullPointerException
239     *     if {@code target} is {@code null}.
240     */
241    @SuppressWarnings("unchecked")
242    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
243    private static void copySchemaConstraintsTest(final List<SchemaConstraintsTestType> source, final List<SchemaConstraintsTestType> target) {
244        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
245        if ((source!= null)&&(!source.isEmpty())) {
246            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
247                final Object next = it.next();
248                if (next instanceof SchemaConstraintsTestType) {
249                    // CClassInfo: org.jomc.model.test.SchemaConstraintsTestType
250                    target.add(((SchemaConstraintsTestType) next).clone());
251                    continue;
252                }
253                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
254                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'SchemaConstraintsTest' of class 'org.jomc.model.test.TestSuite'."));
255            }
256        }
257    }
258
259    /**
260     * Copies all values of property {@code ModulesConstraintsTest} deeply.
261     * 
262     * @param source
263     *     The source to copy from.
264     * @param target
265     *     The target to copy {@code source} to.
266     * @throws NullPointerException
267     *     if {@code target} is {@code null}.
268     */
269    @SuppressWarnings("unchecked")
270    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
271    private static void copyModulesConstraintsTest(final List<ModulesConstraintsTestType> source, final List<ModulesConstraintsTestType> target) {
272        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
273        if ((source!= null)&&(!source.isEmpty())) {
274            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
275                final Object next = it.next();
276                if (next instanceof ModulesConstraintsTestType) {
277                    // CClassInfo: org.jomc.model.test.ModulesConstraintsTestType
278                    target.add(((ModulesConstraintsTestType) next).clone());
279                    continue;
280                }
281                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
282                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'ModulesConstraintsTest' of class 'org.jomc.model.test.TestSuite'."));
283            }
284        }
285    }
286
287    /**
288     * Copies all values of property {@code ImplementationTest} deeply.
289     * 
290     * @param source
291     *     The source to copy from.
292     * @param target
293     *     The target to copy {@code source} to.
294     * @throws NullPointerException
295     *     if {@code target} is {@code null}.
296     */
297    @SuppressWarnings("unchecked")
298    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
299    private static void copyImplementationTest(final List<ImplementationTestType> source, final List<ImplementationTestType> target) {
300        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
301        if ((source!= null)&&(!source.isEmpty())) {
302            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
303                final Object next = it.next();
304                if (next instanceof ImplementationTestType) {
305                    // CClassInfo: org.jomc.model.test.ImplementationTestType
306                    target.add(((ImplementationTestType) next).clone());
307                    continue;
308                }
309                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
310                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'ImplementationTest' of class 'org.jomc.model.test.TestSuite'."));
311            }
312        }
313    }
314
315    /**
316     * Copies all values of property {@code InstanceTest} deeply.
317     * 
318     * @param source
319     *     The source to copy from.
320     * @param target
321     *     The target to copy {@code source} to.
322     * @throws NullPointerException
323     *     if {@code target} is {@code null}.
324     */
325    @SuppressWarnings("unchecked")
326    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
327    private static void copyInstanceTest(final List<InstanceTestType> source, final List<InstanceTestType> target) {
328        // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
329        if ((source!= null)&&(!source.isEmpty())) {
330            for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
331                final Object next = it.next();
332                if (next instanceof InstanceTestType) {
333                    // CClassInfo: org.jomc.model.test.InstanceTestType
334                    target.add(((InstanceTestType) next).clone());
335                    continue;
336                }
337                // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
338                throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'InstanceTest' of class 'org.jomc.model.test.TestSuite'."));
339            }
340        }
341    }
342
343    /**
344     * Creates and returns a deep copy of this object.
345     * 
346     * 
347     * @return
348     *     A deep copy of this object.
349     */
350    @Override
351    @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
352    public TestSuite clone() {
353        try {
354            {
355                // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
356                final TestSuite clone = ((TestSuite) super.clone());
357                // 'SchemaConstraintsTest' collection.
358                if (this.schemaConstraintsTest!= null) {
359                    clone.schemaConstraintsTest = null;
360                    copySchemaConstraintsTest(this.getSchemaConstraintsTest(), clone.getSchemaConstraintsTest());
361                }
362                // 'ModulesConstraintsTest' collection.
363                if (this.modulesConstraintsTest!= null) {
364                    clone.modulesConstraintsTest = null;
365                    copyModulesConstraintsTest(this.getModulesConstraintsTest(), clone.getModulesConstraintsTest());
366                }
367                // 'ImplementationTest' collection.
368                if (this.implementationTest!= null) {
369                    clone.implementationTest = null;
370                    copyImplementationTest(this.getImplementationTest(), clone.getImplementationTest());
371                }
372                // 'InstanceTest' collection.
373                if (this.instanceTest!= null) {
374                    clone.instanceTest = null;
375                    copyInstanceTest(this.getInstanceTest(), clone.getInstanceTest());
376                }
377                return clone;
378            }
379        } catch (CloneNotSupportedException e) {
380            // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
381            throw new AssertionError(e);
382        }
383    }
384
385}