| 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.XmlElementRef; |
|---|
| 31 | import javax.xml.bind.annotation.XmlElementRefs; |
|---|
| 32 | import javax.xml.bind.annotation.XmlRootElement; |
|---|
| 33 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 34 | import javax.xml.bind.annotation.XmlType; |
|---|
| 35 | import org.docx4j.math.CTOMath; |
|---|
| 36 | import org.docx4j.math.CTOMathPara; |
|---|
| 37 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | /** |
|---|
| 41 | * Footer |
|---|
| 42 | * |
|---|
| 43 | * <p>Java class for anonymous complex type. |
|---|
| 44 | * |
|---|
| 45 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 46 | * |
|---|
| 47 | * <pre> |
|---|
| 48 | * <complexType> |
|---|
| 49 | * <complexContent> |
|---|
| 50 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 51 | * <group ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}EG_BlockLevelElts" maxOccurs="unbounded"/> |
|---|
| 52 | * </restriction> |
|---|
| 53 | * </complexContent> |
|---|
| 54 | * </complexType> |
|---|
| 55 | * </pre> |
|---|
| 56 | * |
|---|
| 57 | * |
|---|
| 58 | */ |
|---|
| 59 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 60 | @XmlType(name = "", propOrder = { |
|---|
| 61 | "egBlockLevelElts" |
|---|
| 62 | }) |
|---|
| 63 | @XmlRootElement(name = "ftr") |
|---|
| 64 | public class Ftr |
|---|
| 65 | implements Child, ContentAccessor |
|---|
| 66 | { |
|---|
| 67 | |
|---|
| 68 | @XmlElementRefs({ |
|---|
| 69 | @XmlElementRef(name = "commentRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = CommentRangeStart.class), |
|---|
| 70 | @XmlElementRef(name = "permStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 71 | @XmlElementRef(name = "ins", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RunIns.class), |
|---|
| 72 | @XmlElementRef(name = "p", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = P.class), |
|---|
| 73 | @XmlElementRef(name = "oMath", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", type = JAXBElement.class), |
|---|
| 74 | @XmlElementRef(name = "moveFrom", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 75 | @XmlElementRef(name = "moveFromRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 76 | @XmlElementRef(name = "customXmlMoveToRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 77 | @XmlElementRef(name = "sdt", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = SdtBlock.class), |
|---|
| 78 | @XmlElementRef(name = "customXmlInsRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 79 | @XmlElementRef(name = "commentRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = CommentRangeEnd.class), |
|---|
| 80 | @XmlElementRef(name = "bookmarkEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 81 | @XmlElementRef(name = "moveTo", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 82 | @XmlElementRef(name = "moveToRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 83 | @XmlElementRef(name = "customXmlMoveFromRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 84 | @XmlElementRef(name = "proofErr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = ProofErr.class), |
|---|
| 85 | @XmlElementRef(name = "del", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = RunDel.class), |
|---|
| 86 | @XmlElementRef(name = "altChunk", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 87 | @XmlElementRef(name = "permEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 88 | @XmlElementRef(name = "moveToRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 89 | @XmlElementRef(name = "oMathPara", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", type = JAXBElement.class), |
|---|
| 90 | @XmlElementRef(name = "customXmlInsRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 91 | @XmlElementRef(name = "customXmlMoveFromRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 92 | @XmlElementRef(name = "customXml", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 93 | @XmlElementRef(name = "bookmarkStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 94 | @XmlElementRef(name = "customXmlDelRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 95 | @XmlElementRef(name = "customXmlDelRangeStart", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 96 | @XmlElementRef(name = "tbl", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 97 | @XmlElementRef(name = "customXmlMoveToRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class), |
|---|
| 98 | @XmlElementRef(name = "moveFromRangeEnd", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class) |
|---|
| 99 | }) |
|---|
| 100 | protected List<Object> egBlockLevelElts; |
|---|
| 101 | @XmlTransient |
|---|
| 102 | private Object parent; |
|---|
| 103 | |
|---|
| 104 | /** |
|---|
| 105 | * Gets the value of the egBlockLevelElts property. |
|---|
| 106 | * |
|---|
| 107 | * <p> |
|---|
| 108 | * This accessor method returns a reference to the live list, |
|---|
| 109 | * not a snapshot. Therefore any modification you make to the |
|---|
| 110 | * returned list will be present inside the JAXB object. |
|---|
| 111 | * This is why there is not a <CODE>set</CODE> method for the egBlockLevelElts property. |
|---|
| 112 | * |
|---|
| 113 | * <p> |
|---|
| 114 | * For example, to add a new item, do as follows: |
|---|
| 115 | * <pre> |
|---|
| 116 | * getEGBlockLevelElts().add(newItem); |
|---|
| 117 | * </pre> |
|---|
| 118 | * |
|---|
| 119 | * |
|---|
| 120 | * <p> |
|---|
| 121 | * Objects of the following type(s) are allowed in the list |
|---|
| 122 | * {@link CommentRangeStart } |
|---|
| 123 | * {@link JAXBElement }{@code <}{@link RangePermissionStart }{@code >} |
|---|
| 124 | * {@link RunIns } |
|---|
| 125 | * {@link P } |
|---|
| 126 | * {@link JAXBElement }{@code <}{@link CTOMath }{@code >} |
|---|
| 127 | * {@link JAXBElement }{@code <}{@link RunTrackChange }{@code >} |
|---|
| 128 | * {@link JAXBElement }{@code <}{@link CTMoveBookmark }{@code >} |
|---|
| 129 | * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >} |
|---|
| 130 | * {@link SdtBlock } |
|---|
| 131 | * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >} |
|---|
| 132 | * {@link CommentRangeEnd } |
|---|
| 133 | * {@link JAXBElement }{@code <}{@link CTMarkupRange }{@code >} |
|---|
| 134 | * {@link JAXBElement }{@code <}{@link RunTrackChange }{@code >} |
|---|
| 135 | * {@link JAXBElement }{@code <}{@link CTMarkupRange }{@code >} |
|---|
| 136 | * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >} |
|---|
| 137 | * {@link ProofErr } |
|---|
| 138 | * {@link RunDel } |
|---|
| 139 | * {@link JAXBElement }{@code <}{@link CTAltChunk }{@code >} |
|---|
| 140 | * {@link JAXBElement }{@code <}{@link CTPerm }{@code >} |
|---|
| 141 | * {@link JAXBElement }{@code <}{@link CTMoveBookmark }{@code >} |
|---|
| 142 | * {@link JAXBElement }{@code <}{@link CTOMathPara }{@code >} |
|---|
| 143 | * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >} |
|---|
| 144 | * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >} |
|---|
| 145 | * {@link JAXBElement }{@code <}{@link CTCustomXmlBlock }{@code >} |
|---|
| 146 | * {@link JAXBElement }{@code <}{@link CTBookmark }{@code >} |
|---|
| 147 | * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >} |
|---|
| 148 | * {@link JAXBElement }{@code <}{@link CTTrackChange }{@code >} |
|---|
| 149 | * {@link JAXBElement }{@code <}{@link Tbl }{@code >} |
|---|
| 150 | * {@link JAXBElement }{@code <}{@link CTMarkup }{@code >} |
|---|
| 151 | * {@link JAXBElement }{@code <}{@link CTMarkupRange }{@code >} |
|---|
| 152 | * |
|---|
| 153 | * |
|---|
| 154 | */ |
|---|
| 155 | @Deprecated |
|---|
| 156 | public List<Object> getEGBlockLevelElts() { |
|---|
| 157 | if (egBlockLevelElts == null) { |
|---|
| 158 | egBlockLevelElts = new ArrayList<Object>(); |
|---|
| 159 | } |
|---|
| 160 | return this.egBlockLevelElts; |
|---|
| 161 | } |
|---|
| 162 | |
|---|
| 163 | public List<Object> getContent() { |
|---|
| 164 | if (egBlockLevelElts == null) { |
|---|
| 165 | egBlockLevelElts = new ArrayList<Object>(); |
|---|
| 166 | } |
|---|
| 167 | return this.egBlockLevelElts; |
|---|
| 168 | } |
|---|
| 169 | |
|---|
| 170 | /** |
|---|
| 171 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 172 | * |
|---|
| 173 | * @return |
|---|
| 174 | * The parent object. |
|---|
| 175 | */ |
|---|
| 176 | public Object getParent() { |
|---|
| 177 | return this.parent; |
|---|
| 178 | } |
|---|
| 179 | |
|---|
| 180 | public void setParent(Object parent) { |
|---|
| 181 | this.parent = parent; |
|---|
| 182 | } |
|---|
| 183 | |
|---|
| 184 | /** |
|---|
| 185 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 186 | * |
|---|
| 187 | * @param parent |
|---|
| 188 | * The parent object in the object tree. |
|---|
| 189 | * @param unmarshaller |
|---|
| 190 | * The unmarshaller that generated the instance. |
|---|
| 191 | */ |
|---|
| 192 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 193 | setParent(parent); |
|---|
| 194 | } |
|---|
| 195 | |
|---|
| 196 | } |
|---|