source: trunk/docx4j/src/main/java/org/docx4j/xmlPackage/XmlData.java @ 811

Revision 811, 4.7 KB checked in by jharrop, 3 years ago (diff)

@XmlRootElement? annotation

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
21package org.docx4j.xmlPackage;
22
23import javax.xml.bind.annotation.XmlAccessType;
24import javax.xml.bind.annotation.XmlAccessorType;
25import javax.xml.bind.annotation.XmlAnyElement;
26import javax.xml.bind.annotation.XmlAttribute;
27import javax.xml.bind.annotation.XmlRootElement;
28import javax.xml.bind.annotation.XmlType;
29import org.w3c.dom.Element;
30
31
32/**
33 *
34 *                              Specifies the details of an xml part.
35 *                     
36 *
37 * <p>Java class for CT_XmlData complex type.
38 *
39 * <p>The following schema fragment specifies the expected content contained within this class.
40 *
41 * <pre>
42 * &lt;complexType name="CT_XmlData">
43 *   &lt;complexContent>
44 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
45 *       &lt;sequence>
46 *         &lt;any/>
47 *       &lt;/sequence>
48 *       &lt;attribute name="originalXmlEncoding" type="{http://www.w3.org/2001/XMLSchema}string" default="UTF-8" />
49 *       &lt;attribute name="originalXmlVersion" type="{http://www.w3.org/2001/XMLSchema}string" default="1.0" />
50 *       &lt;attribute name="originalXmlStandalone" type="{http://www.w3.org/2001/XMLSchema}string" default="yes" />
51 *     &lt;/restriction>
52 *   &lt;/complexContent>
53 * &lt;/complexType>
54 * </pre>
55 *
56 *
57 */
58@XmlAccessorType(XmlAccessType.FIELD)
59@XmlType(name = "CT_XmlData", propOrder = {
60    "any"
61})
62@XmlRootElement(name = "xmlData")
63public class XmlData {
64
65    @XmlAnyElement
66    protected Element any;
67    @XmlAttribute(namespace = "http://schemas.microsoft.com/office/2006/xmlPackage")
68    protected String originalXmlEncoding;
69    @XmlAttribute(namespace = "http://schemas.microsoft.com/office/2006/xmlPackage")
70    protected String originalXmlVersion;
71    @XmlAttribute(namespace = "http://schemas.microsoft.com/office/2006/xmlPackage")
72    protected String originalXmlStandalone;
73
74    /**
75     * Gets the value of the any property.
76     *
77     * @return
78     *     possible object is
79     *     {@link Element }
80     *     
81     */
82    public Element getAny() {
83        return any;
84    }
85
86    /**
87     * Sets the value of the any property.
88     *
89     * @param value
90     *     allowed object is
91     *     {@link Element }
92     *     
93     */
94    public void setAny(Element value) {
95        this.any = value;
96    }
97
98    /**
99     * Gets the value of the originalXmlEncoding property.
100     *
101     * @return
102     *     possible object is
103     *     {@link String }
104     *     
105     */
106    public String getOriginalXmlEncoding() {
107        if (originalXmlEncoding == null) {
108            return "UTF-8";
109        } else {
110            return originalXmlEncoding;
111        }
112    }
113
114    /**
115     * Sets the value of the originalXmlEncoding property.
116     *
117     * @param value
118     *     allowed object is
119     *     {@link String }
120     *     
121     */
122    public void setOriginalXmlEncoding(String value) {
123        this.originalXmlEncoding = value;
124    }
125
126    /**
127     * Gets the value of the originalXmlVersion property.
128     *
129     * @return
130     *     possible object is
131     *     {@link String }
132     *     
133     */
134    public String getOriginalXmlVersion() {
135        if (originalXmlVersion == null) {
136            return "1.0";
137        } else {
138            return originalXmlVersion;
139        }
140    }
141
142    /**
143     * Sets the value of the originalXmlVersion property.
144     *
145     * @param value
146     *     allowed object is
147     *     {@link String }
148     *     
149     */
150    public void setOriginalXmlVersion(String value) {
151        this.originalXmlVersion = value;
152    }
153
154    /**
155     * Gets the value of the originalXmlStandalone property.
156     *
157     * @return
158     *     possible object is
159     *     {@link String }
160     *     
161     */
162    public String getOriginalXmlStandalone() {
163        if (originalXmlStandalone == null) {
164            return "yes";
165        } else {
166            return originalXmlStandalone;
167        }
168    }
169
170    /**
171     * Sets the value of the originalXmlStandalone property.
172     *
173     * @param value
174     *     allowed object is
175     *     {@link String }
176     *     
177     */
178    public void setOriginalXmlStandalone(String value) {
179        this.originalXmlStandalone = value;
180    }
181
182}
Note: See TracBrowser for help on using the repository browser.