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

Revision 359, 3.7 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.XmlTransient;
29import javax.xml.bind.annotation.XmlType;
30import org.jvnet.jaxb2_commons.ppp.Child;
31
32
33/**
34 * <p>Java class for CT_DocPartName 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_DocPartName">
40 *   &lt;complexContent>
41 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
42 *       &lt;attribute name="val" use="required" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_String" />
43 *       &lt;attribute name="decorated" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
44 *     &lt;/restriction>
45 *   &lt;/complexContent>
46 * &lt;/complexType>
47 * </pre>
48 *
49 *
50 */
51@XmlAccessorType(XmlAccessType.FIELD)
52@XmlType(name = "CT_DocPartName")
53public class CTDocPartName implements Child
54{
55
56    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true)
57    protected String val;
58    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
59    protected Boolean decorated;
60    @XmlTransient
61    private Object parent;
62
63    /**
64     * Gets the value of the val property.
65     *
66     * @return
67     *     possible object is
68     *     {@link String }
69     *     
70     */
71    public String getVal() {
72        return val;
73    }
74
75    /**
76     * Sets the value of the val property.
77     *
78     * @param value
79     *     allowed object is
80     *     {@link String }
81     *     
82     */
83    public void setVal(String value) {
84        this.val = value;
85    }
86
87    /**
88     * Gets the value of the decorated property.
89     *
90     * @return
91     *     possible object is
92     *     {@link Boolean }
93     *     
94     */
95    public boolean isDecorated() {
96        if (decorated == null) {
97            return true;
98        } else {
99            return decorated;
100        }
101    }
102
103    /**
104     * Sets the value of the decorated property.
105     *
106     * @param value
107     *     allowed object is
108     *     {@link Boolean }
109     *     
110     */
111    public void setDecorated(Boolean value) {
112        this.decorated = value;
113    }
114
115    /**
116     * Gets the parent object in the object tree representing the unmarshalled xml document.
117     *
118     * @return
119     *     The parent object.
120     */
121    public Object getParent() {
122        return this.parent;
123    }
124
125    public void setParent(Object parent) {
126        this.parent = parent;
127    }
128
129    /**
130     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
131     *
132     * @param parent
133     *     The parent object in the object tree.
134     * @param unmarshaller
135     *     The unmarshaller that generated the instance.
136     */
137    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
138        setParent(parent);
139    }
140
141}
Note: See TracBrowser for help on using the repository browser.