From f0db31a6d04d2185cd51f78a17c4d46d71bf01f8 Mon Sep 17 00:00:00 2001 From: Jason Harrop Date: Fri, 16 Dec 2016 17:24:08 +1100 Subject: [PATCH] Parts for web extensions --- .../taskpanes_2010_11/CTOsfTaskpane.java | 242 ++++++++++++++ .../taskpanes_2010_11/CTOsfTaskpanes.java | 101 ++++++ .../taskpanes_2010_11/ObjectFactory.java | 61 ++++ .../taskpanes_2010_11/package-info.java | 2 + .../CTOsfWebExtension.java | 298 ++++++++++++++++++ .../CTOsfWebExtensionBinding.java | 181 +++++++++++ .../CTOsfWebExtensionBindingList.java | 99 ++++++ .../CTOsfWebExtensionProperty.java | 117 +++++++ .../CTOsfWebExtensionPropertyBag.java | 99 ++++++ .../CTOsfWebExtensionReference.java | 202 ++++++++++++ .../CTOsfWebExtensionReferenceList.java | 99 ++++++ .../CTWebExtensionPartRef.java | 90 ++++++ .../webextension_2010_11/ObjectFactory.java | 119 +++++++ .../webextension_2010_11/package-info.java | 2 + src/main/java/org/docx4j/jaxb/Context.java | 4 +- .../contenttype/ContentTypeManager.java | 8 + .../contenttype/ContentTypes.java | 7 + .../parts/relationships/Namespaces.java | 3 + .../parts/webextensions/TaskpanesPart.java | 57 ++++ .../parts/webextensions/WebExtensionPart.java | 57 ++++ xsd/webextensions/osfwebextension.xsd | 103 ++++++ xsd/webextensions/taskpanes_2010_11.xsd | 61 ++++ 22 files changed, 2011 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpane.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpanes.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/ObjectFactory.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/package-info.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtension.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBinding.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBindingList.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionProperty.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionPropertyBag.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReference.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReferenceList.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTWebExtensionPartRef.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/ObjectFactory.java create mode 100644 src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/package-info.java create mode 100644 src/main/java/org/docx4j/openpackaging/parts/webextensions/TaskpanesPart.java create mode 100644 src/main/java/org/docx4j/openpackaging/parts/webextensions/WebExtensionPart.java create mode 100644 xsd/webextensions/osfwebextension.xsd create mode 100644 xsd/webextensions/taskpanes_2010_11.xsd diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpane.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpane.java new file mode 100644 index 0000000000..bddc2bbad1 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpane.java @@ -0,0 +1,242 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + +import org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11.CTWebExtensionPartRef; +import org.docx4j.dml.CTOfficeArtExtensionList; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfTaskpane complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfTaskpane">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="webextensionref" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_WebExtensionPartRef"/>
+ *         <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="dockstate" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="visibility" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="width" use="required" type="{http://www.w3.org/2001/XMLSchema}double" />
+ *       <attribute name="row" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="locked" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfTaskpane", propOrder = { + "webextensionref", + "extLst" +}) +public class CTOsfTaskpane implements Child +{ + + @XmlElement(required = true) + protected CTWebExtensionPartRef webextensionref; + protected CTOfficeArtExtensionList extLst; + @XmlAttribute(name = "dockstate", required = true) + protected String dockstate; + @XmlAttribute(name = "visibility", required = true) + protected boolean visibility; + @XmlAttribute(name = "width", required = true) + protected double width; + @XmlAttribute(name = "row", required = true) + @XmlSchemaType(name = "unsignedInt") + protected long row; + @XmlAttribute(name = "locked") + protected Boolean locked; + @XmlTransient + private Object parent; + + /** + * Gets the value of the webextensionref property. + * + * @return + * possible object is + * {@link CTWebExtensionPartRef } + * + */ + public CTWebExtensionPartRef getWebextensionref() { + return webextensionref; + } + + /** + * Sets the value of the webextensionref property. + * + * @param value + * allowed object is + * {@link CTWebExtensionPartRef } + * + */ + public void setWebextensionref(CTWebExtensionPartRef value) { + this.webextensionref = value; + } + + /** + * Gets the value of the extLst property. + * + * @return + * possible object is + * {@link CTOfficeArtExtensionList } + * + */ + public CTOfficeArtExtensionList getExtLst() { + return extLst; + } + + /** + * Sets the value of the extLst property. + * + * @param value + * allowed object is + * {@link CTOfficeArtExtensionList } + * + */ + public void setExtLst(CTOfficeArtExtensionList value) { + this.extLst = value; + } + + /** + * Gets the value of the dockstate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDockstate() { + return dockstate; + } + + /** + * Sets the value of the dockstate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDockstate(String value) { + this.dockstate = value; + } + + /** + * Gets the value of the visibility property. + * + */ + public boolean isVisibility() { + return visibility; + } + + /** + * Sets the value of the visibility property. + * + */ + public void setVisibility(boolean value) { + this.visibility = value; + } + + /** + * Gets the value of the width property. + * + */ + public double getWidth() { + return width; + } + + /** + * Sets the value of the width property. + * + */ + public void setWidth(double value) { + this.width = value; + } + + /** + * Gets the value of the row property. + * + */ + public long getRow() { + return row; + } + + /** + * Sets the value of the row property. + * + */ + public void setRow(long value) { + this.row = value; + } + + /** + * Gets the value of the locked property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isLocked() { + if (locked == null) { + return false; + } else { + return locked; + } + } + + /** + * Sets the value of the locked property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setLocked(Boolean value) { + this.locked = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpanes.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpanes.java new file mode 100644 index 0000000000..5b1d288ee6 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/CTOsfTaskpanes.java @@ -0,0 +1,101 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfTaskpanes complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfTaskpanes">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="taskpane" type="{http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11}CT_OsfTaskpane" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfTaskpanes", propOrder = { + "taskpane" +}) +public class CTOsfTaskpanes implements Child +{ + + protected List taskpane; + @XmlTransient + private Object parent; + + /** + * Gets the value of the taskpane property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the taskpane property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTaskpane().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CTOsfTaskpane } + * + * + */ + public List getTaskpane() { + if (taskpane == null) { + taskpane = new ArrayList(); + } + return this.taskpane; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/ObjectFactory.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/ObjectFactory.java new file mode 100644 index 0000000000..666c07b7fc --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/ObjectFactory.java @@ -0,0 +1,61 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11 package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Taskpanes_QNAME = new QName("http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11", "taskpanes"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CTOsfTaskpanes } + * + */ + public CTOsfTaskpanes createCTOsfTaskpanes() { + return new CTOsfTaskpanes(); + } + + /** + * Create an instance of {@link CTOsfTaskpane } + * + */ + public CTOsfTaskpane createCTOsfTaskpane() { + return new CTOsfTaskpane(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CTOsfTaskpanes }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11", name = "taskpanes") + public JAXBElement createTaskpanes(CTOsfTaskpanes value) { + return new JAXBElement(_Taskpanes_QNAME, CTOsfTaskpanes.class, null, value); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/package-info.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/package-info.java new file mode 100644 index 0000000000..f0ac666fbd --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/taskpanes_2010_11/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11; diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtension.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtension.java new file mode 100644 index 0000000000..171ceade14 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtension.java @@ -0,0 +1,298 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + +import org.docx4j.dml.CTBlip; +import org.docx4j.dml.CTOfficeArtExtensionList; +import org.jvnet.jaxb2_commons.ppp.Child; + +/** + * @author jharrop + * @since 3.3.2 + */ + + +/** + *

Java class for CT_OsfWebExtension complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtension">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="reference" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionReference"/>
+ *         <element name="alternateReferences" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionReferenceList" minOccurs="0"/>
+ *         <element name="properties" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionPropertyBag"/>
+ *         <element name="bindings" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionBindingList"/>
+ *         <element name="snapshot" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Blip" minOccurs="0"/>
+ *         <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="frozen" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtension", propOrder = { + "reference", + "alternateReferences", + "properties", + "bindings", + "snapshot", + "extLst" +}) +public class CTOsfWebExtension implements Child +{ + + @XmlElement(required = true) + protected CTOsfWebExtensionReference reference; + protected CTOsfWebExtensionReferenceList alternateReferences; + @XmlElement(required = true) + protected CTOsfWebExtensionPropertyBag properties; + @XmlElement(required = true) + protected CTOsfWebExtensionBindingList bindings; + protected CTBlip snapshot; + protected CTOfficeArtExtensionList extLst; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "frozen") + protected Boolean frozen; + @XmlTransient + private Object parent; + + /** + * Gets the value of the reference property. + * + * @return + * possible object is + * {@link CTOsfWebExtensionReference } + * + */ + public CTOsfWebExtensionReference getReference() { + return reference; + } + + /** + * Sets the value of the reference property. + * + * @param value + * allowed object is + * {@link CTOsfWebExtensionReference } + * + */ + public void setReference(CTOsfWebExtensionReference value) { + this.reference = value; + } + + /** + * Gets the value of the alternateReferences property. + * + * @return + * possible object is + * {@link CTOsfWebExtensionReferenceList } + * + */ + public CTOsfWebExtensionReferenceList getAlternateReferences() { + return alternateReferences; + } + + /** + * Sets the value of the alternateReferences property. + * + * @param value + * allowed object is + * {@link CTOsfWebExtensionReferenceList } + * + */ + public void setAlternateReferences(CTOsfWebExtensionReferenceList value) { + this.alternateReferences = value; + } + + /** + * Gets the value of the properties property. + * + * @return + * possible object is + * {@link CTOsfWebExtensionPropertyBag } + * + */ + public CTOsfWebExtensionPropertyBag getProperties() { + return properties; + } + + /** + * Sets the value of the properties property. + * + * @param value + * allowed object is + * {@link CTOsfWebExtensionPropertyBag } + * + */ + public void setProperties(CTOsfWebExtensionPropertyBag value) { + this.properties = value; + } + + /** + * Gets the value of the bindings property. + * + * @return + * possible object is + * {@link CTOsfWebExtensionBindingList } + * + */ + public CTOsfWebExtensionBindingList getBindings() { + return bindings; + } + + /** + * Sets the value of the bindings property. + * + * @param value + * allowed object is + * {@link CTOsfWebExtensionBindingList } + * + */ + public void setBindings(CTOsfWebExtensionBindingList value) { + this.bindings = value; + } + + /** + * Gets the value of the snapshot property. + * + * @return + * possible object is + * {@link CTBlip } + * + */ + public CTBlip getSnapshot() { + return snapshot; + } + + /** + * Sets the value of the snapshot property. + * + * @param value + * allowed object is + * {@link CTBlip } + * + */ + public void setSnapshot(CTBlip value) { + this.snapshot = value; + } + + /** + * Gets the value of the extLst property. + * + * @return + * possible object is + * {@link CTOfficeArtExtensionList } + * + */ + public CTOfficeArtExtensionList getExtLst() { + return extLst; + } + + /** + * Sets the value of the extLst property. + * + * @param value + * allowed object is + * {@link CTOfficeArtExtensionList } + * + */ + public void setExtLst(CTOfficeArtExtensionList value) { + this.extLst = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the frozen property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isFrozen() { + if (frozen == null) { + return false; + } else { + return frozen; + } + } + + /** + * Sets the value of the frozen property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setFrozen(Boolean value) { + this.frozen = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBinding.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBinding.java new file mode 100644 index 0000000000..440cf1868c --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBinding.java @@ -0,0 +1,181 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; + +import org.docx4j.dml.CTOfficeArtExtensionList; +import org.jvnet.jaxb2_commons.ppp.Child; + +/** + * @author jharrop + * @since 3.3.2 + */ + + +/** + *

Java class for CT_OsfWebExtensionBinding complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionBinding">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="appref" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionBinding", propOrder = { + "extLst" +}) +public class CTOsfWebExtensionBinding implements Child +{ + + protected CTOfficeArtExtensionList extLst; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "type", required = true) + protected String type; + @XmlAttribute(name = "appref", required = true) + protected String appref; + @XmlTransient + private Object parent; + + /** + * Gets the value of the extLst property. + * + * @return + * possible object is + * {@link CTOfficeArtExtensionList } + * + */ + public CTOfficeArtExtensionList getExtLst() { + return extLst; + } + + /** + * Sets the value of the extLst property. + * + * @param value + * allowed object is + * {@link CTOfficeArtExtensionList } + * + */ + public void setExtLst(CTOfficeArtExtensionList value) { + this.extLst = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the appref property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAppref() { + return appref; + } + + /** + * Sets the value of the appref property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAppref(String value) { + this.appref = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBindingList.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBindingList.java new file mode 100644 index 0000000000..cc7d0fe889 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionBindingList.java @@ -0,0 +1,99 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfWebExtensionBindingList complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionBindingList">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="binding" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionBinding" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionBindingList", propOrder = { + "binding" +}) +public class CTOsfWebExtensionBindingList implements Child +{ + + protected List binding; + @XmlTransient + private Object parent; + + /** + * Gets the value of the binding property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the binding property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBinding().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CTOsfWebExtensionBinding } + * + * + */ + public List getBinding() { + if (binding == null) { + binding = new ArrayList(); + } + return this.binding; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionProperty.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionProperty.java new file mode 100644 index 0000000000..c688b46cf1 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionProperty.java @@ -0,0 +1,117 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfWebExtensionProperty complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionProperty">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionProperty") +public class CTOsfWebExtensionProperty implements Child +{ + + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "value", required = true) + protected String value; + @XmlTransient + private Object parent; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionPropertyBag.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionPropertyBag.java new file mode 100644 index 0000000000..0d1e5feb40 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionPropertyBag.java @@ -0,0 +1,99 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfWebExtensionPropertyBag complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionPropertyBag">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="property" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionProperty" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionPropertyBag", propOrder = { + "property" +}) +public class CTOsfWebExtensionPropertyBag implements Child +{ + + protected List property; + @XmlTransient + private Object parent; + + /** + * Gets the value of the property property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the property property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CTOsfWebExtensionProperty } + * + * + */ + public List getProperty() { + if (property == null) { + property = new ArrayList(); + } + return this.property; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReference.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReference.java new file mode 100644 index 0000000000..b135671081 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReference.java @@ -0,0 +1,202 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.docx4j.dml.CTOfficeArtExtensionList; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfWebExtensionReference complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionReference">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="store" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="storeType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionReference", propOrder = { + "extLst" +}) +public class CTOsfWebExtensionReference implements Child +{ + + protected CTOfficeArtExtensionList extLst; + @XmlAttribute(name = "id", required = true) + protected String id; + @XmlAttribute(name = "version", required = true) + protected String version; + @XmlAttribute(name = "store") + protected String store; + @XmlAttribute(name = "storeType") + protected String storeType; + @XmlTransient + private Object parent; + + /** + * Gets the value of the extLst property. + * + * @return + * possible object is + * {@link CTOfficeArtExtensionList } + * + */ + public CTOfficeArtExtensionList getExtLst() { + return extLst; + } + + /** + * Sets the value of the extLst property. + * + * @param value + * allowed object is + * {@link CTOfficeArtExtensionList } + * + */ + public void setExtLst(CTOfficeArtExtensionList value) { + this.extLst = value; + } + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the value of the version property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVersion(String value) { + this.version = value; + } + + /** + * Gets the value of the store property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStore() { + return store; + } + + /** + * Sets the value of the store property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStore(String value) { + this.store = value; + } + + /** + * Gets the value of the storeType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStoreType() { + return storeType; + } + + /** + * Sets the value of the storeType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStoreType(String value) { + this.storeType = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReferenceList.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReferenceList.java new file mode 100644 index 0000000000..aa616720c2 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTOsfWebExtensionReferenceList.java @@ -0,0 +1,99 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_OsfWebExtensionReferenceList complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_OsfWebExtensionReferenceList">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="reference" type="{http://schemas.microsoft.com/office/webextensions/webextension/2010/11}CT_OsfWebExtensionReference" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_OsfWebExtensionReferenceList", propOrder = { + "reference" +}) +public class CTOsfWebExtensionReferenceList implements Child +{ + + protected List reference; + @XmlTransient + private Object parent; + + /** + * Gets the value of the reference property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the reference property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getReference().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link CTOsfWebExtensionReference } + * + * + */ + public List getReference() { + if (reference == null) { + reference = new ArrayList(); + } + return this.reference; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTWebExtensionPartRef.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTWebExtensionPartRef.java new file mode 100644 index 0000000000..68f9a2c83b --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/CTWebExtensionPartRef.java @@ -0,0 +1,90 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.XmlType; +import org.jvnet.jaxb2_commons.ppp.Child; + + +/** + *

Java class for CT_WebExtensionPartRef complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="CT_WebExtensionPartRef">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute ref="{http://schemas.openxmlformats.org/officeDocument/2006/relationships}id use="required""/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CT_WebExtensionPartRef") +public class CTWebExtensionPartRef implements Child +{ + + @XmlAttribute(name = "id", namespace = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", required = true) + protected String id; + @XmlTransient + private Object parent; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setId(String value) { + this.id = value; + } + + /** + * Gets the parent object in the object tree representing the unmarshalled xml document. + * + * @return + * The parent object. + */ + public Object getParent() { + return this.parent; + } + + public void setParent(Object parent) { + this.parent = parent; + } + + /** + * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. + * + * @param parent + * The parent object in the object tree. + * @param unmarshaller + * The unmarshaller that generated the instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + setParent(parent); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/ObjectFactory.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/ObjectFactory.java new file mode 100644 index 0000000000..cd4901b1c1 --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/ObjectFactory.java @@ -0,0 +1,119 @@ + +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11 package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Webextension_QNAME = new QName("http://schemas.microsoft.com/office/webextensions/webextension/2010/11", "webextension"); + private final static QName _Webextensionref_QNAME = new QName("http://schemas.microsoft.com/office/webextensions/webextension/2010/11", "webextensionref"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CTOsfWebExtension } + * + */ + public CTOsfWebExtension createCTOsfWebExtension() { + return new CTOsfWebExtension(); + } + + /** + * Create an instance of {@link CTWebExtensionPartRef } + * + */ + public CTWebExtensionPartRef createCTWebExtensionPartRef() { + return new CTWebExtensionPartRef(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionProperty } + * + */ + public CTOsfWebExtensionProperty createCTOsfWebExtensionProperty() { + return new CTOsfWebExtensionProperty(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionPropertyBag } + * + */ + public CTOsfWebExtensionPropertyBag createCTOsfWebExtensionPropertyBag() { + return new CTOsfWebExtensionPropertyBag(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionBinding } + * + */ + public CTOsfWebExtensionBinding createCTOsfWebExtensionBinding() { + return new CTOsfWebExtensionBinding(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionBindingList } + * + */ + public CTOsfWebExtensionBindingList createCTOsfWebExtensionBindingList() { + return new CTOsfWebExtensionBindingList(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionReference } + * + */ + public CTOsfWebExtensionReference createCTOsfWebExtensionReference() { + return new CTOsfWebExtensionReference(); + } + + /** + * Create an instance of {@link CTOsfWebExtensionReferenceList } + * + */ + public CTOsfWebExtensionReferenceList createCTOsfWebExtensionReferenceList() { + return new CTOsfWebExtensionReferenceList(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CTOsfWebExtension }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://schemas.microsoft.com/office/webextensions/webextension/2010/11", name = "webextension") + public JAXBElement createWebextension(CTOsfWebExtension value) { + return new JAXBElement(_Webextension_QNAME, CTOsfWebExtension.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CTWebExtensionPartRef }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://schemas.microsoft.com/office/webextensions/webextension/2010/11", name = "webextensionref") + public JAXBElement createWebextensionref(CTWebExtensionPartRef value) { + return new JAXBElement(_Webextensionref_QNAME, CTWebExtensionPartRef.class, null, value); + } + +} diff --git a/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/package-info.java b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/package-info.java new file mode 100644 index 0000000000..b1888192ae --- /dev/null +++ b/src/main/java/org/docx4j/com/microsoft/schemas/office/webextensions/webextension_2010_11/package-info.java @@ -0,0 +1,2 @@ +@javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.microsoft.com/office/webextensions/webextension/2010/11", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11; diff --git a/src/main/java/org/docx4j/jaxb/Context.java b/src/main/java/org/docx4j/jaxb/Context.java index f4962b0731..3ba4ece745 100644 --- a/src/main/java/org/docx4j/jaxb/Context.java +++ b/src/main/java/org/docx4j/jaxb/Context.java @@ -154,7 +154,9 @@ public static JAXBImplementation getJaxbImplementation() { "org.opendope.xpaths:org.opendope.conditions:org.opendope.questions:org.opendope.answers:org.opendope.components:org.opendope.SmartArt.dataHierarchy:" + "org.docx4j.math:" + "org.docx4j.sharedtypes:org.docx4j.bibliography:" + - "org.docx4j.com.microsoft.schemas.office.word.x2010.wordprocessingDrawing", classLoader ); + "org.docx4j.com.microsoft.schemas.office.word.x2010.wordprocessingDrawing:" + + "org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11:" + + "org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11", classLoader ); if (tempContext.getClass().getName().equals("org.eclipse.persistence.jaxb.JAXBContext")) { log.info("MOXy JAXB implementation is in use!"); diff --git a/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypeManager.java b/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypeManager.java index acbb4cc0e5..89e5dc91fe 100644 --- a/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypeManager.java +++ b/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypeManager.java @@ -114,6 +114,8 @@ import org.docx4j.openpackaging.parts.WordprocessingML.VbaProjectSignatureBin; import org.docx4j.openpackaging.parts.WordprocessingML.WebSettingsPart; import org.docx4j.openpackaging.parts.relationships.Namespaces; +import org.docx4j.openpackaging.parts.webextensions.TaskpanesPart; +import org.docx4j.openpackaging.parts.webextensions.WebExtensionPart; import org.docx4j.relationships.Relationship; import org.glox4j.openpackaging.packages.GloxPackage; import org.slf4j.Logger; @@ -473,6 +475,12 @@ public Part newPartForContentType(String contentType, String partName, Relations return new BinaryPart( new PartName(partName)); } + } else if (contentType.equals(ContentTypes.WEB_EXTENSION_TASKPANES)) { + return new TaskpanesPart(new PartName(partName)); + + } else if (contentType.equals(ContentTypes.WEB_EXTENSION_WEBEXTENSION)) { + return new WebExtensionPart(new PartName(partName)); + } else if (contentType.equals(ContentTypes.APPLICATION_XML) || partName.endsWith(".xml")) { diff --git a/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypes.java b/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypes.java index ab8af21b43..43e2ae9aab 100644 --- a/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypes.java +++ b/src/main/java/org/docx4j/openpackaging/contenttype/ContentTypes.java @@ -116,6 +116,13 @@ public class ContentTypes { "application/vnd.ms-office.activeX+xml"; + /** + * @since 3.3.2 + */ + public final static String WEB_EXTENSION_TASKPANES = "application/vnd.ms-office.webextensiontaskpanes+xml"; + public final static String WEB_EXTENSION_WEBEXTENSION = "application/vnd.ms-office.webextension+xml"; + + // PartName="/word/document.xml" public final static String WORDPROCESSINGML_DOCUMENT = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"; public final static String WORDPROCESSINGML_DOCUMENT_MACROENABLED = "application/vnd.ms-word.document.macroEnabled.main+xml"; diff --git a/src/main/java/org/docx4j/openpackaging/parts/relationships/Namespaces.java b/src/main/java/org/docx4j/openpackaging/parts/relationships/Namespaces.java index e84b71fc76..4812d23e01 100644 --- a/src/main/java/org/docx4j/openpackaging/parts/relationships/Namespaces.java +++ b/src/main/java/org/docx4j/openpackaging/parts/relationships/Namespaces.java @@ -351,4 +351,7 @@ public class Namespaces { public final static String XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; + public final static String WEB_EXTENSION_TASKPANES = "http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11"; + public final static String WEB_EXTENSION_WEBEXTENSION = "http://schemas.microsoft.com/office/webextensions/webextension/2010/11"; + } diff --git a/src/main/java/org/docx4j/openpackaging/parts/webextensions/TaskpanesPart.java b/src/main/java/org/docx4j/openpackaging/parts/webextensions/TaskpanesPart.java new file mode 100644 index 0000000000..5a56012c9d --- /dev/null +++ b/src/main/java/org/docx4j/openpackaging/parts/webextensions/TaskpanesPart.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016, Plutext Pty Ltd. + * + * This file is part of docx4j. + + docx4j is licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +package org.docx4j.openpackaging.parts.webextensions; + +import org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11.CTOsfTaskpanes; +import org.docx4j.openpackaging.exceptions.InvalidFormatException; +import org.docx4j.openpackaging.parts.JaxbXmlPart; +import org.docx4j.openpackaging.parts.PartName; +import org.docx4j.openpackaging.parts.relationships.Namespaces; + + + +/** + * @author jharrop + * @since 3.3.2 + */ +public final class TaskpanesPart extends JaxbXmlPart { + + public TaskpanesPart(PartName partName) throws InvalidFormatException { + super(partName); + init(); + } + + public TaskpanesPart() throws InvalidFormatException { + super(new PartName("/word/taskpanes.xml")); + init(); + } + + public void init() { + // Used if this Part is added to [Content_Types].xml + setContentType(new org.docx4j.openpackaging.contenttype.ContentType( + org.docx4j.openpackaging.contenttype.ContentTypes.WEB_EXTENSION_TASKPANES)); + + // Used when this Part is added to a rels + setRelationshipType(Namespaces.WEB_EXTENSION_TASKPANES); + + } + +} diff --git a/src/main/java/org/docx4j/openpackaging/parts/webextensions/WebExtensionPart.java b/src/main/java/org/docx4j/openpackaging/parts/webextensions/WebExtensionPart.java new file mode 100644 index 0000000000..3a75ddae82 --- /dev/null +++ b/src/main/java/org/docx4j/openpackaging/parts/webextensions/WebExtensionPart.java @@ -0,0 +1,57 @@ +/* + * Copyright 2016, Plutext Pty Ltd. + * + * This file is part of docx4j. + + docx4j is licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + */ + +package org.docx4j.openpackaging.parts.webextensions; + +import org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11.CTOsfWebExtension; +import org.docx4j.openpackaging.exceptions.InvalidFormatException; +import org.docx4j.openpackaging.parts.JaxbXmlPart; +import org.docx4j.openpackaging.parts.PartName; +import org.docx4j.openpackaging.parts.relationships.Namespaces; + + + +/** + * @author jharrop + * @since 3.3.2 + */ +public final class WebExtensionPart extends JaxbXmlPart { + + public WebExtensionPart(PartName partName) throws InvalidFormatException { + super(partName); + init(); + } + + public WebExtensionPart() throws InvalidFormatException { + super(new PartName("/word/webextension1.xml")); + init(); + } + + public void init() { + // Used if this Part is added to [Content_Types].xml + setContentType(new org.docx4j.openpackaging.contenttype.ContentType( + org.docx4j.openpackaging.contenttype.ContentTypes.WEB_EXTENSION_WEBEXTENSION)); + + // Used when this Part is added to a rels + setRelationshipType(Namespaces.WEB_EXTENSION_WEBEXTENSION); + + } + +} diff --git a/xsd/webextensions/osfwebextension.xsd b/xsd/webextensions/osfwebextension.xsd new file mode 100644 index 0000000000..a4b61556ca --- /dev/null +++ b/xsd/webextensions/osfwebextension.xsd @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xsd/webextensions/taskpanes_2010_11.xsd b/xsd/webextensions/taskpanes_2010_11.xsd new file mode 100644 index 0000000000..1ce3654bf4 --- /dev/null +++ b/xsd/webextensions/taskpanes_2010_11.xsd @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file