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.01.04 at 08:47:18 AM MEZ 
6   //
7   
8   
9   package org.jomc.modlet;
10  
11  import java.io.ByteArrayInputStream;
12  import java.io.ByteArrayOutputStream;
13  import java.io.File;
14  import java.io.IOException;
15  import java.io.InvalidClassException;
16  import java.io.NotSerializableException;
17  import java.io.ObjectInputStream;
18  import java.io.ObjectOutputStream;
19  import java.io.OptionalDataException;
20  import java.io.Serializable;
21  import java.io.StreamCorruptedException;
22  import java.lang.reflect.Array;
23  import java.lang.reflect.InvocationTargetException;
24  import java.math.BigDecimal;
25  import java.math.BigInteger;
26  import java.net.MalformedURLException;
27  import java.net.URI;
28  import java.net.URISyntaxException;
29  import java.net.URL;
30  import java.util.ArrayList;
31  import java.util.Calendar;
32  import java.util.Currency;
33  import java.util.Date;
34  import java.util.Iterator;
35  import java.util.List;
36  import java.util.Locale;
37  import java.util.TimeZone;
38  import java.util.UUID;
39  import javax.activation.MimeType;
40  import javax.activation.MimeTypeParseException;
41  import javax.annotation.Generated;
42  import javax.xml.bind.JAXBElement;
43  import javax.xml.bind.annotation.XmlAccessType;
44  import javax.xml.bind.annotation.XmlAccessorType;
45  import javax.xml.bind.annotation.XmlAnyElement;
46  import javax.xml.bind.annotation.XmlAttribute;
47  import javax.xml.bind.annotation.XmlType;
48  import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
49  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
50  import javax.xml.datatype.Duration;
51  import javax.xml.datatype.XMLGregorianCalendar;
52  import javax.xml.namespace.QName;
53  import org.w3c.dom.Element;
54  
55  
56  /**
57   * Property.
58   * 
59   * <p>Java class for Property complex type.
60   * 
61   * <p>The following schema fragment specifies the expected content contained within this class.
62   * 
63   * <pre>
64   * &lt;complexType name="Property">
65   *   &lt;complexContent>
66   *     &lt;extension base="{http://jomc.org/modlet}ModletObject">
67   *       &lt;sequence>
68   *         &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
69   *       &lt;/sequence>
70   *       &lt;attribute name="name" use="required" type="{http://jomc.org/modlet}Identifier" />
71   *       &lt;attribute name="value" type="{http://jomc.org/modlet}String" />
72   *     &lt;/extension>
73   *   &lt;/complexContent>
74   * &lt;/complexType>
75   * </pre>
76   * 
77   * 
78   */
79  @XmlAccessorType(XmlAccessType.FIELD)
80  @XmlType(name = "Property", namespace = "http://jomc.org/modlet", propOrder = {
81      "any"
82  })
83  @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
84  public class Property
85      extends ModletObject
86      implements Cloneable
87  {
88  
89      @XmlAnyElement(lax = true)
90      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
91      protected List<Object> any;
92      @XmlAttribute(name = "name", required = true)
93      @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
94      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
95      protected String name;
96      @XmlAttribute(name = "value")
97      @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
98      protected String value;
99  
100     /**
101      * Creates a new {@code Property} instance.
102      * 
103      */
104     public Property() {
105         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
106         super();
107     }
108 
109     /**
110      * Creates a new {@code Property} instance by deeply copying a given {@code Property} instance.
111      * 
112      * 
113      * @param o
114      *     The instance to copy.
115      * @throws NullPointerException
116      *     if {@code o} is {@code null}.
117      */
118     public Property(final Property o) {
119         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
120         super(o);
121         if (o == null) {
122             throw new NullPointerException("Cannot create a copy of 'Property' from 'null'.");
123         }
124         // 'Any' collection.
125         if (o.any!= null) {
126             copyAny(o.getAny(), this.getAny());
127         }
128         // CBuiltinLeafInfo: java.lang.String
129         this.name = ((o.name == null)?null:o.getName());
130         // CBuiltinLeafInfo: java.lang.String
131         this.value = ((o.value == null)?null:o.getValue());
132     }
133 
134     /**
135      * Gets the value of the any property.
136      * 
137      * <p>
138      * This accessor method returns a reference to the live list,
139      * not a snapshot. Therefore any modification you make to the
140      * returned list will be present inside the JAXB object.
141      * This is why there is not a <CODE>set</CODE> method for the any property.
142      * 
143      * <p>
144      * For example, to add a new item, do as follows:
145      * <pre>
146      *    getAny().add(newItem);
147      * </pre>
148      * 
149      * 
150      * <p>
151      * Objects of the following type(s) are allowed in the list
152      * {@link Object }
153      * {@link Element }
154      * 
155      * 
156      */
157     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
158     public List<Object> getAny() {
159         if (any == null) {
160             any = new ArrayList<Object>();
161         }
162         return this.any;
163     }
164 
165     /**
166      * The name of the property.
167      * 
168      * @return
169      *     possible object is
170      *     {@link String }
171      *     
172      */
173     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
174     public String getName() {
175         return name;
176     }
177 
178     /**
179      * Sets the value of the name property.
180      * 
181      * @param value
182      *     allowed object is
183      *     {@link String }
184      *     
185      */
186     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
187     public void setName(String value) {
188         this.name = value;
189     }
190 
191     /**
192      * The value of the property.
193      * 
194      * @return
195      *     possible object is
196      *     {@link String }
197      *     
198      */
199     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
200     public String getValue() {
201         return value;
202     }
203 
204     /**
205      * Sets the value of the value property.
206      * 
207      * @param value
208      *     allowed object is
209      *     {@link String }
210      *     
211      */
212     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
213     public void setValue(String value) {
214         this.value = value;
215     }
216 
217     /**
218      * Copies all values of property {@code Any} deeply.
219      * 
220      * @param source
221      *     The source to copy from.
222      * @param target
223      *     The target to copy {@code source} to.
224      * @throws NullPointerException
225      *     if {@code target} is {@code null}.
226      */
227     @SuppressWarnings("unchecked")
228     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
229     private static void copyAny(final List<Object> source, final List<Object> target) {
230         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
231         if ((source!= null)&&(!source.isEmpty())) {
232             for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
233                 final Object next = it.next();
234                 if (next instanceof Element) {
235                     // CWildcardTypeInfo: org.w3c.dom.Element
236                     target.add(((Element)((Element) next).cloneNode(true)));
237                     continue;
238                 }
239                 if (next instanceof Object) {
240                     // CBuiltinLeafInfo: java.lang.Object
241                     target.add(copyOf(((Object) next)));
242                     continue;
243                 }
244                 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
245                 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.modlet.Property'."));
246             }
247         }
248     }
249 
250     /**
251      * Creates and returns a deep copy of a given object.
252      * 
253      * @param o
254      *     The instance to copy or {@code null}.
255      * @return
256      *     A deep copy of {@code o} or {@code null} if {@code o} is {@code null}.
257      */
258     @SuppressWarnings("unchecked")
259     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
260     private static Object copyOf(final Object o) {
261         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
262         try {
263             if (o!= null) {
264                 if (o.getClass().isPrimitive()) {
265                     return o;
266                 }
267                 if (o.getClass().isArray()) {
268                     return copyOfArray(o);
269                 }
270                 // Immutable types.
271                 if (o instanceof Boolean) {
272                     return o;
273                 }
274                 if (o instanceof Byte) {
275                     return o;
276                 }
277                 if (o instanceof Character) {
278                     return o;
279                 }
280                 if (o instanceof Double) {
281                     return o;
282                 }
283                 if (o instanceof Enum) {
284                     return o;
285                 }
286                 if (o instanceof Float) {
287                     return o;
288                 }
289                 if (o instanceof Integer) {
290                     return o;
291                 }
292                 if (o instanceof Long) {
293                     return o;
294                 }
295                 if (o instanceof Short) {
296                     return o;
297                 }
298                 if (o instanceof String) {
299                     return o;
300                 }
301                 if (o instanceof BigDecimal) {
302                     return o;
303                 }
304                 if (o instanceof BigInteger) {
305                     return o;
306                 }
307                 if (o instanceof UUID) {
308                     return o;
309                 }
310                 if (o instanceof QName) {
311                     return o;
312                 }
313                 if (o instanceof Duration) {
314                     return o;
315                 }
316                 if (o instanceof Currency) {
317                     return o;
318                 }
319                 // String based types.
320                 if (o instanceof File) {
321                     return new File(o.toString());
322                 }
323                 if (o instanceof URI) {
324                     return new URI(o.toString());
325                 }
326                 if (o instanceof URL) {
327                     return new URL(o.toString());
328                 }
329                 if (o instanceof MimeType) {
330                     return new MimeType(o.toString());
331                 }
332                 // Cloneable types.
333                 if (o instanceof XMLGregorianCalendar) {
334                     return ((XMLGregorianCalendar) o).clone();
335                 }
336                 if (o instanceof Date) {
337                     return ((Date) o).clone();
338                 }
339                 if (o instanceof Calendar) {
340                     return ((Calendar) o).clone();
341                 }
342                 if (o instanceof TimeZone) {
343                     return ((TimeZone) o).clone();
344                 }
345                 if (o instanceof Locale) {
346                     return ((Locale) o).clone();
347                 }
348                 if (o instanceof Element) {
349                     return ((Element)((Element) o).cloneNode(true));
350                 }
351                 if (o instanceof JAXBElement) {
352                     return copyOf(((JAXBElement) o));
353                 }
354                 try {
355                     return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null));
356                 } catch (NoSuchMethodException e) {
357                     if (o instanceof Serializable) {
358                         return copyOf(((Serializable) o));
359                     }
360                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
361                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
362                 } catch (IllegalAccessException e) {
363                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
364                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
365                 } catch (InvocationTargetException e) {
366                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
367                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
368                 } catch (SecurityException e) {
369                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
370                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
371                 } catch (IllegalArgumentException e) {
372                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
373                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
374                 } catch (ExceptionInInitializerError e) {
375                     // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
376                     throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
377                 }
378             }
379             return null;
380         } catch (MalformedURLException e) {
381             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
382         } catch (URISyntaxException e) {
383             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
384         } catch (MimeTypeParseException e) {
385             throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e));
386         }
387     }
388 
389     /**
390      * Creates and returns a deep copy of a given array.
391      * 
392      * @param array
393      *     The array to copy or {@code null}.
394      * @return
395      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
396      */
397     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
398     private static Object copyOfArray(final Object array) {
399         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
400         if (array!= null) {
401             if (array.getClass() == boolean[].class) {
402                 return copyOf(((boolean[]) array));
403             }
404             if (array.getClass() == byte[].class) {
405                 return copyOf(((byte[]) array));
406             }
407             if (array.getClass() == char[].class) {
408                 return copyOf(((char[]) array));
409             }
410             if (array.getClass() == double[].class) {
411                 return copyOf(((double[]) array));
412             }
413             if (array.getClass() == float[].class) {
414                 return copyOf(((float[]) array));
415             }
416             if (array.getClass() == int[].class) {
417                 return copyOf(((int[]) array));
418             }
419             if (array.getClass() == long[].class) {
420                 return copyOf(((long[]) array));
421             }
422             if (array.getClass() == short[].class) {
423                 return copyOf(((short[]) array));
424             }
425             final int len = Array.getLength(array);
426             final Object copy = Array.newInstance(array.getClass().getComponentType(), len);
427             for (int i = (len- 1); (i >= 0); i--) {
428                 Array.set(copy, i, copyOf(Array.get(array, i)));
429             }
430             return copy;
431         }
432         return null;
433     }
434 
435     /**
436      * Creates and returns a deep copy of a given array.
437      * 
438      * @param array
439      *     The array to copy or {@code null}.
440      * @return
441      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
442      */
443     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
444     private static boolean[] copyOf(final boolean[] array) {
445         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
446         if (array!= null) {
447             final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length));
448             System.arraycopy(array, 0, copy, 0, array.length);
449             return copy;
450         }
451         return null;
452     }
453 
454     /**
455      * Creates and returns a deep copy of a given array.
456      * 
457      * @param array
458      *     The array to copy or {@code null}.
459      * @return
460      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
461      */
462     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
463     private static byte[] copyOf(final byte[] array) {
464         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
465         if (array!= null) {
466             final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length));
467             System.arraycopy(array, 0, copy, 0, array.length);
468             return copy;
469         }
470         return null;
471     }
472 
473     /**
474      * Creates and returns a deep copy of a given array.
475      * 
476      * @param array
477      *     The array to copy or {@code null}.
478      * @return
479      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
480      */
481     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
482     private static char[] copyOf(final char[] array) {
483         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
484         if (array!= null) {
485             final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length));
486             System.arraycopy(array, 0, copy, 0, array.length);
487             return copy;
488         }
489         return null;
490     }
491 
492     /**
493      * Creates and returns a deep copy of a given array.
494      * 
495      * @param array
496      *     The array to copy or {@code null}.
497      * @return
498      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
499      */
500     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
501     private static double[] copyOf(final double[] array) {
502         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
503         if (array!= null) {
504             final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length));
505             System.arraycopy(array, 0, copy, 0, array.length);
506             return copy;
507         }
508         return null;
509     }
510 
511     /**
512      * Creates and returns a deep copy of a given array.
513      * 
514      * @param array
515      *     The array to copy or {@code null}.
516      * @return
517      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
518      */
519     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
520     private static float[] copyOf(final float[] array) {
521         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
522         if (array!= null) {
523             final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length));
524             System.arraycopy(array, 0, copy, 0, array.length);
525             return copy;
526         }
527         return null;
528     }
529 
530     /**
531      * Creates and returns a deep copy of a given array.
532      * 
533      * @param array
534      *     The array to copy or {@code null}.
535      * @return
536      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
537      */
538     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
539     private static int[] copyOf(final int[] array) {
540         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
541         if (array!= null) {
542             final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length));
543             System.arraycopy(array, 0, copy, 0, array.length);
544             return copy;
545         }
546         return null;
547     }
548 
549     /**
550      * Creates and returns a deep copy of a given array.
551      * 
552      * @param array
553      *     The array to copy or {@code null}.
554      * @return
555      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
556      */
557     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
558     private static long[] copyOf(final long[] array) {
559         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
560         if (array!= null) {
561             final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length));
562             System.arraycopy(array, 0, copy, 0, array.length);
563             return copy;
564         }
565         return null;
566     }
567 
568     /**
569      * Creates and returns a deep copy of a given array.
570      * 
571      * @param array
572      *     The array to copy or {@code null}.
573      * @return
574      *     A deep copy of {@code array} or {@code null} if {@code array} is {@code null}.
575      */
576     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
577     private static short[] copyOf(final short[] array) {
578         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
579         if (array!= null) {
580             final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length));
581             System.arraycopy(array, 0, copy, 0, array.length);
582             return copy;
583         }
584         return null;
585     }
586 
587     /**
588      * Creates and returns a deep copy of a given {@code JAXBElement} instance.
589      * 
590      * @param element
591      *     The instance to copy or {@code null}.
592      * @return
593      *     A deep copy of {@code element} or {@code null} if {@code element} is {@code null}.
594      */
595     @SuppressWarnings("unchecked")
596     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
597     private static JAXBElement copyOf(final JAXBElement element) {
598         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
599         if (element!= null) {
600             final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue());
601             copy.setNil(element.isNil());
602             copy.setValue(copyOf(copy.getValue()));
603             return copy;
604         }
605         return null;
606     }
607 
608     /**
609      * Creates and returns a deep copy of a given {@code Serializable}.
610      * 
611      * @param serializable
612      *     The instance to copy or {@code null}.
613      * @return
614      *     A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}.
615      */
616     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
617     private static Serializable copyOf(final Serializable serializable) {
618         // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
619         if (serializable!= null) {
620             try {
621                 final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream();
622                 final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput);
623                 out.writeObject(serializable);
624                 out.close();
625                 final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray());
626                 final ObjectInputStream in = new ObjectInputStream(byteArrayInput);
627                 final Serializable copy = ((Serializable) in.readObject());
628                 in.close();
629                 return copy;
630             } catch (SecurityException e) {
631                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
632             } catch (ClassNotFoundException e) {
633                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
634             } catch (InvalidClassException e) {
635                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
636             } catch (NotSerializableException e) {
637                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
638             } catch (StreamCorruptedException e) {
639                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
640             } catch (OptionalDataException e) {
641                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
642             } catch (IOException e) {
643                 throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e));
644             }
645         }
646         return null;
647     }
648 
649     /**
650      * Creates and returns a deep copy of this object.
651      * 
652      * 
653      * @return
654      *     A deep copy of this object.
655      */
656     @Override
657     @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-01-04T08:47:18+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
658     public Property clone() {
659         {
660             // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
661             final Property clone = ((Property) super.clone());
662             // 'Any' collection.
663             if (this.any!= null) {
664                 clone.any = null;
665                 copyAny(this.getAny(), clone.getAny());
666             }
667             // CBuiltinLeafInfo: java.lang.String
668             clone.name = ((this.name == null)?null:this.getName());
669             // CBuiltinLeafInfo: java.lang.String
670             clone.value = ((this.value == null)?null:this.getValue());
671             return clone;
672         }
673     }
674     
675     /**
676      * Gets a single {@code JAXBElement} matching a namespace URI and local part from the {@code any} property of the
677      * instance.
678      *
679      * @param namespaceURI The namespace URI of the {@code JAXBElement} to return.
680      * @param localPart The local part of the {@code JAXBElement} to return.
681      * @param type The class of the type the element is bound to.
682      * @param <T> The type the element is bound to.
683      *
684      * @return The {@code JAXBElement} matching {@code namespaceURI} and {@code localPart} from the {@code any} property
685      * of the instance or {@code null}, if no such element is found.
686      *
687      * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
688      * @throws IllegalStateException if the {@code any} property contains more than one matching element.
689      *
690      * @see #getAnyElement(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
691      *
692      * @since 1.2
693      */
694     public <T> javax.xml.bind.JAXBElement<T> getAnyElement( final String namespaceURI, final String localPart,
695                                                             final Class<T> type )
696     {
697         return this.getAnyElement( this.getAny(), namespaceURI, localPart, type );
698     }
699 
700     /**
701      * Gets a list containing all {@code JAXBElement}s matching a namespace URI and local part from the {@code any}
702      * property of the instance.
703      *
704      * @param namespaceURI The namespace URI of the {@code JAXBElement}s to return.
705      * @param localPart The local part of the {@code JAXBElement}s to return.
706      * @param type The class of the type the elements are bound to.
707      * @param <T> The type the elements are bound to.
708      *
709      * @return An unmodifiable list of all {@code JAXBElement}s matching {@code namespaceURI} and {@code localPart} from
710      * the {@code any} property of the instance - an empty list if no such elements are found.
711      *
712      * @throws NullPointerException if {@code namespaceURI}, {@code localPart} or {@code type} is {@code null}.
713      *
714      * @see #getAnyElements(java.util.List, java.lang.String, java.lang.String, java.lang.Class)
715      *
716      * @since 1.2
717      */
718     public <T> java.util.List<javax.xml.bind.JAXBElement<T>> getAnyElements( final String namespaceURI,
719                                                                              final String localPart,
720                                                                              final Class<T> type )
721     {
722         return this.getAnyElements( this.getAny(), namespaceURI, localPart, type );
723     }
724 
725     /**
726      * Gets a single object matching a given class from the {@code any} property of the instance.
727      *
728      * @param clazz The class to return an instance of.
729      * @param <T> The type of the object to return.
730      *
731      * @return The instance of {@code clazz} from the {@code any} property of the instance or {@code null}, if no such
732      * instance is found.
733      *
734      * @throws NullPointerException if {@code clazz} is {@code null}.
735      * @throws IllegalStateException if the {@code any} property contains more than one matching object.
736      *
737      * @see #getAnyObject(java.util.List, java.lang.Class)
738      */
739     public <T> T getAnyObject( final Class<T> clazz )
740     {
741         return this.getAnyObject( this.getAny(), clazz );
742     }
743 
744     /**
745      * Gets a list containing all objects matching a given class from the {@code any} property of the instance.
746      *
747      * @param clazz The class to return all instances of.
748      * @param <T> The type of the objects to return.
749      *
750      * @return An unmodifiable list of all instances of {@code clazz} from the {@code any} property of the instance -
751      * an empty list if no such objects are found.
752      *
753      * @throws NullPointerException if {@code clazz} is {@code null}.
754      *
755      * @see #getAnyObjects(java.util.List, java.lang.Class)
756      */
757     public <T> java.util.List<T> getAnyObjects( final Class<T> clazz )
758     {
759         return this.getAnyObjects( this.getAny(), clazz );
760     }
761       
762 }