| 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 javax.xml.bind.Unmarshaller; |
|---|
| 26 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 27 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 28 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 29 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 30 | import javax.xml.bind.annotation.XmlType; |
|---|
| 31 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | /** |
|---|
| 35 | * <p>Java class for CT_OdsoFieldMapData complex type. |
|---|
| 36 | * |
|---|
| 37 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 38 | * |
|---|
| 39 | * <pre> |
|---|
| 40 | * <complexType name="CT_OdsoFieldMapData"> |
|---|
| 41 | * <complexContent> |
|---|
| 42 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 43 | * <sequence> |
|---|
| 44 | * <element name="type" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_MailMergeOdsoFMDFieldType" minOccurs="0"/> |
|---|
| 45 | * <element name="name" minOccurs="0"> |
|---|
| 46 | * <complexType> |
|---|
| 47 | * <complexContent> |
|---|
| 48 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 49 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 50 | * </restriction> |
|---|
| 51 | * </complexContent> |
|---|
| 52 | * </complexType> |
|---|
| 53 | * </element> |
|---|
| 54 | * <element name="mappedName" minOccurs="0"> |
|---|
| 55 | * <complexType> |
|---|
| 56 | * <complexContent> |
|---|
| 57 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 58 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 59 | * </restriction> |
|---|
| 60 | * </complexContent> |
|---|
| 61 | * </complexType> |
|---|
| 62 | * </element> |
|---|
| 63 | * <element name="column" minOccurs="0"> |
|---|
| 64 | * <complexType> |
|---|
| 65 | * <complexContent> |
|---|
| 66 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 67 | * <attribute name="val" use="required"> |
|---|
| 68 | * <simpleType> |
|---|
| 69 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 70 | * </restriction> |
|---|
| 71 | * </simpleType> |
|---|
| 72 | * </attribute> |
|---|
| 73 | * </restriction> |
|---|
| 74 | * </complexContent> |
|---|
| 75 | * </complexType> |
|---|
| 76 | * </element> |
|---|
| 77 | * <element name="lid" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Lang" minOccurs="0"/> |
|---|
| 78 | * <element name="dynamicAddress" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/> |
|---|
| 79 | * </sequence> |
|---|
| 80 | * </restriction> |
|---|
| 81 | * </complexContent> |
|---|
| 82 | * </complexType> |
|---|
| 83 | * </pre> |
|---|
| 84 | * |
|---|
| 85 | * |
|---|
| 86 | */ |
|---|
| 87 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 88 | @XmlType(name = "CT_OdsoFieldMapData", propOrder = { |
|---|
| 89 | "type", |
|---|
| 90 | "name", |
|---|
| 91 | "mappedName", |
|---|
| 92 | "column", |
|---|
| 93 | "lid", |
|---|
| 94 | "dynamicAddress" |
|---|
| 95 | }) |
|---|
| 96 | public class CTOdsoFieldMapData |
|---|
| 97 | implements Child |
|---|
| 98 | { |
|---|
| 99 | |
|---|
| 100 | protected CTMailMergeOdsoFMDFieldType type; |
|---|
| 101 | protected CTOdsoFieldMapData.Name name; |
|---|
| 102 | protected CTOdsoFieldMapData.MappedName mappedName; |
|---|
| 103 | protected CTOdsoFieldMapData.Column column; |
|---|
| 104 | protected CTLang lid; |
|---|
| 105 | protected BooleanDefaultTrue dynamicAddress; |
|---|
| 106 | @XmlTransient |
|---|
| 107 | private Object parent; |
|---|
| 108 | |
|---|
| 109 | /** |
|---|
| 110 | * Gets the value of the type property. |
|---|
| 111 | * |
|---|
| 112 | * @return |
|---|
| 113 | * possible object is |
|---|
| 114 | * {@link CTMailMergeOdsoFMDFieldType } |
|---|
| 115 | * |
|---|
| 116 | */ |
|---|
| 117 | public CTMailMergeOdsoFMDFieldType getType() { |
|---|
| 118 | return type; |
|---|
| 119 | } |
|---|
| 120 | |
|---|
| 121 | /** |
|---|
| 122 | * Sets the value of the type property. |
|---|
| 123 | * |
|---|
| 124 | * @param value |
|---|
| 125 | * allowed object is |
|---|
| 126 | * {@link CTMailMergeOdsoFMDFieldType } |
|---|
| 127 | * |
|---|
| 128 | */ |
|---|
| 129 | public void setType(CTMailMergeOdsoFMDFieldType value) { |
|---|
| 130 | this.type = value; |
|---|
| 131 | } |
|---|
| 132 | |
|---|
| 133 | /** |
|---|
| 134 | * Gets the value of the name property. |
|---|
| 135 | * |
|---|
| 136 | * @return |
|---|
| 137 | * possible object is |
|---|
| 138 | * {@link CTOdsoFieldMapData.Name } |
|---|
| 139 | * |
|---|
| 140 | */ |
|---|
| 141 | public CTOdsoFieldMapData.Name getName() { |
|---|
| 142 | return name; |
|---|
| 143 | } |
|---|
| 144 | |
|---|
| 145 | /** |
|---|
| 146 | * Sets the value of the name property. |
|---|
| 147 | * |
|---|
| 148 | * @param value |
|---|
| 149 | * allowed object is |
|---|
| 150 | * {@link CTOdsoFieldMapData.Name } |
|---|
| 151 | * |
|---|
| 152 | */ |
|---|
| 153 | public void setName(CTOdsoFieldMapData.Name value) { |
|---|
| 154 | this.name = value; |
|---|
| 155 | } |
|---|
| 156 | |
|---|
| 157 | /** |
|---|
| 158 | * Gets the value of the mappedName property. |
|---|
| 159 | * |
|---|
| 160 | * @return |
|---|
| 161 | * possible object is |
|---|
| 162 | * {@link CTOdsoFieldMapData.MappedName } |
|---|
| 163 | * |
|---|
| 164 | */ |
|---|
| 165 | public CTOdsoFieldMapData.MappedName getMappedName() { |
|---|
| 166 | return mappedName; |
|---|
| 167 | } |
|---|
| 168 | |
|---|
| 169 | /** |
|---|
| 170 | * Sets the value of the mappedName property. |
|---|
| 171 | * |
|---|
| 172 | * @param value |
|---|
| 173 | * allowed object is |
|---|
| 174 | * {@link CTOdsoFieldMapData.MappedName } |
|---|
| 175 | * |
|---|
| 176 | */ |
|---|
| 177 | public void setMappedName(CTOdsoFieldMapData.MappedName value) { |
|---|
| 178 | this.mappedName = value; |
|---|
| 179 | } |
|---|
| 180 | |
|---|
| 181 | /** |
|---|
| 182 | * Gets the value of the column property. |
|---|
| 183 | * |
|---|
| 184 | * @return |
|---|
| 185 | * possible object is |
|---|
| 186 | * {@link CTOdsoFieldMapData.Column } |
|---|
| 187 | * |
|---|
| 188 | */ |
|---|
| 189 | public CTOdsoFieldMapData.Column getColumn() { |
|---|
| 190 | return column; |
|---|
| 191 | } |
|---|
| 192 | |
|---|
| 193 | /** |
|---|
| 194 | * Sets the value of the column property. |
|---|
| 195 | * |
|---|
| 196 | * @param value |
|---|
| 197 | * allowed object is |
|---|
| 198 | * {@link CTOdsoFieldMapData.Column } |
|---|
| 199 | * |
|---|
| 200 | */ |
|---|
| 201 | public void setColumn(CTOdsoFieldMapData.Column value) { |
|---|
| 202 | this.column = value; |
|---|
| 203 | } |
|---|
| 204 | |
|---|
| 205 | /** |
|---|
| 206 | * Gets the value of the lid property. |
|---|
| 207 | * |
|---|
| 208 | * @return |
|---|
| 209 | * possible object is |
|---|
| 210 | * {@link CTLang } |
|---|
| 211 | * |
|---|
| 212 | */ |
|---|
| 213 | public CTLang getLid() { |
|---|
| 214 | return lid; |
|---|
| 215 | } |
|---|
| 216 | |
|---|
| 217 | /** |
|---|
| 218 | * Sets the value of the lid property. |
|---|
| 219 | * |
|---|
| 220 | * @param value |
|---|
| 221 | * allowed object is |
|---|
| 222 | * {@link CTLang } |
|---|
| 223 | * |
|---|
| 224 | */ |
|---|
| 225 | public void setLid(CTLang value) { |
|---|
| 226 | this.lid = value; |
|---|
| 227 | } |
|---|
| 228 | |
|---|
| 229 | /** |
|---|
| 230 | * Gets the value of the dynamicAddress property. |
|---|
| 231 | * |
|---|
| 232 | * @return |
|---|
| 233 | * possible object is |
|---|
| 234 | * {@link BooleanDefaultTrue } |
|---|
| 235 | * |
|---|
| 236 | */ |
|---|
| 237 | public BooleanDefaultTrue getDynamicAddress() { |
|---|
| 238 | return dynamicAddress; |
|---|
| 239 | } |
|---|
| 240 | |
|---|
| 241 | /** |
|---|
| 242 | * Sets the value of the dynamicAddress property. |
|---|
| 243 | * |
|---|
| 244 | * @param value |
|---|
| 245 | * allowed object is |
|---|
| 246 | * {@link BooleanDefaultTrue } |
|---|
| 247 | * |
|---|
| 248 | */ |
|---|
| 249 | public void setDynamicAddress(BooleanDefaultTrue value) { |
|---|
| 250 | this.dynamicAddress = value; |
|---|
| 251 | } |
|---|
| 252 | |
|---|
| 253 | /** |
|---|
| 254 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 255 | * |
|---|
| 256 | * @return |
|---|
| 257 | * The parent object. |
|---|
| 258 | */ |
|---|
| 259 | public Object getParent() { |
|---|
| 260 | return this.parent; |
|---|
| 261 | } |
|---|
| 262 | |
|---|
| 263 | public void setParent(Object parent) { |
|---|
| 264 | this.parent = parent; |
|---|
| 265 | } |
|---|
| 266 | |
|---|
| 267 | /** |
|---|
| 268 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 269 | * |
|---|
| 270 | * @param parent |
|---|
| 271 | * The parent object in the object tree. |
|---|
| 272 | * @param unmarshaller |
|---|
| 273 | * The unmarshaller that generated the instance. |
|---|
| 274 | */ |
|---|
| 275 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 276 | setParent(parent); |
|---|
| 277 | } |
|---|
| 278 | |
|---|
| 279 | |
|---|
| 280 | /** |
|---|
| 281 | * <p>Java class for anonymous complex type. |
|---|
| 282 | * |
|---|
| 283 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 284 | * |
|---|
| 285 | * <pre> |
|---|
| 286 | * <complexType> |
|---|
| 287 | * <complexContent> |
|---|
| 288 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 289 | * <attribute name="val" use="required"> |
|---|
| 290 | * <simpleType> |
|---|
| 291 | * <restriction base="{http://www.w3.org/2001/XMLSchema}integer"> |
|---|
| 292 | * </restriction> |
|---|
| 293 | * </simpleType> |
|---|
| 294 | * </attribute> |
|---|
| 295 | * </restriction> |
|---|
| 296 | * </complexContent> |
|---|
| 297 | * </complexType> |
|---|
| 298 | * </pre> |
|---|
| 299 | * |
|---|
| 300 | * |
|---|
| 301 | */ |
|---|
| 302 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 303 | @XmlType(name = "") |
|---|
| 304 | public static class Column |
|---|
| 305 | implements Child |
|---|
| 306 | { |
|---|
| 307 | |
|---|
| 308 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true) |
|---|
| 309 | protected BigInteger val; |
|---|
| 310 | @XmlTransient |
|---|
| 311 | private Object parent; |
|---|
| 312 | |
|---|
| 313 | /** |
|---|
| 314 | * Gets the value of the val property. |
|---|
| 315 | * |
|---|
| 316 | * @return |
|---|
| 317 | * possible object is |
|---|
| 318 | * {@link BigInteger } |
|---|
| 319 | * |
|---|
| 320 | */ |
|---|
| 321 | public BigInteger getVal() { |
|---|
| 322 | return val; |
|---|
| 323 | } |
|---|
| 324 | |
|---|
| 325 | /** |
|---|
| 326 | * Sets the value of the val property. |
|---|
| 327 | * |
|---|
| 328 | * @param value |
|---|
| 329 | * allowed object is |
|---|
| 330 | * {@link BigInteger } |
|---|
| 331 | * |
|---|
| 332 | */ |
|---|
| 333 | public void setVal(BigInteger value) { |
|---|
| 334 | this.val = value; |
|---|
| 335 | } |
|---|
| 336 | |
|---|
| 337 | /** |
|---|
| 338 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 339 | * |
|---|
| 340 | * @return |
|---|
| 341 | * The parent object. |
|---|
| 342 | */ |
|---|
| 343 | public Object getParent() { |
|---|
| 344 | return this.parent; |
|---|
| 345 | } |
|---|
| 346 | |
|---|
| 347 | public void setParent(Object parent) { |
|---|
| 348 | this.parent = parent; |
|---|
| 349 | } |
|---|
| 350 | |
|---|
| 351 | /** |
|---|
| 352 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 353 | * |
|---|
| 354 | * @param parent |
|---|
| 355 | * The parent object in the object tree. |
|---|
| 356 | * @param unmarshaller |
|---|
| 357 | * The unmarshaller that generated the instance. |
|---|
| 358 | */ |
|---|
| 359 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 360 | setParent(parent); |
|---|
| 361 | } |
|---|
| 362 | |
|---|
| 363 | } |
|---|
| 364 | |
|---|
| 365 | |
|---|
| 366 | /** |
|---|
| 367 | * <p>Java class for anonymous complex type. |
|---|
| 368 | * |
|---|
| 369 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 370 | * |
|---|
| 371 | * <pre> |
|---|
| 372 | * <complexType> |
|---|
| 373 | * <complexContent> |
|---|
| 374 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 375 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 376 | * </restriction> |
|---|
| 377 | * </complexContent> |
|---|
| 378 | * </complexType> |
|---|
| 379 | * </pre> |
|---|
| 380 | * |
|---|
| 381 | * |
|---|
| 382 | */ |
|---|
| 383 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 384 | @XmlType(name = "") |
|---|
| 385 | public static class MappedName |
|---|
| 386 | implements Child |
|---|
| 387 | { |
|---|
| 388 | |
|---|
| 389 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 390 | protected String val; |
|---|
| 391 | @XmlTransient |
|---|
| 392 | private Object parent; |
|---|
| 393 | |
|---|
| 394 | /** |
|---|
| 395 | * Gets the value of the val property. |
|---|
| 396 | * |
|---|
| 397 | * @return |
|---|
| 398 | * possible object is |
|---|
| 399 | * {@link String } |
|---|
| 400 | * |
|---|
| 401 | */ |
|---|
| 402 | public String getVal() { |
|---|
| 403 | return val; |
|---|
| 404 | } |
|---|
| 405 | |
|---|
| 406 | /** |
|---|
| 407 | * Sets the value of the val property. |
|---|
| 408 | * |
|---|
| 409 | * @param value |
|---|
| 410 | * allowed object is |
|---|
| 411 | * {@link String } |
|---|
| 412 | * |
|---|
| 413 | */ |
|---|
| 414 | public void setVal(String value) { |
|---|
| 415 | this.val = value; |
|---|
| 416 | } |
|---|
| 417 | |
|---|
| 418 | /** |
|---|
| 419 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 420 | * |
|---|
| 421 | * @return |
|---|
| 422 | * The parent object. |
|---|
| 423 | */ |
|---|
| 424 | public Object getParent() { |
|---|
| 425 | return this.parent; |
|---|
| 426 | } |
|---|
| 427 | |
|---|
| 428 | public void setParent(Object parent) { |
|---|
| 429 | this.parent = parent; |
|---|
| 430 | } |
|---|
| 431 | |
|---|
| 432 | /** |
|---|
| 433 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 434 | * |
|---|
| 435 | * @param parent |
|---|
| 436 | * The parent object in the object tree. |
|---|
| 437 | * @param unmarshaller |
|---|
| 438 | * The unmarshaller that generated the instance. |
|---|
| 439 | */ |
|---|
| 440 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 441 | setParent(parent); |
|---|
| 442 | } |
|---|
| 443 | |
|---|
| 444 | } |
|---|
| 445 | |
|---|
| 446 | |
|---|
| 447 | /** |
|---|
| 448 | * <p>Java class for anonymous complex type. |
|---|
| 449 | * |
|---|
| 450 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 451 | * |
|---|
| 452 | * <pre> |
|---|
| 453 | * <complexType> |
|---|
| 454 | * <complexContent> |
|---|
| 455 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 456 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 457 | * </restriction> |
|---|
| 458 | * </complexContent> |
|---|
| 459 | * </complexType> |
|---|
| 460 | * </pre> |
|---|
| 461 | * |
|---|
| 462 | * |
|---|
| 463 | */ |
|---|
| 464 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 465 | @XmlType(name = "") |
|---|
| 466 | public static class Name |
|---|
| 467 | implements Child |
|---|
| 468 | { |
|---|
| 469 | |
|---|
| 470 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 471 | protected String val; |
|---|
| 472 | @XmlTransient |
|---|
| 473 | private Object parent; |
|---|
| 474 | |
|---|
| 475 | /** |
|---|
| 476 | * Gets the value of the val property. |
|---|
| 477 | * |
|---|
| 478 | * @return |
|---|
| 479 | * possible object is |
|---|
| 480 | * {@link String } |
|---|
| 481 | * |
|---|
| 482 | */ |
|---|
| 483 | public String getVal() { |
|---|
| 484 | return val; |
|---|
| 485 | } |
|---|
| 486 | |
|---|
| 487 | /** |
|---|
| 488 | * Sets the value of the val property. |
|---|
| 489 | * |
|---|
| 490 | * @param value |
|---|
| 491 | * allowed object is |
|---|
| 492 | * {@link String } |
|---|
| 493 | * |
|---|
| 494 | */ |
|---|
| 495 | public void setVal(String value) { |
|---|
| 496 | this.val = value; |
|---|
| 497 | } |
|---|
| 498 | |
|---|
| 499 | /** |
|---|
| 500 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 501 | * |
|---|
| 502 | * @return |
|---|
| 503 | * The parent object. |
|---|
| 504 | */ |
|---|
| 505 | public Object getParent() { |
|---|
| 506 | return this.parent; |
|---|
| 507 | } |
|---|
| 508 | |
|---|
| 509 | public void setParent(Object parent) { |
|---|
| 510 | this.parent = parent; |
|---|
| 511 | } |
|---|
| 512 | |
|---|
| 513 | /** |
|---|
| 514 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 515 | * |
|---|
| 516 | * @param parent |
|---|
| 517 | * The parent object in the object tree. |
|---|
| 518 | * @param unmarshaller |
|---|
| 519 | * The unmarshaller that generated the instance. |
|---|
| 520 | */ |
|---|
| 521 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 522 | setParent(parent); |
|---|
| 523 | } |
|---|
| 524 | |
|---|
| 525 | } |
|---|
| 526 | |
|---|
| 527 | } |
|---|