001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
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: 2009.12.07 at 03:06:36 AM UTC 
006    //
007    
008    
009    package org.jomc.model;
010    
011    import java.io.ByteArrayInputStream;
012    import java.io.ByteArrayOutputStream;
013    import java.io.IOException;
014    import java.io.InvalidClassException;
015    import java.io.NotSerializableException;
016    import java.io.ObjectInputStream;
017    import java.io.ObjectOutputStream;
018    import java.io.OptionalDataException;
019    import java.io.Serializable;
020    import java.io.StreamCorruptedException;
021    import java.lang.reflect.Array;
022    import java.lang.reflect.InvocationTargetException;
023    import java.math.BigDecimal;
024    import java.math.BigInteger;
025    import java.util.ArrayList;
026    import java.util.Calendar;
027    import java.util.Currency;
028    import java.util.Date;
029    import java.util.Iterator;
030    import java.util.List;
031    import java.util.Locale;
032    import java.util.TimeZone;
033    import java.util.UUID;
034    import javax.annotation.Generated;
035    import javax.xml.bind.JAXBElement;
036    import javax.xml.bind.annotation.XmlAccessType;
037    import javax.xml.bind.annotation.XmlAccessorType;
038    import javax.xml.bind.annotation.XmlAnyElement;
039    import javax.xml.bind.annotation.XmlAttribute;
040    import javax.xml.bind.annotation.XmlType;
041    import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
042    import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
043    import javax.xml.datatype.Duration;
044    import javax.xml.datatype.XMLGregorianCalendar;
045    import javax.xml.namespace.QName;
046    import org.w3c.dom.Element;
047    
048    
049    /**
050     * 
051     * Model of an implementation.
052     * 
053     * The 'Implementation' type defines attributes 'identifier', 'name', 'class', 'location', 'vendor', 'version', 'final',
054     * 'stateless' and 'abstract'. Attribute 'identifier' holds an identifier uniquely identifying the implementation in a set
055     * of implementations. Attribute 'name' holds a name uniquely identifying the implementation for its implemented
056     * specifications. Attribute 'class' holds an identifier of the class providing implementation instances. Attribute
057     * 'location' holds an URI of the location of instances of the implementation. Attribute 'vendor' holds vendor information
058     * for the vendor providing the implementation. Attribute 'version' holds a version of the implementation. Dependencies,
059     * messages, properties and specifications may be inherited from multiple parent implementations. The 'final' attribute
060     * flags an implementation the final node in an inheritance hierarchy. The 'stateless' attribute indicates that instances
061     * of the implementation do not retain state across operations. The 'abstract' attribute flags an implementation abstract.
062     *       
063     * 
064     * <p>Java class for Implementation complex type.
065     * 
066     * <p>The following schema fragment specifies the expected content contained within this class.
067     * 
068     * <pre>
069     * &lt;complexType name="Implementation">
070     *   &lt;complexContent>
071     *     &lt;extension base="{http://jomc.org/model}ModelObject">
072     *       &lt;sequence>
073     *         &lt;element ref="{http://jomc.org/model}specifications" minOccurs="0"/>
074     *         &lt;element ref="{http://jomc.org/model}implementations" minOccurs="0"/>
075     *         &lt;element ref="{http://jomc.org/model}dependencies" minOccurs="0"/>
076     *         &lt;element ref="{http://jomc.org/model}properties" minOccurs="0"/>
077     *         &lt;element ref="{http://jomc.org/model}messages" minOccurs="0"/>
078     *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
079     *       &lt;/sequence>
080     *       &lt;attribute name="identifier" use="required" type="{http://jomc.org/model}Identifier" />
081     *       &lt;attribute name="name" use="required" type="{http://jomc.org/model}Identifier" />
082     *       &lt;attribute name="class" type="{http://jomc.org/model}Identifier" />
083     *       &lt;attribute name="location" type="{http://jomc.org/model}URI" />
084     *       &lt;attribute name="vendor" type="{http://jomc.org/model}String" />
085     *       &lt;attribute name="version" type="{http://jomc.org/model}Version" />
086     *       &lt;attribute name="final" type="{http://jomc.org/model}Flag" default="false" />
087     *       &lt;attribute name="stateless" type="{http://jomc.org/model}Flag" default="false" />
088     *       &lt;attribute name="abstract" type="{http://jomc.org/model}Flag" default="false" />
089     *     &lt;/extension>
090     *   &lt;/complexContent>
091     * &lt;/complexType>
092     * </pre>
093     * 
094     * 
095     */
096    @XmlAccessorType(XmlAccessType.FIELD)
097    @XmlType(name = "Implementation", propOrder = {
098        "specifications",
099        "implementations",
100        "dependencies",
101        "properties",
102        "messages",
103        "any"
104    })
105    @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
106    public class Implementation
107        extends ModelObject
108        implements Cloneable
109    {
110    
111        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
112        protected Specifications specifications;
113        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
114        protected Implementations implementations;
115        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
116        protected Dependencies dependencies;
117        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
118        protected Properties properties;
119        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
120        protected Messages messages;
121        @XmlAnyElement(lax = true)
122        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
123        protected List<Object> any;
124        @XmlAttribute(required = true)
125        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
126        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
127        protected String identifier;
128        @XmlAttribute(required = true)
129        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
130        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
131        protected String name;
132        @XmlAttribute(name = "class")
133        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
134        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
135        protected String clazz;
136        @XmlAttribute
137        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
138        protected String location;
139        @XmlAttribute
140        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
141        protected String vendor;
142        @XmlAttribute
143        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
144        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
145        protected String version;
146        @XmlAttribute(name = "final")
147        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
148        protected Boolean _final;
149        @XmlAttribute
150        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
151        protected Boolean stateless;
152        @XmlAttribute(name = "abstract")
153        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
154        protected Boolean _abstract;
155    
156        /**
157         * Creates a new {@code Implementation} instance.
158         * 
159         */
160        public Implementation() {
161            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
162            super();
163        }
164    
165        /**
166         * Creates a new {@code Implementation} instance by deeply copying a given {@code Implementation} instance.
167         * 
168         * 
169         * @param o
170         *     The instance to copy.
171         * @throws NullPointerException
172         *     if {@code o} is {@code null}.
173         */
174        public Implementation(final Implementation o) {
175            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
176            super(o);
177            if (o == null) {
178                throw new NullPointerException("Cannot create a copy of 'Implementation' from 'null'.");
179            }
180            // CClassInfo: org.jomc.model.Specifications
181            this.specifications = ((o.getSpecifications() == null)?null:o.getSpecifications().clone());
182            // CClassInfo: org.jomc.model.Implementations
183            this.implementations = ((o.getImplementations() == null)?null:o.getImplementations().clone());
184            // CClassInfo: org.jomc.model.Dependencies
185            this.dependencies = ((o.getDependencies() == null)?null:o.getDependencies().clone());
186            // CClassInfo: org.jomc.model.Properties
187            this.properties = ((o.getProperties() == null)?null:o.getProperties().clone());
188            // CClassInfo: org.jomc.model.Messages
189            this.messages = ((o.getMessages() == null)?null:o.getMessages().clone());
190            // 'Any' collection.
191            copyAny(o.getAny(), getAny());
192            // CBuiltinLeafInfo: java.lang.String
193            this.identifier = o.getIdentifier();
194            // CBuiltinLeafInfo: java.lang.String
195            this.name = o.getName();
196            // CBuiltinLeafInfo: java.lang.String
197            this.clazz = o.getClazz();
198            // CBuiltinLeafInfo: java.lang.String
199            this.location = o.getLocation();
200            // CBuiltinLeafInfo: java.lang.String
201            this.vendor = o.getVendor();
202            // CBuiltinLeafInfo: java.lang.String
203            this.version = o.getVersion();
204            // CBuiltinLeafInfo: java.lang.Boolean
205            this._final = o.isFinal();
206            // CBuiltinLeafInfo: java.lang.Boolean
207            this.stateless = o.isStateless();
208            // CBuiltinLeafInfo: java.lang.Boolean
209            this._abstract = o.isAbstract();
210        }
211    
212        /**
213         * References to specifications implemented by this implementation or {@code null}.
214         * 
215         * @return
216         *     possible object is
217         *     {@link Specifications }
218         *     
219         */
220        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
221        public Specifications getSpecifications() {
222            return specifications;
223        }
224    
225        /**
226         * Sets the value of the specifications property.
227         * 
228         * @param value
229         *     allowed object is
230         *     {@link Specifications }
231         *     
232         */
233        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
234        public void setSpecifications(Specifications value) {
235            this.specifications = value;
236        }
237    
238        /**
239         * References to implementations this implementation inherits from or {@code null}.
240         * 
241         * @return
242         *     possible object is
243         *     {@link Implementations }
244         *     
245         */
246        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
247        public Implementations getImplementations() {
248            return implementations;
249        }
250    
251        /**
252         * Sets the value of the implementations property.
253         * 
254         * @param value
255         *     allowed object is
256         *     {@link Implementations }
257         *     
258         */
259        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
260        public void setImplementations(Implementations value) {
261            this.implementations = value;
262        }
263    
264        /**
265         * Dependencies of this implementation or {@code null}.
266         * 
267         * @return
268         *     possible object is
269         *     {@link Dependencies }
270         *     
271         */
272        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
273        public Dependencies getDependencies() {
274            return dependencies;
275        }
276    
277        /**
278         * Sets the value of the dependencies property.
279         * 
280         * @param value
281         *     allowed object is
282         *     {@link Dependencies }
283         *     
284         */
285        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
286        public void setDependencies(Dependencies value) {
287            this.dependencies = value;
288        }
289    
290        /**
291         * Properties of this implementation or {@code null}.
292         * 
293         * @return
294         *     possible object is
295         *     {@link Properties }
296         *     
297         */
298        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
299        public Properties getProperties() {
300            return properties;
301        }
302    
303        /**
304         * Sets the value of the properties property.
305         * 
306         * @param value
307         *     allowed object is
308         *     {@link Properties }
309         *     
310         */
311        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
312        public void setProperties(Properties value) {
313            this.properties = value;
314        }
315    
316        /**
317         * Messages of this implementation or {@code null}.
318         * 
319         * @return
320         *     possible object is
321         *     {@link Messages }
322         *     
323         */
324        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
325        public Messages getMessages() {
326            return messages;
327        }
328    
329        /**
330         * Sets the value of the messages property.
331         * 
332         * @param value
333         *     allowed object is
334         *     {@link Messages }
335         *     
336         */
337        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
338        public void setMessages(Messages value) {
339            this.messages = value;
340        }
341    
342        /**
343         * Gets the value of the any property.
344         * 
345         * <p>
346         * This accessor method returns a reference to the live list,
347         * not a snapshot. Therefore any modification you make to the
348         * returned list will be present inside the JAXB object.
349         * This is why there is not a <CODE>set</CODE> method for the any property.
350         * 
351         * <p>
352         * For example, to add a new item, do as follows:
353         * <pre>
354         *    getAny().add(newItem);
355         * </pre>
356         * 
357         * 
358         * <p>
359         * Objects of the following type(s) are allowed in the list
360         * {@link Element }
361         * {@link Object }
362         * 
363         * 
364         */
365        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
366        public List<Object> getAny() {
367            if (any == null) {
368                any = new ArrayList<Object>();
369            }
370            return this.any;
371        }
372    
373        /**
374         * The identifier of this implementation.
375         * 
376         * @return
377         *     possible object is
378         *     {@link String }
379         *     
380         */
381        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
382        public String getIdentifier() {
383            return identifier;
384        }
385    
386        /**
387         * Sets the value of the identifier property.
388         * 
389         * @param value
390         *     allowed object is
391         *     {@link String }
392         *     
393         */
394        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
395        public void setIdentifier(String value) {
396            this.identifier = value;
397        }
398    
399        /**
400         * The name of this implementation.
401         * 
402         * @return
403         *     possible object is
404         *     {@link String }
405         *     
406         */
407        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
408        public String getName() {
409            return name;
410        }
411    
412        /**
413         * Sets the value of the name property.
414         * 
415         * @param value
416         *     allowed object is
417         *     {@link String }
418         *     
419         */
420        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
421        public void setName(String value) {
422            this.name = value;
423        }
424    
425        /**
426         * The identifier of the class providing instances of this implementation or {@code null}.
427         * 
428         * @return
429         *     possible object is
430         *     {@link String }
431         *     
432         */
433        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
434        public String getClazz() {
435            return clazz;
436        }
437    
438        /**
439         * Sets the value of the clazz property.
440         * 
441         * @param value
442         *     allowed object is
443         *     {@link String }
444         *     
445         */
446        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
447        public void setClazz(String value) {
448            this.clazz = value;
449        }
450    
451        /**
452         * An URI of the location providing instances of this implementation or {@code null}.
453         * 
454         * @return
455         *     possible object is
456         *     {@link String }
457         *     
458         */
459        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
460        public String getLocation() {
461            return location;
462        }
463    
464        /**
465         * Sets the value of the location property.
466         * 
467         * @param value
468         *     allowed object is
469         *     {@link String }
470         *     
471         */
472        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
473        public void setLocation(String value) {
474            this.location = value;
475        }
476    
477        /**
478         * The vendor of this implementation or {@code null}.
479         * 
480         * @return
481         *     possible object is
482         *     {@link String }
483         *     
484         */
485        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
486        public String getVendor() {
487            return vendor;
488        }
489    
490        /**
491         * Sets the value of the vendor property.
492         * 
493         * @param value
494         *     allowed object is
495         *     {@link String }
496         *     
497         */
498        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
499        public void setVendor(String value) {
500            this.vendor = value;
501        }
502    
503        /**
504         * The version of this implementation or {@code null}.
505         * 
506         * @return
507         *     possible object is
508         *     {@link String }
509         *     
510         */
511        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
512        public String getVersion() {
513            return version;
514        }
515    
516        /**
517         * Sets the value of the version property.
518         * 
519         * @param value
520         *     allowed object is
521         *     {@link String }
522         *     
523         */
524        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
525        public void setVersion(String value) {
526            this.version = value;
527        }
528    
529        /**
530         * {@code true} if this implementation is the final node in an inheritance hierarchy.
531         * 
532         * @return
533         *     possible object is
534         *     {@link Boolean }
535         *     
536         */
537        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
538        public boolean isFinal() {
539            if (_final == null) {
540                return false;
541            } else {
542                return _final;
543            }
544        }
545    
546        /**
547         * Sets the value of the final property.
548         * 
549         * @param value
550         *     allowed object is
551         *     {@link Boolean }
552         *     
553         */
554        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
555        public void setFinal(Boolean value) {
556            this._final = value;
557        }
558    
559        /**
560         * {@code true} if instances of this implementation do not retain state across operations.
561         * 
562         * @return
563         *     possible object is
564         *     {@link Boolean }
565         *     
566         */
567        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
568        public boolean isStateless() {
569            if (stateless == null) {
570                return false;
571            } else {
572                return stateless;
573            }
574        }
575    
576        /**
577         * Sets the value of the stateless property.
578         * 
579         * @param value
580         *     allowed object is
581         *     {@link Boolean }
582         *     
583         */
584        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
585        public void setStateless(Boolean value) {
586            this.stateless = value;
587        }
588    
589        /**
590         * {@code true} if this implementation is abstract.
591         * 
592         * @return
593         *     possible object is
594         *     {@link Boolean }
595         *     
596         */
597        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
598        public boolean isAbstract() {
599            if (_abstract == null) {
600                return false;
601            } else {
602                return _abstract;
603            }
604        }
605    
606        /**
607         * Sets the value of the abstract property.
608         * 
609         * @param value
610         *     allowed object is
611         *     {@link Boolean }
612         *     
613         */
614        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
615        public void setAbstract(Boolean value) {
616            this._abstract = value;
617        }
618    
619        /**
620         * Copies all values of property {@code Any} deeply.
621         * 
622         * @param target
623         *     The target to copy {@code source} to.
624         * @param source
625         *     The source to copy from.
626         * @throws NullPointerException
627         *     if {@code source} or {@code target} is {@code null}.
628         */
629        @SuppressWarnings("unchecked")
630        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
631        private static void copyAny(final List<Object> source, final List<Object> target) {
632            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
633            if (!source.isEmpty()) {
634                for (Iterator it = source.iterator(); it.hasNext(); ) {
635                    final Object next = it.next();
636                    if (next instanceof Element) {
637                        // CWildcardTypeInfo: org.w3c.dom.Element
638                        target.add(((Element)((Element) next).cloneNode(true)));
639                        continue;
640                    }
641                    if (next instanceof Object) {
642                        // CBuiltinLeafInfo: java.lang.Object
643                        target.add(copyOfObject(((Object) next)));
644                        continue;
645                    }
646                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
647                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.model.Implementation'."));
648                }
649            }
650        }
651    
652        /**
653         * Creates and returns a deep copy of a given object.
654         * 
655         * @param o
656         *     The instance to copy or {@code null}.
657         * @return
658         *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
659         */
660        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
661        private static Object copyOfObject(final Object o) {
662            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
663            if (o!= null) {
664                if (o.getClass().isPrimitive()) {
665                    return o;
666                }
667                if (o.getClass().isArray()) {
668                    return copyOfArray(o);
669                }
670                if (o instanceof Boolean) {
671                    return o;
672                }
673                if (o instanceof Byte) {
674                    return o;
675                }
676                if (o instanceof Character) {
677                    return o;
678                }
679                if (o instanceof Double) {
680                    return o;
681                }
682                if (o instanceof Enum) {
683                    return o;
684                }
685                if (o instanceof Float) {
686                    return o;
687                }
688                if (o instanceof Integer) {
689                    return o;
690                }
691                if (o instanceof Long) {
692                    return o;
693                }
694                if (o instanceof Short) {
695                    return o;
696                }
697                if (o instanceof String) {
698                    return o;
699                }
700                if (o instanceof BigDecimal) {
701                    return o;
702                }
703                if (o instanceof BigInteger) {
704                    return o;
705                }
706                if (o instanceof UUID) {
707                    return o;
708                }
709                if (o instanceof QName) {
710                    return o;
711                }
712                if (o instanceof Duration) {
713                    return o;
714                }
715                if (o instanceof Currency) {
716                    return o;
717                }
718                if (o instanceof XMLGregorianCalendar) {
719                    return ((XMLGregorianCalendar) o).clone();
720                }
721                if (o instanceof Date) {
722                    return ((Date) o).clone();
723                }
724                if (o instanceof Calendar) {
725                    return ((Calendar) o).clone();
726                }
727                if (o instanceof TimeZone) {
728                    return ((TimeZone) o).clone();
729                }
730                if (o instanceof Locale) {
731                    return ((Locale) o).clone();
732                }
733                if (o instanceof Element) {
734                    return ((Element)((Element) o).cloneNode(true));
735                }
736                if (o instanceof JAXBElement) {
737                    return copyOFJAXBElement(((JAXBElement) o));
738                }
739                try {
740                    return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
741                } catch (NoSuchMethodException e) {
742                    if (o instanceof Serializable) {
743                        return copyOfSerializable(((Serializable) o));
744                    }
745                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
746                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
747                } catch (IllegalAccessException e) {
748                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
749                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
750                } catch (InvocationTargetException e) {
751                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
752                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
753                } catch (SecurityException e) {
754                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
755                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
756                } catch (IllegalArgumentException e) {
757                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
758                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
759                } catch (ExceptionInInitializerError e) {
760                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
761                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
762                }
763            }
764            return null;
765        }
766    
767        /**
768         * Creates and returns a deep copy of a given array.
769         * 
770         * @param array
771         *     The array to copy or {@code null}.
772         * @return
773         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
774         */
775        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
776        private static Object copyOfArray(final Object array) {
777            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
778            if (array!= null) {
779                if (array.getClass() == boolean[].class) {
780                    return copyOf(((boolean[]) array));
781                }
782                if (array.getClass() == byte[].class) {
783                    return copyOf(((byte[]) array));
784                }
785                if (array.getClass() == char[].class) {
786                    return copyOf(((char[]) array));
787                }
788                if (array.getClass() == double[].class) {
789                    return copyOf(((double[]) array));
790                }
791                if (array.getClass() == float[].class) {
792                    return copyOf(((float[]) array));
793                }
794                if (array.getClass() == int[].class) {
795                    return copyOf(((int[]) array));
796                }
797                if (array.getClass() == long[].class) {
798                    return copyOf(((long[]) array));
799                }
800                if (array.getClass() == short[].class) {
801                    return copyOf(((short[]) array));
802                }
803                final int len = Array.getLength(array);
804                final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
805                for (int i = (len- 1); (i >= 0); i--) {
806                    Array.set(copy, i, copyOfObject(Array.get(array, i)));
807                }
808                return copy;
809            }
810            return null;
811        }
812    
813        /**
814         * Creates and returns a deep copy of a given array.
815         * 
816         * @param array
817         *     The array to copy or {@code null}.
818         * @return
819         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
820         */
821        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
822        private static boolean[] copyOf(final boolean[] array) {
823            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
824            if (array!= null) {
825                final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
826                System.arraycopy(array, 0, copy, 0, array.length);
827                return copy;
828            }
829            return null;
830        }
831    
832        /**
833         * Creates and returns a deep copy of a given array.
834         * 
835         * @param array
836         *     The array to copy or {@code null}.
837         * @return
838         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
839         */
840        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
841        private static byte[] copyOf(final byte[] array) {
842            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
843            if (array!= null) {
844                final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
845                System.arraycopy(array, 0, copy, 0, array.length);
846                return copy;
847            }
848            return null;
849        }
850    
851        /**
852         * Creates and returns a deep copy of a given array.
853         * 
854         * @param array
855         *     The array to copy or {@code null}.
856         * @return
857         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
858         */
859        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
860        private static char[] copyOf(final char[] array) {
861            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
862            if (array!= null) {
863                final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
864                System.arraycopy(array, 0, copy, 0, array.length);
865                return copy;
866            }
867            return null;
868        }
869    
870        /**
871         * Creates and returns a deep copy of a given array.
872         * 
873         * @param array
874         *     The array to copy or {@code null}.
875         * @return
876         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
877         */
878        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
879        private static double[] copyOf(final double[] array) {
880            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
881            if (array!= null) {
882                final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
883                System.arraycopy(array, 0, copy, 0, array.length);
884                return copy;
885            }
886            return null;
887        }
888    
889        /**
890         * Creates and returns a deep copy of a given array.
891         * 
892         * @param array
893         *     The array to copy or {@code null}.
894         * @return
895         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
896         */
897        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
898        private static float[] copyOf(final float[] array) {
899            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
900            if (array!= null) {
901                final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
902                System.arraycopy(array, 0, copy, 0, array.length);
903                return copy;
904            }
905            return null;
906        }
907    
908        /**
909         * Creates and returns a deep copy of a given array.
910         * 
911         * @param array
912         *     The array to copy or {@code null}.
913         * @return
914         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
915         */
916        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
917        private static int[] copyOf(final int[] array) {
918            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
919            if (array!= null) {
920                final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
921                System.arraycopy(array, 0, copy, 0, array.length);
922                return copy;
923            }
924            return null;
925        }
926    
927        /**
928         * Creates and returns a deep copy of a given array.
929         * 
930         * @param array
931         *     The array to copy or {@code null}.
932         * @return
933         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
934         */
935        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
936        private static long[] copyOf(final long[] array) {
937            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
938            if (array!= null) {
939                final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
940                System.arraycopy(array, 0, copy, 0, array.length);
941                return copy;
942            }
943            return null;
944        }
945    
946        /**
947         * Creates and returns a deep copy of a given array.
948         * 
949         * @param array
950         *     The array to copy or {@code null}.
951         * @return
952         *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
953         */
954        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
955        private static short[] copyOf(final short[] array) {
956            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
957            if (array!= null) {
958                final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
959                System.arraycopy(array, 0, copy, 0, array.length);
960                return copy;
961            }
962            return null;
963        }
964    
965        /**
966         * Creates and returns a deep copy of a given {@code JAXBElement} instance.
967         * 
968         * @param element
969         *     The instance to copy or {@code null}.
970         * @return
971         *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
972         */
973        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
974        private static JAXBElement copyOFJAXBElement(final JAXBElement element) {
975            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
976            if (element!= null) {
977                final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
978                copy.setNil(element.isNil());
979                copy.setValue(copyOfObject(copy.getValue()));
980                return copy;
981            }
982            return null;
983        }
984    
985        /**
986         * Creates and returns a deep copy of a given {@code Serializable}.
987         * 
988         * @param serializable
989         *     The instance to copy or {@code null}.
990         * @return
991         *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
992         */
993        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
994        private static Serializable copyOfSerializable(final Serializable serializable) {
995            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
996            if (serializable!= null) {
997                try {
998                    final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
999                    final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
1000                    out.writeObject(serializable);
1001                    out.close();
1002                    final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
1003                    final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
1004                    final Serializable copy = ((Serializable) in.readObject());
1005                    in.close();
1006                    return copy;
1007                } catch (SecurityException e) {
1008                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1009                } catch (ClassNotFoundException e) {
1010                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1011                } catch (InvalidClassException e) {
1012                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1013                } catch (NotSerializableException e) {
1014                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1015                } catch (StreamCorruptedException e) {
1016                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1017                } catch (OptionalDataException e) {
1018                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1019                } catch (IOException e) {
1020                    throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
1021                }
1022            }
1023            return null;
1024        }
1025    
1026        /**
1027         * Creates and returns a deep copy of this object.
1028         * 
1029         * 
1030         * @return
1031         *     A deep copy of this object.
1032         */
1033        @Override
1034        @Generated(value = "com.sun.tools.xjc.Driver", date = "2009-12-07T03:06:36+00:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
1035        public Implementation clone() {
1036            // CC-XJC Version 1.2 Build 2009-11-15T21:50:02+0000
1037            return new Implementation(this);
1038        }
1039        
1040        /**
1041         * Gets the location URI used for locating instances of this implementation.
1042         *
1043         * @return The location URI used for locating instances of this implementation or {@code null}, if instances of this
1044         * implementation do not need to be located.
1045         *
1046         * @see #getLocation()
1047         */
1048        public java.net.URI getLocationUri()
1049        {
1050            try
1051            {
1052                java.net.URI javaLocation = null;
1053    
1054                if ( this.getLocation() != null )
1055                {
1056                    javaLocation = new java.net.URI( this.getLocation() );
1057                }
1058    
1059                return javaLocation;
1060            }
1061            catch ( java.net.URISyntaxException e )
1062            {
1063                throw new AssertionError( e );
1064            }
1065        }
1066    
1067          
1068    }