View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2013.04.21 at 08:43:19 PM CEST 
6   //
7   
8   
9   package org.jomc.model.test;
10  
11  import java.util.ArrayList;
12  import java.util.Iterator;
13  import java.util.List;
14  import javax.annotation.Generated;
15  import javax.xml.bind.annotation.XmlAccessType;
16  import javax.xml.bind.annotation.XmlAccessorType;
17  import javax.xml.bind.annotation.XmlAttribute;
18  import javax.xml.bind.annotation.XmlElement;
19  import javax.xml.bind.annotation.XmlType;
20  
21  
22  /**
23   * Modules validation test.
24   * 
25   * <p>Java class for ModulesConstraintsTestType complex type.
26   * 
27   * <p>The following schema fragment specifies the expected content contained within this class.
28   * 
29   * <pre>
30   * &lt;complexType name="ModulesConstraintsTestType">
31   *   &lt;complexContent>
32   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
33   *       &lt;sequence>
34   *         &lt;element name="modules" type="{http://jomc.org/model/test}AnyModelObject" minOccurs="0"/>
35   *         &lt;element name="detail" type="{http://jomc.org/model/test}ModelValidationReportDetail" maxOccurs="unbounded" minOccurs="0"/>
36   *       &lt;/sequence>
37   *       &lt;attribute name="identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
38   *     &lt;/restriction>
39   *   &lt;/complexContent>
40   * &lt;/complexType>
41   * </pre>
42   * 
43   * 
44   */
45  @XmlAccessorType(XmlAccessType.FIELD)
46  @XmlType(name = "ModulesConstraintsTestType", namespace = "http://jomc.org/model/test", propOrder = {
47      "modules",
48      "detail"
49  })
50  @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
51  public class ModulesConstraintsTestType implements Cloneable
52  {
53  
54      @XmlElement(namespace = "http://jomc.org/model/test")
55      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
56      protected AnyModelObject modules;
57      @XmlElement(namespace = "http://jomc.org/model/test")
58      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
59      protected List<ModelValidationReportDetail> detail;
60      @XmlAttribute(name = "identifier", required = true)
61      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
62      protected String identifier;
63  
64      /**
65       * Creates a new {@code ModulesConstraintsTestType} instance.
66       * 
67       */
68      public ModulesConstraintsTestType() {
69          // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
70          super();
71      }
72  
73      /**
74       * Creates a new {@code ModulesConstraintsTestType} instance by deeply copying a given {@code ModulesConstraintsTestType} instance.
75       * 
76       * 
77       * @param o
78       *     The instance to copy.
79       * @throws NullPointerException
80       *     if {@code o} is {@code null}.
81       */
82      public ModulesConstraintsTestType(final ModulesConstraintsTestType o) {
83          // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
84          super();
85          if (o == null) {
86              throw new NullPointerException("Cannot create a copy of 'ModulesConstraintsTestType' from 'null'.");
87          }
88          // CClassInfo: org.jomc.model.test.AnyModelObject
89          this.modules = ((o.modules == null)?null:((o.getModules() == null)?null:o.getModules().clone()));
90          // 'Detail' collection.
91          if (o.detail!= null) {
92              copyDetail(o.getDetail(), this.getDetail());
93          }
94          // CBuiltinLeafInfo: java.lang.String
95          this.identifier = ((o.identifier == null)?null:o.getIdentifier());
96      }
97  
98      /**
99       * Gets the value of the modules property.
100      * 
101      * @return
102      *     possible object is
103      *     {@link AnyModelObject }
104      *     
105      */
106     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
107     public AnyModelObject getModules() {
108         return modules;
109     }
110 
111     /**
112      * Sets the value of the modules property.
113      * 
114      * @param value
115      *     allowed object is
116      *     {@link AnyModelObject }
117      *     
118      */
119     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
120     public void setModules(AnyModelObject value) {
121         this.modules = value;
122     }
123 
124     /**
125      * Gets the value of the detail property.
126      * 
127      * <p>
128      * This accessor method returns a reference to the live list,
129      * not a snapshot. Therefore any modification you make to the
130      * returned list will be present inside the JAXB object.
131      * This is why there is not a <CODE>set</CODE> method for the detail property.
132      * 
133      * <p>
134      * For example, to add a new item, do as follows:
135      * <pre>
136      *    getDetail().add(newItem);
137      * </pre>
138      * 
139      * 
140      * <p>
141      * Objects of the following type(s) are allowed in the list
142      * {@link ModelValidationReportDetail }
143      * 
144      * 
145      */
146     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
147     public List<ModelValidationReportDetail> getDetail() {
148         if (detail == null) {
149             detail = new ArrayList<ModelValidationReportDetail>();
150         }
151         return this.detail;
152     }
153 
154     /**
155      * Gets the value of the identifier property.
156      * 
157      * @return
158      *     possible object is
159      *     {@link String }
160      *     
161      */
162     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
163     public String getIdentifier() {
164         return identifier;
165     }
166 
167     /**
168      * Sets the value of the identifier property.
169      * 
170      * @param value
171      *     allowed object is
172      *     {@link String }
173      *     
174      */
175     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
176     public void setIdentifier(String value) {
177         this.identifier = value;
178     }
179 
180     /**
181      * Copies all values of property {@code Detail} deeply.
182      * 
183      * @param source
184      *     The source to copy from.
185      * @param target
186      *     The target to copy {@code source} to.
187      * @throws NullPointerException
188      *     if {@code target} is {@code null}.
189      */
190     @SuppressWarnings("unchecked")
191     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
192     private static void copyDetail(final List<ModelValidationReportDetail> source, final List<ModelValidationReportDetail> target) {
193         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
194         if ((source!= null)&&(!source.isEmpty())) {
195             for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
196                 final Object next = it.next();
197                 if (next instanceof ModelValidationReportDetail) {
198                     // CClassInfo: org.jomc.model.test.ModelValidationReportDetail
199                     target.add(((ModelValidationReportDetail) next).clone());
200                     continue;
201                 }
202                 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
203                 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Detail' of class 'org.jomc.model.test.ModulesConstraintsTestType'."));
204             }
205         }
206     }
207 
208     /**
209      * Creates and returns a deep copy of this object.
210      * 
211      * 
212      * @return
213      *     A deep copy of this object.
214      */
215     @Override
216     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:19+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
217     public ModulesConstraintsTestType clone() {
218         try {
219             {
220                 // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
221                 final ModulesConstraintsTestType clone = ((ModulesConstraintsTestType) super.clone());
222                 // CClassInfo: org.jomc.model.test.AnyModelObject
223                 clone.modules = ((this.modules == null)?null:((this.getModules() == null)?null:this.getModules().clone()));
224                 // 'Detail' collection.
225                 if (this.detail!= null) {
226                     clone.detail = null;
227                     copyDetail(this.getDetail(), clone.getDetail());
228                 }
229                 // CBuiltinLeafInfo: java.lang.String
230                 clone.identifier = ((this.identifier == null)?null:this.getIdentifier());
231                 return clone;
232             }
233         } catch (CloneNotSupportedException e) {
234             // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
235             throw new AssertionError(e);
236         }
237     }
238 
239 }