| 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 javax.xml.bind.Unmarshaller; |
|---|
| 25 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 26 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 27 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 28 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 29 | import javax.xml.bind.annotation.XmlType; |
|---|
| 30 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | /** |
|---|
| 34 | * <p>Java class for CT_SdtDocPart complex type. |
|---|
| 35 | * |
|---|
| 36 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 37 | * |
|---|
| 38 | * <pre> |
|---|
| 39 | * <complexType name="CT_SdtDocPart"> |
|---|
| 40 | * <complexContent> |
|---|
| 41 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 42 | * <sequence> |
|---|
| 43 | * <element name="docPartGallery" minOccurs="0"> |
|---|
| 44 | * <complexType> |
|---|
| 45 | * <complexContent> |
|---|
| 46 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 47 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 48 | * </restriction> |
|---|
| 49 | * </complexContent> |
|---|
| 50 | * </complexType> |
|---|
| 51 | * </element> |
|---|
| 52 | * <element name="docPartCategory" minOccurs="0"> |
|---|
| 53 | * <complexType> |
|---|
| 54 | * <complexContent> |
|---|
| 55 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 56 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 57 | * </restriction> |
|---|
| 58 | * </complexContent> |
|---|
| 59 | * </complexType> |
|---|
| 60 | * </element> |
|---|
| 61 | * <element name="docPartUnique" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/> |
|---|
| 62 | * </sequence> |
|---|
| 63 | * </restriction> |
|---|
| 64 | * </complexContent> |
|---|
| 65 | * </complexType> |
|---|
| 66 | * </pre> |
|---|
| 67 | * |
|---|
| 68 | * |
|---|
| 69 | */ |
|---|
| 70 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 71 | @XmlType(name = "CT_SdtDocPart", propOrder = { |
|---|
| 72 | "docPartGallery", |
|---|
| 73 | "docPartCategory", |
|---|
| 74 | "docPartUnique" |
|---|
| 75 | }) |
|---|
| 76 | public class CTSdtDocPart |
|---|
| 77 | implements Child |
|---|
| 78 | { |
|---|
| 79 | |
|---|
| 80 | protected CTSdtDocPart.DocPartGallery docPartGallery; |
|---|
| 81 | protected CTSdtDocPart.DocPartCategory docPartCategory; |
|---|
| 82 | protected BooleanDefaultTrue docPartUnique; |
|---|
| 83 | @XmlTransient |
|---|
| 84 | private Object parent; |
|---|
| 85 | |
|---|
| 86 | /** |
|---|
| 87 | * Gets the value of the docPartGallery property. |
|---|
| 88 | * |
|---|
| 89 | * @return |
|---|
| 90 | * possible object is |
|---|
| 91 | * {@link CTSdtDocPart.DocPartGallery } |
|---|
| 92 | * |
|---|
| 93 | */ |
|---|
| 94 | public CTSdtDocPart.DocPartGallery getDocPartGallery() { |
|---|
| 95 | return docPartGallery; |
|---|
| 96 | } |
|---|
| 97 | |
|---|
| 98 | /** |
|---|
| 99 | * Sets the value of the docPartGallery property. |
|---|
| 100 | * |
|---|
| 101 | * @param value |
|---|
| 102 | * allowed object is |
|---|
| 103 | * {@link CTSdtDocPart.DocPartGallery } |
|---|
| 104 | * |
|---|
| 105 | */ |
|---|
| 106 | public void setDocPartGallery(CTSdtDocPart.DocPartGallery value) { |
|---|
| 107 | this.docPartGallery = value; |
|---|
| 108 | } |
|---|
| 109 | |
|---|
| 110 | /** |
|---|
| 111 | * Gets the value of the docPartCategory property. |
|---|
| 112 | * |
|---|
| 113 | * @return |
|---|
| 114 | * possible object is |
|---|
| 115 | * {@link CTSdtDocPart.DocPartCategory } |
|---|
| 116 | * |
|---|
| 117 | */ |
|---|
| 118 | public CTSdtDocPart.DocPartCategory getDocPartCategory() { |
|---|
| 119 | return docPartCategory; |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | /** |
|---|
| 123 | * Sets the value of the docPartCategory property. |
|---|
| 124 | * |
|---|
| 125 | * @param value |
|---|
| 126 | * allowed object is |
|---|
| 127 | * {@link CTSdtDocPart.DocPartCategory } |
|---|
| 128 | * |
|---|
| 129 | */ |
|---|
| 130 | public void setDocPartCategory(CTSdtDocPart.DocPartCategory value) { |
|---|
| 131 | this.docPartCategory = value; |
|---|
| 132 | } |
|---|
| 133 | |
|---|
| 134 | /** |
|---|
| 135 | * Gets the value of the docPartUnique property. |
|---|
| 136 | * |
|---|
| 137 | * @return |
|---|
| 138 | * possible object is |
|---|
| 139 | * {@link BooleanDefaultTrue } |
|---|
| 140 | * |
|---|
| 141 | */ |
|---|
| 142 | public BooleanDefaultTrue getDocPartUnique() { |
|---|
| 143 | return docPartUnique; |
|---|
| 144 | } |
|---|
| 145 | |
|---|
| 146 | /** |
|---|
| 147 | * Sets the value of the docPartUnique property. |
|---|
| 148 | * |
|---|
| 149 | * @param value |
|---|
| 150 | * allowed object is |
|---|
| 151 | * {@link BooleanDefaultTrue } |
|---|
| 152 | * |
|---|
| 153 | */ |
|---|
| 154 | public void setDocPartUnique(BooleanDefaultTrue value) { |
|---|
| 155 | this.docPartUnique = value; |
|---|
| 156 | } |
|---|
| 157 | |
|---|
| 158 | /** |
|---|
| 159 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 160 | * |
|---|
| 161 | * @return |
|---|
| 162 | * The parent object. |
|---|
| 163 | */ |
|---|
| 164 | public Object getParent() { |
|---|
| 165 | return this.parent; |
|---|
| 166 | } |
|---|
| 167 | |
|---|
| 168 | public void setParent(Object parent) { |
|---|
| 169 | this.parent = parent; |
|---|
| 170 | } |
|---|
| 171 | |
|---|
| 172 | /** |
|---|
| 173 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 174 | * |
|---|
| 175 | * @param parent |
|---|
| 176 | * The parent object in the object tree. |
|---|
| 177 | * @param unmarshaller |
|---|
| 178 | * The unmarshaller that generated the instance. |
|---|
| 179 | */ |
|---|
| 180 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 181 | setParent(parent); |
|---|
| 182 | } |
|---|
| 183 | |
|---|
| 184 | |
|---|
| 185 | /** |
|---|
| 186 | * <p>Java class for anonymous complex type. |
|---|
| 187 | * |
|---|
| 188 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 189 | * |
|---|
| 190 | * <pre> |
|---|
| 191 | * <complexType> |
|---|
| 192 | * <complexContent> |
|---|
| 193 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 194 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 195 | * </restriction> |
|---|
| 196 | * </complexContent> |
|---|
| 197 | * </complexType> |
|---|
| 198 | * </pre> |
|---|
| 199 | * |
|---|
| 200 | * |
|---|
| 201 | */ |
|---|
| 202 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 203 | @XmlType(name = "") |
|---|
| 204 | public static class DocPartCategory |
|---|
| 205 | implements Child |
|---|
| 206 | { |
|---|
| 207 | |
|---|
| 208 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 209 | protected String val; |
|---|
| 210 | @XmlTransient |
|---|
| 211 | private Object parent; |
|---|
| 212 | |
|---|
| 213 | /** |
|---|
| 214 | * Gets the value of the val property. |
|---|
| 215 | * |
|---|
| 216 | * @return |
|---|
| 217 | * possible object is |
|---|
| 218 | * {@link String } |
|---|
| 219 | * |
|---|
| 220 | */ |
|---|
| 221 | public String getVal() { |
|---|
| 222 | return val; |
|---|
| 223 | } |
|---|
| 224 | |
|---|
| 225 | /** |
|---|
| 226 | * Sets the value of the val property. |
|---|
| 227 | * |
|---|
| 228 | * @param value |
|---|
| 229 | * allowed object is |
|---|
| 230 | * {@link String } |
|---|
| 231 | * |
|---|
| 232 | */ |
|---|
| 233 | public void setVal(String value) { |
|---|
| 234 | this.val = value; |
|---|
| 235 | } |
|---|
| 236 | |
|---|
| 237 | /** |
|---|
| 238 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 239 | * |
|---|
| 240 | * @return |
|---|
| 241 | * The parent object. |
|---|
| 242 | */ |
|---|
| 243 | public Object getParent() { |
|---|
| 244 | return this.parent; |
|---|
| 245 | } |
|---|
| 246 | |
|---|
| 247 | public void setParent(Object parent) { |
|---|
| 248 | this.parent = parent; |
|---|
| 249 | } |
|---|
| 250 | |
|---|
| 251 | /** |
|---|
| 252 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 253 | * |
|---|
| 254 | * @param parent |
|---|
| 255 | * The parent object in the object tree. |
|---|
| 256 | * @param unmarshaller |
|---|
| 257 | * The unmarshaller that generated the instance. |
|---|
| 258 | */ |
|---|
| 259 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 260 | setParent(parent); |
|---|
| 261 | } |
|---|
| 262 | |
|---|
| 263 | } |
|---|
| 264 | |
|---|
| 265 | |
|---|
| 266 | /** |
|---|
| 267 | * <p>Java class for anonymous complex type. |
|---|
| 268 | * |
|---|
| 269 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 270 | * |
|---|
| 271 | * <pre> |
|---|
| 272 | * <complexType> |
|---|
| 273 | * <complexContent> |
|---|
| 274 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 275 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 276 | * </restriction> |
|---|
| 277 | * </complexContent> |
|---|
| 278 | * </complexType> |
|---|
| 279 | * </pre> |
|---|
| 280 | * |
|---|
| 281 | * |
|---|
| 282 | */ |
|---|
| 283 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 284 | @XmlType(name = "") |
|---|
| 285 | public static class DocPartGallery |
|---|
| 286 | implements Child |
|---|
| 287 | { |
|---|
| 288 | |
|---|
| 289 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 290 | protected String val; |
|---|
| 291 | @XmlTransient |
|---|
| 292 | private Object parent; |
|---|
| 293 | |
|---|
| 294 | /** |
|---|
| 295 | * Gets the value of the val property. |
|---|
| 296 | * |
|---|
| 297 | * @return |
|---|
| 298 | * possible object is |
|---|
| 299 | * {@link String } |
|---|
| 300 | * |
|---|
| 301 | */ |
|---|
| 302 | public String getVal() { |
|---|
| 303 | return val; |
|---|
| 304 | } |
|---|
| 305 | |
|---|
| 306 | /** |
|---|
| 307 | * Sets the value of the val property. |
|---|
| 308 | * |
|---|
| 309 | * @param value |
|---|
| 310 | * allowed object is |
|---|
| 311 | * {@link String } |
|---|
| 312 | * |
|---|
| 313 | */ |
|---|
| 314 | public void setVal(String value) { |
|---|
| 315 | this.val = value; |
|---|
| 316 | } |
|---|
| 317 | |
|---|
| 318 | /** |
|---|
| 319 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 320 | * |
|---|
| 321 | * @return |
|---|
| 322 | * The parent object. |
|---|
| 323 | */ |
|---|
| 324 | public Object getParent() { |
|---|
| 325 | return this.parent; |
|---|
| 326 | } |
|---|
| 327 | |
|---|
| 328 | public void setParent(Object parent) { |
|---|
| 329 | this.parent = parent; |
|---|
| 330 | } |
|---|
| 331 | |
|---|
| 332 | /** |
|---|
| 333 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 334 | * |
|---|
| 335 | * @param parent |
|---|
| 336 | * The parent object in the object tree. |
|---|
| 337 | * @param unmarshaller |
|---|
| 338 | * The unmarshaller that generated the instance. |
|---|
| 339 | */ |
|---|
| 340 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 341 | setParent(parent); |
|---|
| 342 | } |
|---|
| 343 | |
|---|
| 344 | } |
|---|
| 345 | |
|---|
| 346 | } |
|---|