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

Revision 359, 3.9 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.XmlRootElement;
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 anonymous complex type.
36 *
37 * <p>The following schema fragment specifies the expected content contained within this class.
38 *
39 * <pre>
40 * &lt;complexType>
41 *   &lt;complexContent>
42 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 *       &lt;attribute name="val" use="required">
44 *         &lt;simpleType>
45 *           &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
46 *             &lt;enumeration value="black"/>
47 *             &lt;enumeration value="blue"/>
48 *             &lt;enumeration value="cyan"/>
49 *             &lt;enumeration value="green"/>
50 *             &lt;enumeration value="magenta"/>
51 *             &lt;enumeration value="red"/>
52 *             &lt;enumeration value="yellow"/>
53 *             &lt;enumeration value="white"/>
54 *             &lt;enumeration value="darkBlue"/>
55 *             &lt;enumeration value="darkCyan"/>
56 *             &lt;enumeration value="darkGreen"/>
57 *             &lt;enumeration value="darkMagenta"/>
58 *             &lt;enumeration value="darkRed"/>
59 *             &lt;enumeration value="darkYellow"/>
60 *             &lt;enumeration value="darkGray"/>
61 *             &lt;enumeration value="lightGray"/>
62 *             &lt;enumeration value="none"/>
63 *           &lt;/restriction>
64 *         &lt;/simpleType>
65 *       &lt;/attribute>
66 *     &lt;/restriction>
67 *   &lt;/complexContent>
68 * &lt;/complexType>
69 * </pre>
70 *
71 *
72 */
73@XmlAccessorType(XmlAccessType.FIELD)
74@XmlType(name = "")
75@XmlRootElement(name = "highlight")
76public class Highlight implements Child
77{
78
79    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true)
80    protected String val;
81    @XmlTransient
82    private Object parent;
83
84    /**
85     * Gets the value of the val property.
86     *
87     * @return
88     *     possible object is
89     *     {@link String }
90     *     
91     */
92    public String getVal() {
93        return val;
94    }
95
96    /**
97     * Sets the value of the val property.
98     *
99     * @param value
100     *     allowed object is
101     *     {@link String }
102     *     
103     */
104    public void setVal(String value) {
105        this.val = value;
106    }
107
108    /**
109     * Gets the parent object in the object tree representing the unmarshalled xml document.
110     *
111     * @return
112     *     The parent object.
113     */
114    public Object getParent() {
115        return this.parent;
116    }
117
118    public void setParent(Object parent) {
119        this.parent = parent;
120    }
121
122    /**
123     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
124     *
125     * @param parent
126     *     The parent object in the object tree.
127     * @param unmarshaller
128     *     The unmarshaller that generated the instance.
129     */
130    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
131        setParent(parent);
132    }
133
134}
Note: See TracBrowser for help on using the repository browser.