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