source: trunk/docx4j/src/main/java/org/docx4j/math/CTM.java @ 888

Revision 888, 3.8 KB checked in by jharrop, 3 years ago (diff)

Generate classes from shared-math.xsd

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.math;
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_M 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_M">
42 *   &lt;complexContent>
43 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44 *       &lt;sequence>
45 *         &lt;element name="mPr" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_MPr" minOccurs="0"/>
46 *         &lt;element name="mr" type="{http://schemas.openxmlformats.org/officeDocument/2006/math}CT_MR" maxOccurs="unbounded"/>
47 *       &lt;/sequence>
48 *     &lt;/restriction>
49 *   &lt;/complexContent>
50 * &lt;/complexType>
51 * </pre>
52 *
53 *
54 */
55@XmlAccessorType(XmlAccessType.FIELD)
56@XmlType(name = "CT_M", propOrder = {
57    "mPr",
58    "mr"
59})
60public class CTM
61    implements Child
62{
63
64    protected CTMPr mPr;
65    @XmlElement(required = true)
66    protected List<CTMR> mr;
67    @XmlTransient
68    private Object parent;
69
70    /**
71     * Gets the value of the mPr property.
72     *
73     * @return
74     *     possible object is
75     *     {@link CTMPr }
76     *     
77     */
78    public CTMPr getMPr() {
79        return mPr;
80    }
81
82    /**
83     * Sets the value of the mPr property.
84     *
85     * @param value
86     *     allowed object is
87     *     {@link CTMPr }
88     *     
89     */
90    public void setMPr(CTMPr value) {
91        this.mPr = value;
92    }
93
94    /**
95     * Gets the value of the mr property.
96     *
97     * <p>
98     * This accessor method returns a reference to the live list,
99     * not a snapshot. Therefore any modification you make to the
100     * returned list will be present inside the JAXB object.
101     * This is why there is not a <CODE>set</CODE> method for the mr property.
102     *
103     * <p>
104     * For example, to add a new item, do as follows:
105     * <pre>
106     *    getMr().add(newItem);
107     * </pre>
108     *
109     *
110     * <p>
111     * Objects of the following type(s) are allowed in the list
112     * {@link CTMR }
113     *
114     *
115     */
116    public List<CTMR> getMr() {
117        if (mr == null) {
118            mr = new ArrayList<CTMR>();
119        }
120        return this.mr;
121    }
122
123    /**
124     * Gets the parent object in the object tree representing the unmarshalled xml document.
125     *
126     * @return
127     *     The parent object.
128     */
129    public Object getParent() {
130        return this.parent;
131    }
132
133    public void setParent(Object parent) {
134        this.parent = parent;
135    }
136
137    /**
138     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
139     *
140     * @param parent
141     *     The parent object in the object tree.
142     * @param unmarshaller
143     *     The unmarshaller that generated the instance.
144     */
145    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
146        setParent(parent);
147    }
148
149}
Note: See TracBrowser for help on using the repository browser.