source: trunk/docx4j/src/main/java/org/docx4j/wml/CTPlaceholder.java @ 359

Revision 359, 5.4 KB checked in by jharrop, 4 years ago (diff)

Change CT_FldChar to FldChar?;
Style is freestanding, rather than an inner class of Styles.
(Other changes largely whitespace in license header)

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.XmlAttribute;
28import javax.xml.bind.annotation.XmlElement;
29import javax.xml.bind.annotation.XmlTransient;
30import javax.xml.bind.annotation.XmlType;
31import org.jvnet.jaxb2_commons.ppp.Child;
32
33
34/**
35 * <p>Java class for CT_Placeholder complex type.
36 *
37 * <p>The following schema fragment specifies the expected content contained within this class.
38 *
39 * <pre>
40 * &lt;complexType name="CT_Placeholder">
41 *   &lt;complexContent>
42 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 *       &lt;sequence>
44 *         &lt;element name="docPart">
45 *           &lt;complexType>
46 *             &lt;complexContent>
47 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
48 *                 &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
49 *               &lt;/restriction>
50 *             &lt;/complexContent>
51 *           &lt;/complexType>
52 *         &lt;/element>
53 *       &lt;/sequence>
54 *     &lt;/restriction>
55 *   &lt;/complexContent>
56 * &lt;/complexType>
57 * </pre>
58 *
59 *
60 */
61@XmlAccessorType(XmlAccessType.FIELD)
62@XmlType(name = "CT_Placeholder", propOrder = {
63    "docPart"
64})
65public class CTPlaceholder
66    implements Child
67{
68
69    @XmlElement(required = true)
70    protected CTPlaceholder.DocPart docPart;
71    @XmlTransient
72    private Object parent;
73
74    /**
75     * Gets the value of the docPart property.
76     *
77     * @return
78     *     possible object is
79     *     {@link CTPlaceholder.DocPart }
80     *     
81     */
82    public CTPlaceholder.DocPart getDocPart() {
83        return docPart;
84    }
85
86    /**
87     * Sets the value of the docPart property.
88     *
89     * @param value
90     *     allowed object is
91     *     {@link CTPlaceholder.DocPart }
92     *     
93     */
94    public void setDocPart(CTPlaceholder.DocPart value) {
95        this.docPart = value;
96    }
97
98    /**
99     * Gets the parent object in the object tree representing the unmarshalled xml document.
100     *
101     * @return
102     *     The parent object.
103     */
104    public Object getParent() {
105        return this.parent;
106    }
107
108    public void setParent(Object parent) {
109        this.parent = parent;
110    }
111
112    /**
113     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
114     *
115     * @param parent
116     *     The parent object in the object tree.
117     * @param unmarshaller
118     *     The unmarshaller that generated the instance.
119     */
120    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
121        setParent(parent);
122    }
123
124
125    /**
126     * <p>Java class for anonymous complex type.
127     *
128     * <p>The following schema fragment specifies the expected content contained within this class.
129     *
130     * <pre>
131     * &lt;complexType>
132     *   &lt;complexContent>
133     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
134     *       &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
135     *     &lt;/restriction>
136     *   &lt;/complexContent>
137     * &lt;/complexType>
138     * </pre>
139     *
140     *
141     */
142    @XmlAccessorType(XmlAccessType.FIELD)
143    @XmlType(name = "")
144    public static class DocPart
145        implements Child
146    {
147
148        @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
149        protected String val;
150        @XmlTransient
151        private Object parent;
152
153        /**
154         * Gets the value of the val property.
155         *
156         * @return
157         *     possible object is
158         *     {@link String }
159         *     
160         */
161        public String getVal() {
162            return val;
163        }
164
165        /**
166         * Sets the value of the val property.
167         *
168         * @param value
169         *     allowed object is
170         *     {@link String }
171         *     
172         */
173        public void setVal(String value) {
174            this.val = value;
175        }
176
177        /**
178         * Gets the parent object in the object tree representing the unmarshalled xml document.
179         *
180         * @return
181         *     The parent object.
182         */
183        public Object getParent() {
184            return this.parent;
185        }
186
187        public void setParent(Object parent) {
188            this.parent = parent;
189        }
190
191        /**
192         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
193         *
194         * @param parent
195         *     The parent object in the object tree.
196         * @param unmarshaller
197         *     The unmarshaller that generated the instance.
198         */
199        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
200            setParent(parent);
201        }
202
203    }
204
205}
Note: See TracBrowser for help on using the repository browser.