| 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 | |
|---|
| 22 | package org.docx4j.wml; |
|---|
| 23 | |
|---|
| 24 | import javax.xml.bind.Unmarshaller; |
|---|
| 25 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 26 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 27 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 28 | import javax.xml.bind.annotation.XmlElement; |
|---|
| 29 | import javax.xml.bind.annotation.XmlTransient; |
|---|
| 30 | import javax.xml.bind.annotation.XmlType; |
|---|
| 31 | import org.jvnet.jaxb2_commons.ppp.Child; |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | /** |
|---|
| 35 | * <p>Java class for CT_DocPartCategory complex type. |
|---|
| 36 | * |
|---|
| 37 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 38 | * |
|---|
| 39 | * <pre> |
|---|
| 40 | * <complexType name="CT_DocPartCategory"> |
|---|
| 41 | * <complexContent> |
|---|
| 42 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 43 | * <sequence> |
|---|
| 44 | * <element name="name"> |
|---|
| 45 | * <complexType> |
|---|
| 46 | * <complexContent> |
|---|
| 47 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 48 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 49 | * </restriction> |
|---|
| 50 | * </complexContent> |
|---|
| 51 | * </complexType> |
|---|
| 52 | * </element> |
|---|
| 53 | * <element name="gallery" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_DocPartGallery"/> |
|---|
| 54 | * </sequence> |
|---|
| 55 | * </restriction> |
|---|
| 56 | * </complexContent> |
|---|
| 57 | * </complexType> |
|---|
| 58 | * </pre> |
|---|
| 59 | * |
|---|
| 60 | * |
|---|
| 61 | */ |
|---|
| 62 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 63 | @XmlType(name = "CT_DocPartCategory", propOrder = { |
|---|
| 64 | "name", |
|---|
| 65 | "gallery" |
|---|
| 66 | }) |
|---|
| 67 | public class CTDocPartCategory implements Child |
|---|
| 68 | { |
|---|
| 69 | |
|---|
| 70 | @XmlElement(required = true) |
|---|
| 71 | protected CTDocPartCategory.Name name; |
|---|
| 72 | @XmlElement(required = true) |
|---|
| 73 | protected CTDocPartGallery gallery; |
|---|
| 74 | @XmlTransient |
|---|
| 75 | private Object parent; |
|---|
| 76 | |
|---|
| 77 | /** |
|---|
| 78 | * Gets the value of the name property. |
|---|
| 79 | * |
|---|
| 80 | * @return |
|---|
| 81 | * possible object is |
|---|
| 82 | * {@link CTDocPartCategory.Name } |
|---|
| 83 | * |
|---|
| 84 | */ |
|---|
| 85 | public CTDocPartCategory.Name getName() { |
|---|
| 86 | return name; |
|---|
| 87 | } |
|---|
| 88 | |
|---|
| 89 | /** |
|---|
| 90 | * Sets the value of the name property. |
|---|
| 91 | * |
|---|
| 92 | * @param value |
|---|
| 93 | * allowed object is |
|---|
| 94 | * {@link CTDocPartCategory.Name } |
|---|
| 95 | * |
|---|
| 96 | */ |
|---|
| 97 | public void setName(CTDocPartCategory.Name value) { |
|---|
| 98 | this.name = value; |
|---|
| 99 | } |
|---|
| 100 | |
|---|
| 101 | /** |
|---|
| 102 | * Gets the value of the gallery property. |
|---|
| 103 | * |
|---|
| 104 | * @return |
|---|
| 105 | * possible object is |
|---|
| 106 | * {@link CTDocPartGallery } |
|---|
| 107 | * |
|---|
| 108 | */ |
|---|
| 109 | public CTDocPartGallery getGallery() { |
|---|
| 110 | return gallery; |
|---|
| 111 | } |
|---|
| 112 | |
|---|
| 113 | /** |
|---|
| 114 | * Sets the value of the gallery property. |
|---|
| 115 | * |
|---|
| 116 | * @param value |
|---|
| 117 | * allowed object is |
|---|
| 118 | * {@link CTDocPartGallery } |
|---|
| 119 | * |
|---|
| 120 | */ |
|---|
| 121 | public void setGallery(CTDocPartGallery value) { |
|---|
| 122 | this.gallery = value; |
|---|
| 123 | } |
|---|
| 124 | |
|---|
| 125 | /** |
|---|
| 126 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 127 | * |
|---|
| 128 | * @return |
|---|
| 129 | * The parent object. |
|---|
| 130 | */ |
|---|
| 131 | public Object getParent() { |
|---|
| 132 | return this.parent; |
|---|
| 133 | } |
|---|
| 134 | |
|---|
| 135 | public void setParent(Object parent) { |
|---|
| 136 | this.parent = parent; |
|---|
| 137 | } |
|---|
| 138 | |
|---|
| 139 | /** |
|---|
| 140 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 141 | * |
|---|
| 142 | * @param parent |
|---|
| 143 | * The parent object in the object tree. |
|---|
| 144 | * @param unmarshaller |
|---|
| 145 | * The unmarshaller that generated the instance. |
|---|
| 146 | */ |
|---|
| 147 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 148 | setParent(parent); |
|---|
| 149 | } |
|---|
| 150 | |
|---|
| 151 | |
|---|
| 152 | /** |
|---|
| 153 | * <p>Java class for anonymous complex type. |
|---|
| 154 | * |
|---|
| 155 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 156 | * |
|---|
| 157 | * <pre> |
|---|
| 158 | * <complexType> |
|---|
| 159 | * <complexContent> |
|---|
| 160 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 161 | * <attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 162 | * </restriction> |
|---|
| 163 | * </complexContent> |
|---|
| 164 | * </complexType> |
|---|
| 165 | * </pre> |
|---|
| 166 | * |
|---|
| 167 | * |
|---|
| 168 | */ |
|---|
| 169 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 170 | @XmlType(name = "") |
|---|
| 171 | public static class Name |
|---|
| 172 | implements Child |
|---|
| 173 | { |
|---|
| 174 | |
|---|
| 175 | @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main") |
|---|
| 176 | protected String val; |
|---|
| 177 | @XmlTransient |
|---|
| 178 | private Object parent; |
|---|
| 179 | |
|---|
| 180 | /** |
|---|
| 181 | * Gets the value of the val property. |
|---|
| 182 | * |
|---|
| 183 | * @return |
|---|
| 184 | * possible object is |
|---|
| 185 | * {@link String } |
|---|
| 186 | * |
|---|
| 187 | */ |
|---|
| 188 | public String getVal() { |
|---|
| 189 | return val; |
|---|
| 190 | } |
|---|
| 191 | |
|---|
| 192 | /** |
|---|
| 193 | * Sets the value of the val property. |
|---|
| 194 | * |
|---|
| 195 | * @param value |
|---|
| 196 | * allowed object is |
|---|
| 197 | * {@link String } |
|---|
| 198 | * |
|---|
| 199 | */ |
|---|
| 200 | public void setVal(String value) { |
|---|
| 201 | this.val = value; |
|---|
| 202 | } |
|---|
| 203 | |
|---|
| 204 | /** |
|---|
| 205 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 206 | * |
|---|
| 207 | * @return |
|---|
| 208 | * The parent object. |
|---|
| 209 | */ |
|---|
| 210 | public Object getParent() { |
|---|
| 211 | return this.parent; |
|---|
| 212 | } |
|---|
| 213 | |
|---|
| 214 | public void setParent(Object parent) { |
|---|
| 215 | this.parent = parent; |
|---|
| 216 | } |
|---|
| 217 | |
|---|
| 218 | /** |
|---|
| 219 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 220 | * |
|---|
| 221 | * @param parent |
|---|
| 222 | * The parent object in the object tree. |
|---|
| 223 | * @param unmarshaller |
|---|
| 224 | * The unmarshaller that generated the instance. |
|---|
| 225 | */ |
|---|
| 226 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 227 | setParent(parent); |
|---|
| 228 | } |
|---|
| 229 | |
|---|
| 230 | } |
|---|
| 231 | |
|---|
| 232 | } |
|---|