source: trunk/docx4j/src/main/java/org/docx4j/xmlPackage/Package.java @ 511

Revision 511, 2.4 KB checked in by jharrop, 4 years ago (diff)

Add ability to create a WordML Package from a Word 2007 xmlPackage.
Moved xmlPackage content model

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
21package org.docx4j.xmlPackage;
22
23import java.util.ArrayList;
24import java.util.List;
25import javax.xml.bind.annotation.XmlAccessType;
26import javax.xml.bind.annotation.XmlAccessorType;
27import javax.xml.bind.annotation.XmlRootElement;
28import javax.xml.bind.annotation.XmlType;
29
30
31/**
32 * <p>Java class for CT_Package complex type.
33 *
34 * <p>The following schema fragment specifies the expected content contained within this class.
35 *
36 * <pre>
37 * &lt;complexType name="CT_Package">
38 *   &lt;complexContent>
39 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
40 *       &lt;sequence>
41 *         &lt;element name="part" type="{http://schemas.microsoft.com/office/2006/xmlPackage}CT_Part" maxOccurs="unbounded" minOccurs="0"/>
42 *       &lt;/sequence>
43 *     &lt;/restriction>
44 *   &lt;/complexContent>
45 * &lt;/complexType>
46 * </pre>
47 *
48 *
49 */
50@XmlAccessorType(XmlAccessType.FIELD)
51@XmlType(name = "CT_Package", propOrder = {
52    "part"
53})
54@XmlRootElement(name = "package")
55public class Package {
56
57    protected List<Part> part;
58
59    /**
60     * Gets the value of the part property.
61     *
62     * <p>
63     * This accessor method returns a reference to the live list,
64     * not a snapshot. Therefore any modification you make to the
65     * returned list will be present inside the JAXB object.
66     * This is why there is not a <CODE>set</CODE> method for the part property.
67     *
68     * <p>
69     * For example, to add a new item, do as follows:
70     * <pre>
71     *    getPart().add(newItem);
72     * </pre>
73     *
74     *
75     * <p>
76     * Objects of the following type(s) are allowed in the list
77     * {@link Part }
78     *
79     *
80     */
81    public List<Part> getPart() {
82        if (part == null) {
83            part = new ArrayList<Part>();
84        }
85        return this.part;
86    }
87
88}
Note: See TracBrowser for help on using the repository browser.