source: trunk/docx4j/src/main/java/org/docx4j/wml/CTSdtContentCell.java @ 1614

Revision 1614, 9.7 KB checked in by jharrop, 11 months ago (diff)

@XmlRootElement?(name = "sdtContent")

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