source: trunk/docx4j/src/main/java/org/docx4j/wml/SdtPr.java @ 1465

Revision 1465, 26.2 KB checked in by jharrop, 14 months ago (diff)

Applied Richard's patch of 2 March, fixing the XmlRoot? Tags for every subclass in SdtPr?.

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.wml;
23
24import java.util.ArrayList;
25import java.util.List;
26import javax.xml.bind.JAXBElement;
27import javax.xml.bind.Unmarshaller;
28import javax.xml.bind.annotation.XmlAccessType;
29import javax.xml.bind.annotation.XmlAccessorType;
30import javax.xml.bind.annotation.XmlAttribute;
31import javax.xml.bind.annotation.XmlElementRef;
32import javax.xml.bind.annotation.XmlElementRefs;
33import javax.xml.bind.annotation.XmlRootElement;
34import javax.xml.bind.annotation.XmlTransient;
35import javax.xml.bind.annotation.XmlType;
36import org.jvnet.jaxb2_commons.ppp.Child;
37
38import org.apache.log4j.Logger;
39import org.docx4j.XmlUtils;
40
41/**
42 * <p>Java class for CT_SdtPr complex type.
43 *
44 * <p>The following schema fragment specifies the expected content contained within this class.
45 *
46 * <pre>
47 * &lt;complexType name="CT_SdtPr">
48 *   &lt;complexContent>
49 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
50 *       &lt;choice maxOccurs="unbounded">
51 *         &lt;element name="rPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_RPr" minOccurs="0"/>
52 *         &lt;element name="alias" minOccurs="0">
53 *           &lt;complexType>
54 *             &lt;complexContent>
55 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
56 *                 &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
57 *               &lt;/restriction>
58 *             &lt;/complexContent>
59 *           &lt;/complexType>
60 *         &lt;/element>
61 *         &lt;element name="lock" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Lock" minOccurs="0"/>
62 *         &lt;element name="placeholder" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Placeholder" minOccurs="0"/>
63 *         &lt;element name="showingPlcHdr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/>
64 *         &lt;element name="dataBinding" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_DataBinding" minOccurs="0"/>
65 *         &lt;element name="temporary" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}BooleanDefaultTrue" minOccurs="0"/>
66 *         &lt;element ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}id" minOccurs="0"/>
67 *         &lt;element ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}tag" minOccurs="0"/>
68 *         &lt;choice minOccurs="0">
69 *           &lt;element name="equation">
70 *             &lt;complexType>
71 *               &lt;complexContent>
72 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
73 *                 &lt;/restriction>
74 *               &lt;/complexContent>
75 *             &lt;/complexType>
76 *           &lt;/element>
77 *           &lt;element name="comboBox" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtComboBox"/>
78 *           &lt;element name="date" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtDate"/>
79 *           &lt;element name="docPartObj" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtDocPart"/>
80 *           &lt;element name="docPartList" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtDocPart"/>
81 *           &lt;element name="dropDownList" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtDropDownList"/>
82 *           &lt;element name="picture">
83 *             &lt;complexType>
84 *               &lt;complexContent>
85 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
86 *                 &lt;/restriction>
87 *               &lt;/complexContent>
88 *             &lt;/complexType>
89 *           &lt;/element>
90 *           &lt;element name="richText">
91 *             &lt;complexType>
92 *               &lt;complexContent>
93 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
94 *                 &lt;/restriction>
95 *               &lt;/complexContent>
96 *             &lt;/complexType>
97 *           &lt;/element>
98 *           &lt;element name="text" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtText"/>
99 *           &lt;element name="citation">
100 *             &lt;complexType>
101 *               &lt;complexContent>
102 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
103 *                 &lt;/restriction>
104 *               &lt;/complexContent>
105 *             &lt;/complexType>
106 *           &lt;/element>
107 *           &lt;element name="group">
108 *             &lt;complexType>
109 *               &lt;complexContent>
110 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
111 *                 &lt;/restriction>
112 *               &lt;/complexContent>
113 *             &lt;/complexType>
114 *           &lt;/element>
115 *           &lt;element name="bibliography">
116 *             &lt;complexType>
117 *               &lt;complexContent>
118 *                 &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
119 *                 &lt;/restriction>
120 *               &lt;/complexContent>
121 *             &lt;/complexType>
122 *           &lt;/element>
123 *         &lt;/choice>
124 *       &lt;/choice>
125 *     &lt;/restriction>
126 *   &lt;/complexContent>
127 * &lt;/complexType>
128 * </pre>
129 *
130 *
131 */
132@XmlAccessorType(XmlAccessType.FIELD)
133@XmlType(name = "CT_SdtPr", propOrder = {
134    "rPrOrAliasOrLock"
135})
136@XmlRootElement(name = "sdtPr")
137public class SdtPr
138    implements Child
139{
140        private static Logger log = Logger.getLogger(SdtPr.class);
141
142    @XmlElementRefs({
143        @XmlElementRef(name = "date", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
144        @XmlElementRef(name = "dataBinding", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
145        @XmlElementRef(name = "comboBox", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
146        @XmlElementRef(name = "docPartList", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
147        @XmlElementRef(name = "rPr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
148        @XmlElementRef(name = "richText", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
149        @XmlElementRef(name = "lock", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
150        @XmlElementRef(name = "showingPlcHdr", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
151        @XmlElementRef(name = "group", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
152        @XmlElementRef(name = "id", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = Id.class),
153        @XmlElementRef(name = "citation", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
154        @XmlElementRef(name = "text", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
155        @XmlElementRef(name = "placeholder", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
156        @XmlElementRef(name = "picture", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
157        @XmlElementRef(name = "temporary", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
158        @XmlElementRef(name = "alias", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
159        @XmlElementRef(name = "equation", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
160        @XmlElementRef(name = "docPartObj", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
161        @XmlElementRef(name = "tag", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = Tag.class),
162        @XmlElementRef(name = "dropDownList", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class),
163        @XmlElementRef(name = "bibliography", namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", type = JAXBElement.class)
164    })
165    protected List<Object> rPrOrAliasOrLock;
166    @XmlTransient
167    private Object parent;
168
169    /**
170     * Gets the value of the rPrOrAliasOrLock property.
171     *
172     * <p>
173     * This accessor method returns a reference to the live list,
174     * not a snapshot. Therefore any modification you make to the
175     * returned list will be present inside the JAXB object.
176     * This is why there is not a <CODE>set</CODE> method for the rPrOrAliasOrLock property.
177     *
178     * <p>
179     * For example, to add a new item, do as follows:
180     * <pre>
181     *    getRPrOrAliasOrLock().add(newItem);
182     * </pre>
183     *
184     *
185     * <p>
186     * Objects of the following type(s) are allowed in the list
187     * {@link JAXBElement }{@code <}{@link CTSdtDate }{@code >}
188     * {@link JAXBElement }{@code <}{@link CTSdtComboBox }{@code >}
189     * {@link JAXBElement }{@code <}{@link CTDataBinding }{@code >}
190     * {@link JAXBElement }{@code <}{@link CTSdtDocPart }{@code >}
191     * {@link JAXBElement }{@code <}{@link SdtPr.RichText }{@code >}
192     * {@link JAXBElement }{@code <}{@link RPr }{@code >}
193     * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >}
194     * {@link JAXBElement }{@code <}{@link CTLock }{@code >}
195     * {@link JAXBElement }{@code <}{@link SdtPr.Group }{@code >}
196     * {@link Id }
197     * {@link JAXBElement }{@code <}{@link SdtPr.Citation }{@code >}
198     * {@link JAXBElement }{@code <}{@link SdtPr.Picture }{@code >}
199     * {@link JAXBElement }{@code <}{@link CTPlaceholder }{@code >}
200     * {@link JAXBElement }{@code <}{@link CTSdtText }{@code >}
201     * {@link JAXBElement }{@code <}{@link BooleanDefaultTrue }{@code >}
202     * {@link JAXBElement }{@code <}{@link SdtPr.Alias }{@code >}
203     * {@link JAXBElement }{@code <}{@link CTSdtDocPart }{@code >}
204     * {@link JAXBElement }{@code <}{@link SdtPr.Equation }{@code >}
205     * {@link JAXBElement }{@code <}{@link CTSdtDropDownList }{@code >}
206     * {@link Tag }
207     * {@link JAXBElement }{@code <}{@link SdtPr.Bibliography }{@code >}
208     *
209     *
210     */
211    public List<Object> getRPrOrAliasOrLock() {
212        if (rPrOrAliasOrLock == null) {
213            rPrOrAliasOrLock = new ArrayList<Object>();
214        }
215        return this.rPrOrAliasOrLock;
216    }
217   
218    /**
219     * Gets the value of the id property.
220     *
221     * @return
222     *     possible object is
223     *     {@link Id }
224     *     
225     */
226    public Id getId() {
227       
228        for (Object o : getRPrOrAliasOrLock()) {
229                if ( o instanceof Id ) {
230                        log.debug("found id");
231                        return (Id)o;
232                } 
233        }
234       
235        return null;
236    }
237
238    /**
239     * Sets the value of the id property.
240     *
241     * @param value
242     *     allowed object is
243     *     {@link Id }
244     *     
245     */
246    public void setId(Id value) {
247       
248        Id existingId = getId(); 
249       
250        if (existingId!=null) {
251                if (!existingId.equals(value)) {
252                        log.debug("Changing SDT ID from " + existingId + " to " + value);
253                        rPrOrAliasOrLock.remove(existingId);
254                        if (value!=null) {
255                                rPrOrAliasOrLock.add(value);
256                        }
257                }       
258                // else - they are the same, so do nothing
259        } else if (value!=null) {
260                //ObjectFactory factory = new ObjectFactory();
261                //JAXBElement idWrapper = factory.createSdtPrId(value);
262                rPrOrAliasOrLock.add(value);
263        }
264    }
265   
266    // Not generated!
267    public java.math.BigInteger setId() {
268
269        Id id = new Id();
270        java.math.BigInteger newIdVal = java.math.BigInteger.valueOf(Math.abs(new java.util.Random().nextInt()));
271        id.setVal( newIdVal );
272        setId(id);     
273                log.warn("Generated random id: " + newIdVal.toString() );
274                return newIdVal;
275    }
276
277    /**
278     * Gets the value of the tag property.
279     *
280     * @return
281     *     possible object is
282     *     {@link SdtPr.Tag }
283     *     
284     */
285    public Tag getTag() {
286       
287        for (Object o : getRPrOrAliasOrLock()) {
288                if ( o instanceof Tag ) {
289                        log.debug("found tag");
290                        return (Tag)o;
291                } 
292        }
293       
294        return null;
295    }
296
297    /**
298     * Sets the value of the tag property.
299     *
300     * @param value
301     *     allowed object is
302     *     {@link SdtPr.Tag }
303     *     
304     */
305    public void setTag(Tag value) {
306       
307        Tag existingTag = getTag(); 
308       
309        if (existingTag!=null) {
310                if (!existingTag.equals(value)) {
311                        log.debug("Changing SDT tag from " + existingTag + " to " + value);
312                        rPrOrAliasOrLock.remove(existingTag);
313                        if (value!=null) {
314                                rPrOrAliasOrLock.add(value);
315                        }
316                }
317                // else - they are the same, so do nothing
318        } else if (value!=null) {
319                //ObjectFactory factory = new ObjectFactory();
320                //JAXBElement idWrapper = factory.createSdtPrId(value);
321                rPrOrAliasOrLock.add(value);
322        }
323    }
324   
325    public CTDataBinding getDataBinding() {
326       
327        for (Object o : getRPrOrAliasOrLock()) {
328                o = XmlUtils.unwrap(o);
329                log.debug("inspecting " + o.getClass().getName() );
330                if ( o instanceof CTDataBinding ) {
331                        return (CTDataBinding)o;
332                } 
333        }
334        return null;
335    }
336   
337    public void setDataBinding(CTDataBinding value) {
338       
339        CTDataBinding existingBinding = getDataBinding(); 
340       
341        if (existingBinding!=null) {
342                if (!existingBinding.equals(value)) {
343                        log.debug("Changing DataBinding tag from " + existingBinding + " to " + value);
344                        rPrOrAliasOrLock.remove(existingBinding);
345                        if (value!=null) {
346                                rPrOrAliasOrLock.add(value);
347                        }
348                }
349                // else - they are the same, so do nothing
350        } else if (value!=null) {
351                //ObjectFactory factory = new ObjectFactory();
352                //JAXBElement idWrapper = factory.createSdtPrId(value);
353                rPrOrAliasOrLock.add(value);
354        }
355    }
356   
357
358    /**
359     * Gets the parent object in the object tree representing the unmarshalled xml document.
360     *
361     * @return
362     *     The parent object.
363     */
364    public Object getParent() {
365        return this.parent;
366    }
367
368    public void setParent(Object parent) {
369        this.parent = parent;
370    }
371
372    /**
373     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
374     *
375     * @param parent
376     *     The parent object in the object tree.
377     * @param unmarshaller
378     *     The unmarshaller that generated the instance.
379     */
380    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
381        setParent(parent);
382    }
383
384
385    /**
386     * <p>Java class for anonymous complex type.
387     *
388     * <p>The following schema fragment specifies the expected content contained within this class.
389     *
390     * <pre>
391     * &lt;complexType>
392     *   &lt;complexContent>
393     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
394     *       &lt;attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" />
395     *     &lt;/restriction>
396     *   &lt;/complexContent>
397     * &lt;/complexType>
398     * </pre>
399     *
400     *
401     */
402    @XmlAccessorType(XmlAccessType.FIELD)
403    @XmlType(name = "")
404    @XmlRootElement(name = "alias")
405    public static class Alias
406        implements Child
407    {
408
409        @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
410        protected String val;
411        @XmlTransient
412        private Object parent;
413
414        /**
415         * Gets the value of the val property.
416         *
417         * @return
418         *     possible object is
419         *     {@link String }
420         *     
421         */
422        public String getVal() {
423            return val;
424        }
425
426        /**
427         * Sets the value of the val property.
428         *
429         * @param value
430         *     allowed object is
431         *     {@link String }
432         *     
433         */
434        public void setVal(String value) {
435            this.val = value;
436        }
437
438        /**
439         * Gets the parent object in the object tree representing the unmarshalled xml document.
440         *
441         * @return
442         *     The parent object.
443         */
444        public Object getParent() {
445            return this.parent;
446        }
447
448        public void setParent(Object parent) {
449            this.parent = parent;
450        }
451
452        /**
453         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
454         *
455         * @param parent
456         *     The parent object in the object tree.
457         * @param unmarshaller
458         *     The unmarshaller that generated the instance.
459         */
460        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
461            setParent(parent);
462        }
463
464    }
465
466
467    /**
468     * <p>Java class for anonymous complex type.
469     *
470     * <p>The following schema fragment specifies the expected content contained within this class.
471     *
472     * <pre>
473     * &lt;complexType>
474     *   &lt;complexContent>
475     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
476     *     &lt;/restriction>
477     *   &lt;/complexContent>
478     * &lt;/complexType>
479     * </pre>
480     *
481     *
482     */
483    @XmlAccessorType(XmlAccessType.FIELD)
484    @XmlType(name = "")
485    @XmlRootElement(name = "bibliography")
486    public static class Bibliography
487        implements Child
488    {
489
490        @XmlTransient
491        private Object parent;
492
493        /**
494         * Gets the parent object in the object tree representing the unmarshalled xml document.
495         *
496         * @return
497         *     The parent object.
498         */
499        public Object getParent() {
500            return this.parent;
501        }
502
503        public void setParent(Object parent) {
504            this.parent = parent;
505        }
506
507        /**
508         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
509         *
510         * @param parent
511         *     The parent object in the object tree.
512         * @param unmarshaller
513         *     The unmarshaller that generated the instance.
514         */
515        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
516            setParent(parent);
517        }
518
519    }
520
521
522    /**
523     * <p>Java class for anonymous complex type.
524     *
525     * <p>The following schema fragment specifies the expected content contained within this class.
526     *
527     * <pre>
528     * &lt;complexType>
529     *   &lt;complexContent>
530     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
531     *     &lt;/restriction>
532     *   &lt;/complexContent>
533     * &lt;/complexType>
534     * </pre>
535     *
536     *
537     */
538    @XmlAccessorType(XmlAccessType.FIELD)
539    @XmlType(name = "")
540    @XmlRootElement(name = "citation")
541    public static class Citation
542        implements Child
543    {
544
545        @XmlTransient
546        private Object parent;
547
548        /**
549         * Gets the parent object in the object tree representing the unmarshalled xml document.
550         *
551         * @return
552         *     The parent object.
553         */
554        public Object getParent() {
555            return this.parent;
556        }
557
558        public void setParent(Object parent) {
559            this.parent = parent;
560        }
561
562        /**
563         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
564         *
565         * @param parent
566         *     The parent object in the object tree.
567         * @param unmarshaller
568         *     The unmarshaller that generated the instance.
569         */
570        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
571            setParent(parent);
572        }
573
574    }
575
576
577    /**
578     * <p>Java class for anonymous complex type.
579     *
580     * <p>The following schema fragment specifies the expected content contained within this class.
581     *
582     * <pre>
583     * &lt;complexType>
584     *   &lt;complexContent>
585     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
586     *     &lt;/restriction>
587     *   &lt;/complexContent>
588     * &lt;/complexType>
589     * </pre>
590     *
591     *
592     */
593    @XmlAccessorType(XmlAccessType.FIELD)
594    @XmlType(name = "")
595    @XmlRootElement(name = "equation")
596    public static class Equation
597        implements Child
598    {
599
600        @XmlTransient
601        private Object parent;
602
603        /**
604         * Gets the parent object in the object tree representing the unmarshalled xml document.
605         *
606         * @return
607         *     The parent object.
608         */
609        public Object getParent() {
610            return this.parent;
611        }
612
613        public void setParent(Object parent) {
614            this.parent = parent;
615        }
616
617        /**
618         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
619         *
620         * @param parent
621         *     The parent object in the object tree.
622         * @param unmarshaller
623         *     The unmarshaller that generated the instance.
624         */
625        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
626            setParent(parent);
627        }
628
629    }
630
631
632    /**
633     * <p>Java class for anonymous complex type.
634     *
635     * <p>The following schema fragment specifies the expected content contained within this class.
636     *
637     * <pre>
638     * &lt;complexType>
639     *   &lt;complexContent>
640     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
641     *     &lt;/restriction>
642     *   &lt;/complexContent>
643     * &lt;/complexType>
644     * </pre>
645     *
646     *
647     */
648    @XmlAccessorType(XmlAccessType.FIELD)
649    @XmlType(name = "")
650    @XmlRootElement(name = "group")
651    public static class Group
652        implements Child
653    {
654
655        @XmlTransient
656        private Object parent;
657
658        /**
659         * Gets the parent object in the object tree representing the unmarshalled xml document.
660         *
661         * @return
662         *     The parent object.
663         */
664        public Object getParent() {
665            return this.parent;
666        }
667
668        public void setParent(Object parent) {
669            this.parent = parent;
670        }
671
672        /**
673         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
674         *
675         * @param parent
676         *     The parent object in the object tree.
677         * @param unmarshaller
678         *     The unmarshaller that generated the instance.
679         */
680        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
681            setParent(parent);
682        }
683
684    }
685
686
687    /**
688     * <p>Java class for anonymous complex type.
689     *
690     * <p>The following schema fragment specifies the expected content contained within this class.
691     *
692     * <pre>
693     * &lt;complexType>
694     *   &lt;complexContent>
695     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
696     *     &lt;/restriction>
697     *   &lt;/complexContent>
698     * &lt;/complexType>
699     * </pre>
700     *
701     *
702     */
703    @XmlAccessorType(XmlAccessType.FIELD)
704    @XmlType(name = "")
705    @XmlRootElement(name = "picture")
706    public static class Picture
707        implements Child
708    {
709
710        @XmlTransient
711        private Object parent;
712
713        /**
714         * Gets the parent object in the object tree representing the unmarshalled xml document.
715         *
716         * @return
717         *     The parent object.
718         */
719        public Object getParent() {
720            return this.parent;
721        }
722
723        public void setParent(Object parent) {
724            this.parent = parent;
725        }
726
727        /**
728         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
729         *
730         * @param parent
731         *     The parent object in the object tree.
732         * @param unmarshaller
733         *     The unmarshaller that generated the instance.
734         */
735        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
736            setParent(parent);
737        }
738
739    }
740
741
742    /**
743     * <p>Java class for anonymous complex type.
744     *
745     * <p>The following schema fragment specifies the expected content contained within this class.
746     *
747     * <pre>
748     * &lt;complexType>
749     *   &lt;complexContent>
750     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
751     *     &lt;/restriction>
752     *   &lt;/complexContent>
753     * &lt;/complexType>
754     * </pre>
755     *
756     *
757     */
758    @XmlAccessorType(XmlAccessType.FIELD)
759    @XmlType(name = "")
760    @XmlRootElement(name = "richText")
761    public static class RichText
762        implements Child
763    {
764
765        @XmlTransient
766        private Object parent;
767
768        /**
769         * Gets the parent object in the object tree representing the unmarshalled xml document.
770         *
771         * @return
772         *     The parent object.
773         */
774        public Object getParent() {
775            return this.parent;
776        }
777
778        public void setParent(Object parent) {
779            this.parent = parent;
780        }
781
782        /**
783         * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
784         *
785         * @param parent
786         *     The parent object in the object tree.
787         * @param unmarshaller
788         *     The unmarshaller that generated the instance.
789         */
790        public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
791            setParent(parent);
792        }
793
794    }
795
796}
Note: See TracBrowser for help on using the repository browser.