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

Revision 359, 3.4 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 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.XmlElement;
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_Recipients 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_Recipients">
42 *   &lt;complexContent>
43 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44 *       &lt;sequence>
45 *         &lt;element name="recipientData" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_RecipientData" maxOccurs="unbounded"/>
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_Recipients", propOrder = {
56    "recipientData"
57})
58public class CTRecipients
59    implements Child
60{
61
62    @XmlElement(required = true)
63    protected List<CTRecipientData> recipientData;
64    @XmlTransient
65    private Object parent;
66
67    /**
68     * Gets the value of the recipientData 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 recipientData property.
75     *
76     * <p>
77     * For example, to add a new item, do as follows:
78     * <pre>
79     *    getRecipientData().add(newItem);
80     * </pre>
81     *
82     *
83     * <p>
84     * Objects of the following type(s) are allowed in the list
85     * {@link CTRecipientData }
86     *
87     *
88     */
89    public List<CTRecipientData> getRecipientData() {
90        if (recipientData == null) {
91            recipientData = new ArrayList<CTRecipientData>();
92        }
93        return this.recipientData;
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.