| 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.util.ArrayList; |
|---|
| 25 | import java.util.List; |
|---|
| 26 | import javax.xml.bind.JAXBElement; |
|---|
| 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.XmlElement; |
|---|
| 31 | import javax.xml.bind.annotation.XmlElementRef; |
|---|
| 32 | import javax.xml.bind.annotation.XmlElementRefs; |
|---|
| 33 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 34 | import javax.xml.bind.annotation.XmlType; |
|---|
| 35 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | /** |
|---|
| 39 | * <p>Java class for CT_RPrChange complex type. |
|---|
| 40 | * |
|---|
| 41 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 42 | * |
|---|
| 43 | * <pre> |
|---|
| 44 | * <complexType name="CT_RPrChange"> |
|---|
| 45 | * <complexContent> |
|---|
| 46 | * <extension base="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_TrackChange"> |
|---|
| 47 | * <sequence> |
|---|
| 48 | * <element name="rPr"> |
|---|
| 49 | * <complexType> |
|---|
| 50 | * <complexContent> |
|---|
| 51 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 52 | * <sequence> |
|---|
| 53 | * <group ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}EG_RPrBase" maxOccurs="unbounded" minOccurs="0"/> |
|---|
| 54 | * </sequence> |
|---|
| 55 | * </restriction> |
|---|
| 56 | * </complexContent> |
|---|
| 57 | * </complexType> |
|---|
| 58 | * </element> |
|---|
| 59 | * </sequence> |
|---|
| 60 | * </extension> |
|---|
| 61 | * </complexContent> |
|---|
| 62 | * </complexType> |
|---|
| 63 | * </pre> |
|---|
| 64 | * |
|---|
| 65 | * |
|---|
| 66 | */ |
|---|
| 67 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 68 | @XmlType(name = "CT_RPrChange", propOrder = { |
|---|
| 69 | "rPr" |
|---|
| 70 | }) |
|---|
| 71 | public class CTRPrChange |
|---|
| 72 | extends CTTrackChange |
|---|
| 73 | implements Child |
|---|
| 74 | { |
|---|
| 75 | |
|---|
| 76 | @XmlElement(required = true) |
|---|
| 77 | protected CTRPrChange.RPr rPr; |
|---|
| 78 | @XmlTransient |
|---|
| 79 | private Object parent; |
|---|
| 80 | |
|---|
| 81 | /** |
|---|
| 82 | * Gets the value of the rPr property. |
|---|
| 83 | * |
|---|
| 84 | * @return |
|---|
| 85 | * possible object is |
|---|
| 86 | * {@link CTRPrChange.RPr } |
|---|
| 87 | * |
|---|
| 88 | */ |
|---|
| 89 | public CTRPrChange.RPr getRPr() { |
|---|
| 90 | return rPr; |
|---|
| 91 | } |
|---|
| 92 | |
|---|
| 93 | /** |
|---|
| 94 | * Sets the value of the rPr property. |
|---|
| 95 | * |
|---|
| 96 | * @param value |
|---|
| 97 | * allowed object is |
|---|
| 98 | * {@link CTRPrChange.RPr } |
|---|
| 99 | * |
|---|
| 100 | */ |
|---|
| 101 | public void setRPr(CTRPrChange.RPr value) { |
|---|
| 102 | this.rPr = value; |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | /** |
|---|
| 106 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 107 | * |
|---|
| 108 | * @return |
|---|
| 109 | * The parent object. |
|---|
| 110 | */ |
|---|
| 111 | public Object getParent() { |
|---|
| 112 | return this.parent; |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | public void setParent(Object parent) { |
|---|
| 116 | this.parent = parent; |
|---|
| 117 | } |
|---|
| 118 | |
|---|
| 119 | /** |
|---|
| 120 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 121 | * |
|---|
| 122 | * @param parent |
|---|
| 123 | * The parent object in the object tree. |
|---|
| 124 | * @param unmarshaller |
|---|
| 125 | * The unmarshaller that generated the instance. |
|---|
| 126 | */ |
|---|
| 127 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 128 | setParent(parent); |
|---|
| 129 | } |
|---|
| 130 | |
|---|
| 131 | |
|---|
| 132 | /** |
|---|
| 133 | * <p>Java class for anonymous complex type. |
|---|
| 134 | * |
|---|
| 135 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 136 | * |
|---|
| 137 | * <pre> |
|---|
| 138 | * <complexType> |
|---|
| 139 | * <complexContent> |
|---|
| 140 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 141 | * <sequence> |
|---|
| 142 | * <group ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}EG_RPrBase" maxOccurs="unbounded" minOccurs="0"/> |
|---|
| 143 | * </sequence> |
|---|
| 144 | * </restriction> |
|---|
| 145 | * </complexContent> |
|---|
| 146 | * </complexType> |
|---|
| 147 | * </pre> |
|---|
| 148 | * |
|---|
| 149 | * |
|---|
| 150 | */ |
|---|
| 151 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 152 | @XmlType(name = "", propOrder = { |
|---|
| 153 | "egrPrBase" |
|---|
| 154 | }) |
|---|
| 155 | public static class RPr |
|---|
| 156 | implements Child |
|---|
| 157 | { |
|---|
| 158 | |
|---|
| 159 | @XmlElementRefs({ |
|---|
| 160 | @XmlElementRef(name = "eastAsianLayout", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 161 | @XmlElementRef(name = "rStyle", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RStyle.class), |
|---|
| 162 | @XmlElementRef(name = "iCs", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 163 | @XmlElementRef(name = "shd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 164 | @XmlElementRef(name = "vanish", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 165 | @XmlElementRef(name = "spacing", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 166 | @XmlElementRef(name = "oMath", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 167 | @XmlElementRef(name = "color", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = Color.class), |
|---|
| 168 | @XmlElementRef(name = "szCs", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 169 | @XmlElementRef(name = "highlight", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = Highlight.class), |
|---|
| 170 | @XmlElementRef(name = "w", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 171 | @XmlElementRef(name = "snapToGrid", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 172 | @XmlElementRef(name = "fitText", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 173 | @XmlElementRef(name = "dstrike", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 174 | @XmlElementRef(name = "lang", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 175 | @XmlElementRef(name = "b", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 176 | @XmlElementRef(name = "rFonts", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RFonts.class), |
|---|
| 177 | @XmlElementRef(name = "emboss", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 178 | @XmlElementRef(name = "rtl", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 179 | @XmlElementRef(name = "sz", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 180 | @XmlElementRef(name = "smallCaps", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 181 | @XmlElementRef(name = "bdr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 182 | @XmlElementRef(name = "caps", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 183 | @XmlElementRef(name = "noProof", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 184 | @XmlElementRef(name = "effect", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 185 | @XmlElementRef(name = "webHidden", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 186 | @XmlElementRef(name = "vertAlign", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 187 | @XmlElementRef(name = "strike", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 188 | @XmlElementRef(name = "shadow", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 189 | @XmlElementRef(name = "i", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 190 | @XmlElementRef(name = "kern", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 191 | @XmlElementRef(name = "position", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 192 | @XmlElementRef(name = "u", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = U.class), |
|---|
| 193 | @XmlElementRef(name = "em", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 194 | @XmlElementRef(name = "cs", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 195 | @XmlElementRef(name = "specVanish", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 196 | @XmlElementRef(name = "bCs", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 197 | @XmlElementRef(name = "imprint", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 198 | @XmlElementRef(name = "outline", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class) |
|---|
| 199 | }) |
|---|
| 200 | protected List<Object> egrPrBase; |
|---|
| 201 | @XmlTransient |
|---|
| 202 | private Object parent; |
|---|
| 203 | |
|---|
| 204 | /** |
|---|
| 205 | * Gets the value of the egrPrBase property. |
|---|
| 206 | * |
|---|
| 207 | * <p> |
|---|
| 208 | * This accessor method returns a reference to the live list, |
|---|
| 209 | * not a snapshot. Therefore any modification you make to the |
|---|
| 210 | * returned list will be present inside the JAXB object. |
|---|
| 211 | * This is why there is not a <CODE>set</CODE> method for the egrPrBase property. |
|---|
| 212 | * |
|---|
| 213 | * <p> |
|---|
| 214 | * For example, to add a new item, do as follows: |
|---|
| 215 | * <pre> |
|---|
| 216 | * getEGRPrBase().add(newItem); |
|---|
| 217 | * </pre> |
|---|
| 218 | * |
|---|
| 219 | * |
|---|
| 220 | * <p> |
|---|
| 221 | * Objects of the following type(s) are allowed in the list |
|---|
| 222 | * {@link RStyle } |
|---|
| 223 | * {@link JAXBElement }{@code <}{@link CTEastAsianLayout }{@code >} |
|---|
| 224 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 225 | * {@link JAXBElement }{@code <}{@link CTShd }{@code >} |
|---|
| 226 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 227 | * {@link JAXBElement }{@code <}{@link CTSignedTwipsMeasure }{@code >} |
|---|
| 228 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 229 | * {@link Color } |
|---|
| 230 | * {@link JAXBElement }{@code <}{@link HpsMeasure }{@code >} |
|---|
| 231 | * {@link Highlight } |
|---|
| 232 | * {@link JAXBElement }{@code <}{@link CTTextScale }{@code >} |
|---|
| 233 | * {@link JAXBElement }{@code <}{@link CTFitText }{@code >} |
|---|
| 234 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 235 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 236 | * {@link JAXBElement }{@code <}{@link CTLanguage }{@code >} |
|---|
| 237 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 238 | * {@link RFonts } |
|---|
| 239 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 240 | * {@link JAXBElement }{@code <}{@link HpsMeasure }{@code >} |
|---|
| 241 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 242 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 243 | * {@link JAXBElement }{@code <}{@link CTBorder }{@code >} |
|---|
| 244 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 245 | * {@link JAXBElement }{@code <}{@link CTTextEffect }{@code >} |
|---|
| 246 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 247 | * {@link JAXBElement }{@code <}{@link CTVerticalAlignRun }{@code >} |
|---|
| 248 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 249 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 250 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 251 | * {@link JAXBElement }{@code <}{@link HpsMeasure }{@code >} |
|---|
| 252 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 253 | * {@link JAXBElement }{@code <}{@link CTSignedHpsMeasure }{@code >} |
|---|
| 254 | * {@link U } |
|---|
| 255 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 256 | * {@link JAXBElement }{@code <}{@link CTEm }{@code >} |
|---|
| 257 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 258 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 259 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 260 | * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >} |
|---|
| 261 | * |
|---|
| 262 | * |
|---|
| 263 | */ |
|---|
| 264 | public List<Object> getEGRPrBase() { |
|---|
| 265 | if (egrPrBase == null) { |
|---|
| 266 | egrPrBase = new ArrayList<Object>(); |
|---|
| 267 | } |
|---|
| 268 | return this.egrPrBase; |
|---|
| 269 | } |
|---|
| 270 | |
|---|
| 271 | /** |
|---|
| 272 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 273 | * |
|---|
| 274 | * @return |
|---|
| 275 | * The parent object. |
|---|
| 276 | */ |
|---|
| 277 | public Object getParent() { |
|---|
| 278 | return this.parent; |
|---|
| 279 | } |
|---|
| 280 | |
|---|
| 281 | public void setParent(Object parent) { |
|---|
| 282 | this.parent = parent; |
|---|
| 283 | } |
|---|
| 284 | |
|---|
| 285 | /** |
|---|
| 286 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 287 | * |
|---|
| 288 | * @param parent |
|---|
| 289 | * The parent object in the object tree. |
|---|
| 290 | * @param unmarshaller |
|---|
| 291 | * The unmarshaller that generated the instance. |
|---|
| 292 | */ |
|---|
| 293 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 294 | setParent(parent); |
|---|
| 295 | } |
|---|
| 296 | |
|---|
| 297 | } |
|---|
| 298 | |
|---|
| 299 | } |
|---|