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: 2012.04.01 at 02:40:05 AM CEST 
006    //
007    
008    
009    package org.jomc.model.test;
010    
011    import java.util.ArrayList;
012    import java.util.Iterator;
013    import java.util.List;
014    import javax.annotation.Generated;
015    import javax.xml.bind.annotation.XmlAccessType;
016    import javax.xml.bind.annotation.XmlAccessorType;
017    import javax.xml.bind.annotation.XmlAttribute;
018    import javax.xml.bind.annotation.XmlElement;
019    import javax.xml.bind.annotation.XmlType;
020    
021    
022    /**
023     * Modules validation test.
024     * 
025     * <p>Java class for ModulesConstraintsTestType complex type.
026     * 
027     * <p>The following schema fragment specifies the expected content contained within this class.
028     * 
029     * <pre>
030     * &lt;complexType name="ModulesConstraintsTestType">
031     *   &lt;complexContent>
032     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
033     *       &lt;sequence>
034     *         &lt;element name="modules" type="{http://jomc.org/model/test}AnyModelObject" minOccurs="0"/>
035     *         &lt;element name="detail" type="{http://jomc.org/model/test}ModelValidationReportDetail" maxOccurs="unbounded" minOccurs="0"/>
036     *       &lt;/sequence>
037     *       &lt;attribute name="identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
038     *     &lt;/restriction>
039     *   &lt;/complexContent>
040     * &lt;/complexType>
041     * </pre>
042     * 
043     * 
044     */
045    @XmlAccessorType(XmlAccessType.FIELD)
046    @XmlType(name = "ModulesConstraintsTestType", namespace = "http://jomc.org/model/test", propOrder = {
047        "modules",
048        "detail"
049    })
050    @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-04-01T02:40:05+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
051    public class ModulesConstraintsTestType implements Cloneable
052    {
053    
054        @XmlElement(namespace = "http://jomc.org/model/test")
055        @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-04-01T02:40:05+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
056        protected AnyModelObject modules;
057        @XmlElement(namespace = "http://jomc.org/model/test")
058        @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-04-01T02:40:05+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
059        protected List<ModelValidationReportDetail> detail;
060        @XmlAttribute(name = "identifier", required = true)
061        @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-04-01T02:40:05+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
062        protected String identifier;
063    
064        /**
065         * Creates a new {@code ModulesConstraintsTestType} instance.
066         * 
067         */
068        public ModulesConstraintsTestType() {
069            // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
070            super();
071        }
072    
073        /**
074         * Creates a new {@code ModulesConstraintsTestType} instance by deeply copying a given {@code ModulesConstraintsTestType} instance.
075         * 
076         * 
077         * @param o
078         *     The instance to copy.
079         * @throws NullPointerException
080         *     if {@code o} is {@code null}.
081         */
082        public ModulesConstraintsTestType(final ModulesConstraintsTestType o) {
083            // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000
084            super();
085            if (o == null) {
086                throw new NullPointerException("Cannot create a copy of 'ModulesConstraintsTestType' from 'null'.");
087            }
088            // CClassInfo: org.jomc.model.test.AnyModelObject
089            this.modules = ((o.modules == null)?null:((o.getModules() == null)?null:o.getModules().clone()));
090            // 'Detail' collection.
091            if (o.detail!= null) {
092                copyDetail(o.getDetail(), this.getDetail());
093            }
094            // CBuiltinLeafInfo: java.lang.String
095            this.identifier = ((o.identifier == null)?null:o.getIdentifier());
096        }
097    
098        /**
099         * 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 = "2012-04-01T02:40:05+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 = "2012-04-01T02:40:05+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 = "2012-04-01T02:40:05+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 = "2012-04-01T02:40:05+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 = "2012-04-01T02:40:05+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 = "2012-04-01T02:40:05+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 Build 2011-09-16T18:27:24+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 = "2012-04-01T02:40:05+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
217        public ModulesConstraintsTestType clone() {
218            try {
219                {
220                    // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+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    }