source: trunk/docx4j/src/main/java/org/docx4j/wml/DelText.java @ 469

Revision 469, 3.6 KB checked in by jharrop, 4 years ago (diff)

Add JAXB objects representing w:ins/w:r, w:del/w:r, and w:r/w:delText.
The other commits are just the usual xjc generate shuffle.

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.XmlRootElement;
29import javax.xml.bind.annotation.XmlTransient;
30import javax.xml.bind.annotation.XmlType;
31import javax.xml.bind.annotation.XmlValue;
32import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
33import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
34import org.jvnet.jaxb2_commons.ppp.Child;
35
36
37/**
38 * <p>Java class for anonymous complex type.
39 *
40 * <p>The following schema fragment specifies the expected content contained within this class.
41 *
42 * <pre>
43 * &lt;complexType>
44 *   &lt;simpleContent>
45 *     &lt;extension base="&lt;http://schemas.openxmlformats.org/wordprocessingml/2006/main>ST_String">
46 *       &lt;attribute ref="{http://www.w3.org/XML/1998/namespace}space"/>
47 *     &lt;/extension>
48 *   &lt;/simpleContent>
49 * &lt;/complexType>
50 * </pre>
51 *
52 *
53 */
54@XmlAccessorType(XmlAccessType.FIELD)
55@XmlType(name = "", propOrder = {
56    "value"
57})
58@XmlRootElement(name = "delText")
59public class DelText implements Child
60{
61
62    @XmlValue
63    protected String value;
64    @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
65    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
66    protected String space;
67    @XmlTransient
68    private Object parent;
69
70    /**
71     * String
72     *
73     * @return
74     *     possible object is
75     *     {@link String }
76     *     
77     */
78    public String getValue() {
79        return value;
80    }
81
82    /**
83     * Sets the value of the value property.
84     *
85     * @param value
86     *     allowed object is
87     *     {@link String }
88     *     
89     */
90    public void setValue(String value) {
91        this.value = value;
92    }
93
94    /**
95     *
96     *                                                          Content Contains Significant Whitespace
97     *                                                 
98     *
99     * @return
100     *     possible object is
101     *     {@link String }
102     *     
103     */
104    public String getSpace() {
105        return space;
106    }
107
108    /**
109     * Sets the value of the space property.
110     *
111     * @param value
112     *     allowed object is
113     *     {@link String }
114     *     
115     */
116    public void setSpace(String value) {
117        this.space = value;
118    }
119
120    /**
121     * Gets the parent object in the object tree representing the unmarshalled xml document.
122     *
123     * @return
124     *     The parent object.
125     */
126    public Object getParent() {
127        return this.parent;
128    }
129
130    public void setParent(Object parent) {
131        this.parent = parent;
132    }
133
134    /**
135     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
136     *
137     * @param parent
138     *     The parent object in the object tree.
139     * @param unmarshaller
140     *     The unmarshaller that generated the instance.
141     */
142    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
143        setParent(parent);
144    }
145
146}
Note: See TracBrowser for help on using the repository browser.