source: trunk/docx4j/src/main/java/org/docx4j/wml/CTSdtCell.java @ 1472

Revision 1472, 4.3 KB checked in by jharrop, 13 months ago (diff)

Implement ContentAccessor? interface for sdt elements

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 javax.xml.bind.Unmarshaller;
25import javax.xml.bind.annotation.XmlAccessType;
26import javax.xml.bind.annotation.XmlAccessorType;
27import javax.xml.bind.annotation.XmlRootElement;
28import javax.xml.bind.annotation.XmlTransient;
29import javax.xml.bind.annotation.XmlType;
30import org.jvnet.jaxb2_commons.ppp.Child;
31
32
33/**
34 * <p>Java class for CT_SdtCell complex type.
35 *
36 * <p>The following schema fragment specifies the expected content contained within this class.
37 *
38 * <pre>
39 * &lt;complexType name="CT_SdtCell">
40 *   &lt;complexContent>
41 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
42 *       &lt;sequence>
43 *         &lt;element name="sdtPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtPr" minOccurs="0"/>
44 *         &lt;element name="sdtEndPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtEndPr" minOccurs="0"/>
45 *         &lt;element name="sdtContent" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtContentCell" minOccurs="0"/>
46 *       &lt;/sequence>
47 *     &lt;/restriction>
48 *   &lt;/complexContent>
49 * &lt;/complexType>
50 * </pre>
51 *
52 *
53 */
54@XmlAccessorType(XmlAccessType.FIELD)
55@XmlType(name = "CT_SdtCell", propOrder = {
56    "sdtPr",
57    "sdtEndPr",
58    "sdtContent"
59})
60@XmlRootElement(name = "sdt")
61public class CTSdtCell implements SdtElement, Child
62{
63
64    protected SdtPr sdtPr;
65    protected CTSdtEndPr sdtEndPr;
66    protected CTSdtContentCell sdtContent;
67    @XmlTransient
68    private Object parent;
69   
70    /**
71     * Gets the value of the sdtPr property.
72     *
73     * @return
74     *     possible object is
75     *     {@link SdtPr }
76     *     
77     */
78    public SdtPr getSdtPr() {
79        return sdtPr;
80    }
81
82    /**
83     * Sets the value of the sdtPr property.
84     *
85     * @param value
86     *     allowed object is
87     *     {@link SdtPr }
88     *     
89     */
90    public void setSdtPr(SdtPr value) {
91        this.sdtPr = value;
92    }
93
94    /**
95     * Gets the value of the sdtEndPr property.
96     *
97     * @return
98     *     possible object is
99     *     {@link CTSdtEndPr }
100     *     
101     */
102    public CTSdtEndPr getSdtEndPr() {
103        return sdtEndPr;
104    }
105
106    /**
107     * Sets the value of the sdtEndPr property.
108     *
109     * @param value
110     *     allowed object is
111     *     {@link CTSdtEndPr }
112     *     
113     */
114    public void setSdtEndPr(CTSdtEndPr value) {
115        this.sdtEndPr = value;
116    }
117
118    /**
119     * Gets the value of the sdtContent property.
120     *
121     * @return
122     *     possible object is
123     *     {@link CTSdtContentCell }
124     *     
125     */
126    public ContentAccessor getSdtContent() {
127        return sdtContent;
128    }
129
130   
131    /**
132     * Sets the value of the sdtContent property.
133     *
134     * @param value
135     *     allowed object is
136     *     {@link CTSdtContentCell }
137     *     
138     */
139    public void setSdtContent(CTSdtContentCell value) {
140        this.sdtContent = value;
141    }
142
143    /**
144     * Gets the parent object in the object tree representing the unmarshalled xml document.
145     *
146     * @return
147     *     The parent object.
148     */
149    public Object getParent() {
150        return this.parent;
151    }
152
153    public void setParent(Object parent) {
154        this.parent = parent;
155    }
156
157    /**
158     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
159     *
160     * @param parent
161     *     The parent object in the object tree.
162     * @param unmarshaller
163     *     The unmarshaller that generated the instance.
164     */
165    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
166        setParent(parent);
167    }
168
169}
Note: See TracBrowser for help on using the repository browser.