source: trunk/docx4j/src/main/java/org/docx4j/wml/CTEndnotes.java @ 1204

Revision 1204, 3.3 KB checked in by jharrop, 21 months ago (diff)

@XmlRootElement? annotations

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 java.util.ArrayList;
25import java.util.List;
26import javax.xml.bind.Unmarshaller;
27import javax.xml.bind.annotation.XmlAccessType;
28import javax.xml.bind.annotation.XmlAccessorType;
29import javax.xml.bind.annotation.XmlRootElement;
30import javax.xml.bind.annotation.XmlTransient;
31import javax.xml.bind.annotation.XmlType;
32import org.jvnet.jaxb2_commons.ppp.Child;
33
34
35/**
36 * <p>Java class for CT_Endnotes complex type.
37 *
38 * <p>The following schema fragment specifies the expected content contained within this class.
39 *
40 * <pre>
41 * &lt;complexType name="CT_Endnotes">
42 *   &lt;complexContent>
43 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44 *       &lt;sequence maxOccurs="unbounded">
45 *         &lt;element name="endnote" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_FtnEdn" minOccurs="0"/>
46 *       &lt;/sequence>
47 *     &lt;/restriction>
48 *   &lt;/complexContent>
49 * &lt;/complexType>
50 * </pre>
51 *
52 *
53 */
54@XmlAccessorType(XmlAccessType.FIELD)
55@XmlType(name = "CT_Endnotes", propOrder = {
56    "endnote"
57})
58@XmlRootElement(name = "endnotes")
59public class CTEndnotes
60    implements Child
61{
62
63    protected List<CTFtnEdn> endnote;
64    @XmlTransient
65    private Object parent;
66
67    /**
68     * Gets the value of the endnote property.
69     *
70     * <p>
71     * This accessor method returns a reference to the live list,
72     * not a snapshot. Therefore any modification you make to the
73     * returned list will be present inside the JAXB object.
74     * This is why there is not a <CODE>set</CODE> method for the endnote property.
75     *
76     * <p>
77     * For example, to add a new item, do as follows:
78     * <pre>
79     *    getEndnote().add(newItem);
80     * </pre>
81     *
82     *
83     * <p>
84     * Objects of the following type(s) are allowed in the list
85     * {@link CTFtnEdn }
86     *
87     *
88     */
89    public List<CTFtnEdn> getEndnote() {
90        if (endnote == null) {
91            endnote = new ArrayList<CTFtnEdn>();
92        }
93        return this.endnote;
94    }
95
96    /**
97     * Gets the parent object in the object tree representing the unmarshalled xml document.
98     *
99     * @return
100     *     The parent object.
101     */
102    public Object getParent() {
103        return this.parent;
104    }
105
106    public void setParent(Object parent) {
107        this.parent = parent;
108    }
109
110    /**
111     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
112     *
113     * @param parent
114     *     The parent object in the object tree.
115     * @param unmarshaller
116     *     The unmarshaller that generated the instance.
117     */
118    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
119        setParent(parent);
120    }
121
122}
Note: See TracBrowser for help on using the repository browser.