| 1 | /* |
|---|
| 2 | * Copyright 2007-2008, Plutext Pty Ltd. |
|---|
| 3 | * |
|---|
| 4 | * This file is part of docx4j. |
|---|
| 5 | |
|---|
| 6 | docx4j is licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 7 | you may not use this file except in compliance with the License. |
|---|
| 8 | |
|---|
| 9 | You may obtain a copy of the License at |
|---|
| 10 | |
|---|
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 12 | |
|---|
| 13 | Unless required by applicable law or agreed to in writing, software |
|---|
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 16 | See the License for the specific language governing permissions and |
|---|
| 17 | limitations under the License. |
|---|
| 18 | |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | package org.docx4j.wml; |
|---|
| 23 | |
|---|
| 24 | import java.math.BigInteger; |
|---|
| 25 | import java.util.ArrayList; |
|---|
| 26 | import java.util.List; |
|---|
| 27 | import javax.xml.bind.Unmarshaller; |
|---|
| 28 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 29 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 30 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 31 | import javax.xml.bind.annotation.XmlElement; |
|---|
| 32 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 33 | import javax.xml.bind.annotation.XmlType; |
|---|
| 34 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | /** |
|---|
| 38 | * <p>Java class for CT_FFDDList complex type. |
|---|
| 39 | * |
|---|
| 40 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 41 | * |
|---|
| 42 | * <pre> |
|---|
| 43 | * <complexType name="CT_FFDDList"> |
|---|
| 44 | * <complexContent> |
|---|
| 45 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 46 | * <sequence> |
|---|
| 47 | * <element name="result" minOccurs="0"> |
|---|
| 48 | * <complexType> |
|---|
| 49 | * <complexContent> |
|---|
| 50 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 51 | * <attribute name="val" use="required"> |
|---|
| 52 | * <simpleType> |
|---|
| 53 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 54 | * </restriction> |
|---|
| 55 | * </simpleType> |
|---|
| 56 | * </attribute> |
|---|
| 57 | * </restriction> |
|---|
| 58 | * </complexContent> |
|---|
| 59 | * </complexType> |
|---|
| 60 | * </element> |
|---|
| 61 | * <element name="default" minOccurs="0"> |
|---|
| 62 | * <complexType> |
|---|
| 63 | * <complexContent> |
|---|
| 64 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 65 | * <attribute name="val" use="required"> |
|---|
| 66 | * <simpleType> |
|---|
| 67 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 68 | * </restriction> |
|---|
| 69 | * </simpleType> |
|---|
| 70 | * </attribute> |
|---|
| 71 | * </restriction> |
|---|
| 72 | * </complexContent> |
|---|
| 73 | * </complexType> |
|---|
| 74 | * </element> |
|---|
| 75 | * <element name="listEntry" maxOccurs="unbounded" minOccurs="0"> |
|---|
| 76 | * <complexType> |
|---|
| 77 | * <complexContent> |
|---|
| 78 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 79 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 80 | * </restriction> |
|---|
| 81 | * </complexContent> |
|---|
| 82 | * </complexType> |
|---|
| 83 | * </element> |
|---|
| 84 | * </sequence> |
|---|
| 85 | * </restriction> |
|---|
| 86 | * </complexContent> |
|---|
| 87 | * </complexType> |
|---|
| 88 | * </pre> |
|---|
| 89 | * |
|---|
| 90 | * |
|---|
| 91 | */ |
|---|
| 92 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 93 | @XmlType(name = "CT_FFDDList", propOrder = { |
|---|
| 94 | "result", |
|---|
| 95 | "_default", |
|---|
| 96 | "listEntry" |
|---|
| 97 | }) |
|---|
| 98 | public class CTFFDDList implements Child |
|---|
| 99 | { |
|---|
| 100 | |
|---|
| 101 | protected CTFFDDList.Result result; |
|---|
| 102 | @XmlElement(name = "default") |
|---|
| 103 | protected CTFFDDList.Default _default; |
|---|
| 104 | protected List<CTFFDDList.ListEntry> listEntry; |
|---|
| 105 | @XmlTransient |
|---|
| 106 | private Object parent; |
|---|
| 107 | |
|---|
| 108 | /** |
|---|
| 109 | * Gets the value of the result property. |
|---|
| 110 | * |
|---|
| 111 | * @return |
|---|
| 112 | * possible object is |
|---|
| 113 | * {@link CTFFDDList.Result } |
|---|
| 114 | * |
|---|
| 115 | */ |
|---|
| 116 | public CTFFDDList.Result getResult() { |
|---|
| 117 | return result; |
|---|
| 118 | } |
|---|
| 119 | |
|---|
| 120 | /** |
|---|
| 121 | * Sets the value of the result property. |
|---|
| 122 | * |
|---|
| 123 | * @param value |
|---|
| 124 | * allowed object is |
|---|
| 125 | * {@link CTFFDDList.Result } |
|---|
| 126 | * |
|---|
| 127 | */ |
|---|
| 128 | public void setResult(CTFFDDList.Result value) { |
|---|
| 129 | this.result = value; |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | /** |
|---|
| 133 | * Gets the value of the default property. |
|---|
| 134 | * |
|---|
| 135 | * @return |
|---|
| 136 | * possible object is |
|---|
| 137 | * {@link CTFFDDList.Default } |
|---|
| 138 | * |
|---|
| 139 | */ |
|---|
| 140 | public CTFFDDList.Default getDefault() { |
|---|
| 141 | return _default; |
|---|
| 142 | } |
|---|
| 143 | |
|---|
| 144 | /** |
|---|
| 145 | * Sets the value of the default property. |
|---|
| 146 | * |
|---|
| 147 | * @param value |
|---|
| 148 | * allowed object is |
|---|
| 149 | * {@link CTFFDDList.Default } |
|---|
| 150 | * |
|---|
| 151 | */ |
|---|
| 152 | public void setDefault(CTFFDDList.Default value) { |
|---|
| 153 | this._default = value; |
|---|
| 154 | } |
|---|
| 155 | |
|---|
| 156 | /** |
|---|
| 157 | * Gets the value of the listEntry property. |
|---|
| 158 | * |
|---|
| 159 | * <p> |
|---|
| 160 | * This accessor method returns a reference to the live list, |
|---|
| 161 | * not a snapshot. Therefore any modification you make to the |
|---|
| 162 | * returned list will be present inside the JAXB object. |
|---|
| 163 | * This is why there is not a <CODE>set</CODE> method for the listEntry property. |
|---|
| 164 | * |
|---|
| 165 | * <p> |
|---|
| 166 | * For example, to add a new item, do as follows: |
|---|
| 167 | * <pre> |
|---|
| 168 | * getListEntry().add(newItem); |
|---|
| 169 | * </pre> |
|---|
| 170 | * |
|---|
| 171 | * |
|---|
| 172 | * <p> |
|---|
| 173 | * Objects of the following type(s) are allowed in the list |
|---|
| 174 | * {@link CTFFDDList.ListEntry } |
|---|
| 175 | * |
|---|
| 176 | * |
|---|
| 177 | */ |
|---|
| 178 | public List<CTFFDDList.ListEntry> getListEntry() { |
|---|
| 179 | if (listEntry == null) { |
|---|
| 180 | listEntry = new ArrayList<CTFFDDList.ListEntry>(); |
|---|
| 181 | } |
|---|
| 182 | return this.listEntry; |
|---|
| 183 | } |
|---|
| 184 | |
|---|
| 185 | /** |
|---|
| 186 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 187 | * |
|---|
| 188 | * @return |
|---|
| 189 | * The parent object. |
|---|
| 190 | */ |
|---|
| 191 | public Object getParent() { |
|---|
| 192 | return this.parent; |
|---|
| 193 | } |
|---|
| 194 | |
|---|
| 195 | public void setParent(Object parent) { |
|---|
| 196 | this.parent = parent; |
|---|
| 197 | } |
|---|
| 198 | |
|---|
| 199 | /** |
|---|
| 200 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 201 | * |
|---|
| 202 | * @param parent |
|---|
| 203 | * The parent object in the object tree. |
|---|
| 204 | * @param unmarshaller |
|---|
| 205 | * The unmarshaller that generated the instance. |
|---|
| 206 | */ |
|---|
| 207 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 208 | setParent(parent); |
|---|
| 209 | } |
|---|
| 210 | |
|---|
| 211 | |
|---|
| 212 | /** |
|---|
| 213 | * <p>Java class for anonymous complex type. |
|---|
| 214 | * |
|---|
| 215 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 216 | * |
|---|
| 217 | * <pre> |
|---|
| 218 | * <complexType> |
|---|
| 219 | * <complexContent> |
|---|
| 220 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 221 | * <attribute name="val" use="required"> |
|---|
| 222 | * <simpleType> |
|---|
| 223 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 224 | * </restriction> |
|---|
| 225 | * </simpleType> |
|---|
| 226 | * </attribute> |
|---|
| 227 | * </restriction> |
|---|
| 228 | * </complexContent> |
|---|
| 229 | * </complexType> |
|---|
| 230 | * </pre> |
|---|
| 231 | * |
|---|
| 232 | * |
|---|
| 233 | */ |
|---|
| 234 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 235 | @XmlType(name = "") |
|---|
| 236 | public static class Default |
|---|
| 237 | implements Child |
|---|
| 238 | { |
|---|
| 239 | |
|---|
| 240 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true) |
|---|
| 241 | protected BigInteger val; |
|---|
| 242 | @XmlTransient |
|---|
| 243 | private Object parent; |
|---|
| 244 | |
|---|
| 245 | /** |
|---|
| 246 | * Gets the value of the val property. |
|---|
| 247 | * |
|---|
| 248 | * @return |
|---|
| 249 | * possible object is |
|---|
| 250 | * {@link BigInteger } |
|---|
| 251 | * |
|---|
| 252 | */ |
|---|
| 253 | public BigInteger getVal() { |
|---|
| 254 | return val; |
|---|
| 255 | } |
|---|
| 256 | |
|---|
| 257 | /** |
|---|
| 258 | * Sets the value of the val property. |
|---|
| 259 | * |
|---|
| 260 | * @param value |
|---|
| 261 | * allowed object is |
|---|
| 262 | * {@link BigInteger } |
|---|
| 263 | * |
|---|
| 264 | */ |
|---|
| 265 | public void setVal(BigInteger value) { |
|---|
| 266 | this.val = value; |
|---|
| 267 | } |
|---|
| 268 | |
|---|
| 269 | /** |
|---|
| 270 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 271 | * |
|---|
| 272 | * @return |
|---|
| 273 | * The parent object. |
|---|
| 274 | */ |
|---|
| 275 | public Object getParent() { |
|---|
| 276 | return this.parent; |
|---|
| 277 | } |
|---|
| 278 | |
|---|
| 279 | public void setParent(Object parent) { |
|---|
| 280 | this.parent = parent; |
|---|
| 281 | } |
|---|
| 282 | |
|---|
| 283 | /** |
|---|
| 284 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 285 | * |
|---|
| 286 | * @param parent |
|---|
| 287 | * The parent object in the object tree. |
|---|
| 288 | * @param unmarshaller |
|---|
| 289 | * The unmarshaller that generated the instance. |
|---|
| 290 | */ |
|---|
| 291 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 292 | setParent(parent); |
|---|
| 293 | } |
|---|
| 294 | |
|---|
| 295 | } |
|---|
| 296 | |
|---|
| 297 | |
|---|
| 298 | /** |
|---|
| 299 | * <p>Java class for anonymous complex type. |
|---|
| 300 | * |
|---|
| 301 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 302 | * |
|---|
| 303 | * <pre> |
|---|
| 304 | * <complexType> |
|---|
| 305 | * <complexContent> |
|---|
| 306 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 307 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 308 | * </restriction> |
|---|
| 309 | * </complexContent> |
|---|
| 310 | * </complexType> |
|---|
| 311 | * </pre> |
|---|
| 312 | * |
|---|
| 313 | * |
|---|
| 314 | */ |
|---|
| 315 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 316 | @XmlType(name = "") |
|---|
| 317 | public static class ListEntry |
|---|
| 318 | implements Child |
|---|
| 319 | { |
|---|
| 320 | |
|---|
| 321 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 322 | protected String val; |
|---|
| 323 | @XmlTransient |
|---|
| 324 | private Object parent; |
|---|
| 325 | |
|---|
| 326 | /** |
|---|
| 327 | * Gets the value of the val property. |
|---|
| 328 | * |
|---|
| 329 | * @return |
|---|
| 330 | * possible object is |
|---|
| 331 | * {@link String } |
|---|
| 332 | * |
|---|
| 333 | */ |
|---|
| 334 | public String getVal() { |
|---|
| 335 | return val; |
|---|
| 336 | } |
|---|
| 337 | |
|---|
| 338 | /** |
|---|
| 339 | * Sets the value of the val property. |
|---|
| 340 | * |
|---|
| 341 | * @param value |
|---|
| 342 | * allowed object is |
|---|
| 343 | * {@link String } |
|---|
| 344 | * |
|---|
| 345 | */ |
|---|
| 346 | public void setVal(String value) { |
|---|
| 347 | this.val = value; |
|---|
| 348 | } |
|---|
| 349 | |
|---|
| 350 | /** |
|---|
| 351 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 352 | * |
|---|
| 353 | * @return |
|---|
| 354 | * The parent object. |
|---|
| 355 | */ |
|---|
| 356 | public Object getParent() { |
|---|
| 357 | return this.parent; |
|---|
| 358 | } |
|---|
| 359 | |
|---|
| 360 | public void setParent(Object parent) { |
|---|
| 361 | this.parent = parent; |
|---|
| 362 | } |
|---|
| 363 | |
|---|
| 364 | /** |
|---|
| 365 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 366 | * |
|---|
| 367 | * @param parent |
|---|
| 368 | * The parent object in the object tree. |
|---|
| 369 | * @param unmarshaller |
|---|
| 370 | * The unmarshaller that generated the instance. |
|---|
| 371 | */ |
|---|
| 372 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 373 | setParent(parent); |
|---|
| 374 | } |
|---|
| 375 | |
|---|
| 376 | } |
|---|
| 377 | |
|---|
| 378 | |
|---|
| 379 | /** |
|---|
| 380 | * <p>Java class for anonymous complex type. |
|---|
| 381 | * |
|---|
| 382 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 383 | * |
|---|
| 384 | * <pre> |
|---|
| 385 | * <complexType> |
|---|
| 386 | * <complexContent> |
|---|
| 387 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 388 | * <attribute name="val" use="required"> |
|---|
| 389 | * <simpleType> |
|---|
| 390 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 391 | * </restriction> |
|---|
| 392 | * </simpleType> |
|---|
| 393 | * </attribute> |
|---|
| 394 | * </restriction> |
|---|
| 395 | * </complexContent> |
|---|
| 396 | * </complexType> |
|---|
| 397 | * </pre> |
|---|
| 398 | * |
|---|
| 399 | * |
|---|
| 400 | */ |
|---|
| 401 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 402 | @XmlType(name = "") |
|---|
| 403 | public static class Result |
|---|
| 404 | implements Child |
|---|
| 405 | { |
|---|
| 406 | |
|---|
| 407 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true) |
|---|
| 408 | protected BigInteger val; |
|---|
| 409 | @XmlTransient |
|---|
| 410 | private Object parent; |
|---|
| 411 | |
|---|
| 412 | /** |
|---|
| 413 | * Gets the value of the val property. |
|---|
| 414 | * |
|---|
| 415 | * @return |
|---|
| 416 | * possible object is |
|---|
| 417 | * {@link BigInteger } |
|---|
| 418 | * |
|---|
| 419 | */ |
|---|
| 420 | public BigInteger getVal() { |
|---|
| 421 | return val; |
|---|
| 422 | } |
|---|
| 423 | |
|---|
| 424 | /** |
|---|
| 425 | * Sets the value of the val property. |
|---|
| 426 | * |
|---|
| 427 | * @param value |
|---|
| 428 | * allowed object is |
|---|
| 429 | * {@link BigInteger } |
|---|
| 430 | * |
|---|
| 431 | */ |
|---|
| 432 | public void setVal(BigInteger value) { |
|---|
| 433 | this.val = value; |
|---|
| 434 | } |
|---|
| 435 | |
|---|
| 436 | /** |
|---|
| 437 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 438 | * |
|---|
| 439 | * @return |
|---|
| 440 | * The parent object. |
|---|
| 441 | */ |
|---|
| 442 | public Object getParent() { |
|---|
| 443 | return this.parent; |
|---|
| 444 | } |
|---|
| 445 | |
|---|
| 446 | public void setParent(Object parent) { |
|---|
| 447 | this.parent = parent; |
|---|
| 448 | } |
|---|
| 449 | |
|---|
| 450 | /** |
|---|
| 451 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 452 | * |
|---|
| 453 | * @param parent |
|---|
| 454 | * The parent object in the object tree. |
|---|
| 455 | * @param unmarshaller |
|---|
| 456 | * The unmarshaller that generated the instance. |
|---|
| 457 | */ |
|---|
| 458 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 459 | setParent(parent); |
|---|
| 460 | } |
|---|
| 461 | |
|---|
| 462 | } |
|---|
| 463 | |
|---|
| 464 | } |
|---|