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