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

Revision 511, 2.5 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 javax.xml.bind.JAXBElement;
24import javax.xml.bind.annotation.XmlElementDecl;
25import javax.xml.bind.annotation.XmlRegistry;
26import javax.xml.namespace.QName;
27
28
29/**
30 * This object contains factory methods for each
31 * Java content interface and Java element interface
32 * generated in the org.docx4j.xmlPackage package.
33 * <p>An ObjectFactory allows you to programatically
34 * construct new instances of the Java representation
35 * for XML content. The Java representation of XML
36 * content can consist of schema derived interfaces
37 * and classes representing the binding of schema
38 * type definitions, element declarations and model
39 * groups.  Factory methods for each of these are
40 * provided in this class.
41 *
42 */
43@XmlRegistry
44public class ObjectFactory {
45
46    private final static QName _Package_QNAME = new QName("http://schemas.microsoft.com/office/2006/xmlPackage", "package");
47
48    /**
49     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.docx4j.xmlPackage
50     *
51     */
52    public ObjectFactory() {
53    }
54
55    /**
56     * Create an instance of {@link XmlData }
57     *
58     */
59    public XmlData createXmlData() {
60        return new XmlData();
61    }
62
63    /**
64     * Create an instance of {@link Package }
65     *
66     */
67    public Package createPackage() {
68        return new Package();
69    }
70
71    /**
72     * Create an instance of {@link Part }
73     *
74     */
75    public Part createPart() {
76        return new Part();
77    }
78
79    /**
80     * Create an instance of {@link JAXBElement }{@code <}{@link Package }{@code >}}
81     *
82     */
83    @XmlElementDecl(namespace = "http://schemas.microsoft.com/office/2006/xmlPackage", name = "package")
84    public JAXBElement<Package> createPackage(Package value) {
85        return new JAXBElement<Package>(_Package_QNAME, Package.class, null, value);
86    }
87
88}
Note: See TracBrowser for help on using the repository browser.