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