source: trunk/docx4j/src/main/java/org/docx4j/wml/CTBookmark.java @ 855

Revision 855, 3.1 KB checked in by jharrop, 3 years ago (diff)

@XmlRootElement?

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 CT_Bookmark 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_Bookmark">
41 *   &lt;complexContent>
42 *     &lt;extension base="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_BookmarkRange">
43 *       &lt;attribute name="name" use="required" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_String" />
44 *     &lt;/extension>
45 *   &lt;/complexContent>
46 * &lt;/complexType>
47 * </pre>
48 *
49 *
50 */
51@XmlAccessorType(XmlAccessType.FIELD)
52@XmlType(name = "CT_Bookmark")
53@XmlRootElement(name = "bookmarkStart")
54public class CTBookmark
55    extends CTBookmarkRange
56    implements Child
57{
58
59    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", required = true)
60    protected String name;
61    @XmlTransient
62    private Object parent;
63
64    /**
65     * Gets the value of the name property.
66     *
67     * @return
68     *     possible object is
69     *     {@link String }
70     *     
71     */
72    public String getName() {
73        return name;
74    }
75
76    /**
77     * Sets the value of the name property.
78     *
79     * @param value
80     *     allowed object is
81     *     {@link String }
82     *     
83     */
84    public void setName(String value) {
85        this.name = value;
86    }
87
88    /**
89     * Gets the parent object in the object tree representing the unmarshalled xml document.
90     *
91     * @return
92     *     The parent object.
93     */
94    public Object getParent() {
95        return this.parent;
96    }
97
98    public void setParent(Object parent) {
99        this.parent = parent;
100    }
101
102    /**
103     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
104     *
105     * @param parent
106     *     The parent object in the object tree.
107     * @param unmarshaller
108     *     The unmarshaller that generated the instance.
109     */
110    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
111        setParent(parent);
112    }
113
114}
Note: See TracBrowser for help on using the repository browser.