| 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 java.util.ArrayList; |
|---|
| 25 | import java.util.List; |
|---|
| 26 | import javax.xml.bind.Unmarshaller; |
|---|
| 27 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 28 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 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_DocRsids complex type. |
|---|
| 36 | * |
|---|
| 37 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 38 | * |
|---|
| 39 | * <pre> |
|---|
| 40 | * <complexType name="CT_DocRsids"> |
|---|
| 41 | * <complexContent> |
|---|
| 42 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 43 | * <sequence> |
|---|
| 44 | * <element name="rsidRoot" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_LongHexNumber" minOccurs="0"/> |
|---|
| 45 | * <element name="rsid" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_LongHexNumber" maxOccurs="unbounded" minOccurs="0"/> |
|---|
| 46 | * </sequence> |
|---|
| 47 | * </restriction> |
|---|
| 48 | * </complexContent> |
|---|
| 49 | * </complexType> |
|---|
| 50 | * </pre> |
|---|
| 51 | * |
|---|
| 52 | * |
|---|
| 53 | */ |
|---|
| 54 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 55 | @XmlType(name = "CT_DocRsids", propOrder = { |
|---|
| 56 | "rsidRoot", |
|---|
| 57 | "rsid" |
|---|
| 58 | }) |
|---|
| 59 | public class CTDocRsids |
|---|
| 60 | implements Child |
|---|
| 61 | { |
|---|
| 62 | |
|---|
| 63 | protected CTLongHexNumber rsidRoot; |
|---|
| 64 | protected List<CTLongHexNumber> rsid; |
|---|
| 65 | @XmlTransient |
|---|
| 66 | private Object parent; |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Gets the value of the rsidRoot property. |
|---|
| 70 | * |
|---|
| 71 | * @return |
|---|
| 72 | * possible object is |
|---|
| 73 | * {@link CTLongHexNumber } |
|---|
| 74 | * |
|---|
| 75 | */ |
|---|
| 76 | public CTLongHexNumber getRsidRoot() { |
|---|
| 77 | return rsidRoot; |
|---|
| 78 | } |
|---|
| 79 | |
|---|
| 80 | /** |
|---|
| 81 | * Sets the value of the rsidRoot property. |
|---|
| 82 | * |
|---|
| 83 | * @param value |
|---|
| 84 | * allowed object is |
|---|
| 85 | * {@link CTLongHexNumber } |
|---|
| 86 | * |
|---|
| 87 | */ |
|---|
| 88 | public void setRsidRoot(CTLongHexNumber value) { |
|---|
| 89 | this.rsidRoot = value; |
|---|
| 90 | } |
|---|
| 91 | |
|---|
| 92 | /** |
|---|
| 93 | * Gets the value of the rsid property. |
|---|
| 94 | * |
|---|
| 95 | * <p> |
|---|
| 96 | * This accessor method returns a reference to the live list, |
|---|
| 97 | * not a snapshot. Therefore any modification you make to the |
|---|
| 98 | * returned list will be present inside the JAXB object. |
|---|
| 99 | * This is why there is not a <CODE>set</CODE> method for the rsid property. |
|---|
| 100 | * |
|---|
| 101 | * <p> |
|---|
| 102 | * For example, to add a new item, do as follows: |
|---|
| 103 | * <pre> |
|---|
| 104 | * getRsid().add(newItem); |
|---|
| 105 | * </pre> |
|---|
| 106 | * |
|---|
| 107 | * |
|---|
| 108 | * <p> |
|---|
| 109 | * Objects of the following type(s) are allowed in the list |
|---|
| 110 | * {@link CTLongHexNumber } |
|---|
| 111 | * |
|---|
| 112 | * |
|---|
| 113 | */ |
|---|
| 114 | public List<CTLongHexNumber> getRsid() { |
|---|
| 115 | if (rsid == null) { |
|---|
| 116 | rsid = new ArrayList<CTLongHexNumber>(); |
|---|
| 117 | } |
|---|
| 118 | return this.rsid; |
|---|
| 119 | } |
|---|
| 120 | |
|---|
| 121 | /** |
|---|
| 122 | * Gets the parent object in the object tree representing the unmarshalled xml document. |
|---|
| 123 | * |
|---|
| 124 | * @return |
|---|
| 125 | * The parent object. |
|---|
| 126 | */ |
|---|
| 127 | public Object getParent() { |
|---|
| 128 | return this.parent; |
|---|
| 129 | } |
|---|
| 130 | |
|---|
| 131 | public void setParent(Object parent) { |
|---|
| 132 | this.parent = parent; |
|---|
| 133 | } |
|---|
| 134 | |
|---|
| 135 | /** |
|---|
| 136 | * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. |
|---|
| 137 | * |
|---|
| 138 | * @param parent |
|---|
| 139 | * The parent object in the object tree. |
|---|
| 140 | * @param unmarshaller |
|---|
| 141 | * The unmarshaller that generated the instance. |
|---|
| 142 | */ |
|---|
| 143 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { |
|---|
| 144 | setParent(parent); |
|---|
| 145 | } |
|---|
| 146 | |
|---|
| 147 | } |
|---|