source: trunk/docx4j/src/main/java/org/docx4j/wml/CTDocProtect.java @ 359

Revision 359, 12.1 KB checked in by jharrop, 4 years ago (diff)

Change CT_FldChar to FldChar?;
Style is freestanding, rather than an inner class of Styles.
(Other changes largely whitespace in license header)

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.math.BigInteger;
25import javax.xml.bind.Unmarshaller;
26import javax.xml.bind.annotation.XmlAccessType;
27import javax.xml.bind.annotation.XmlAccessorType;
28import javax.xml.bind.annotation.XmlAttribute;
29import javax.xml.bind.annotation.XmlTransient;
30import javax.xml.bind.annotation.XmlType;
31import org.jvnet.jaxb2_commons.ppp.Child;
32
33
34/**
35 * <p>Java class for CT_DocProtect complex type.
36 *
37 * <p>The following schema fragment specifies the expected content contained within this class.
38 *
39 * <pre>
40 * &lt;complexType name="CT_DocProtect">
41 *   &lt;complexContent>
42 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 *       &lt;attGroup ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}AG_Password"/>
44 *       &lt;attribute name="edit" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_DocProtect" />
45 *       &lt;attribute name="formatting" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
46 *       &lt;attribute name="enforcement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
47 *     &lt;/restriction>
48 *   &lt;/complexContent>
49 * &lt;/complexType>
50 * </pre>
51 *
52 *
53 */
54@XmlAccessorType(XmlAccessType.FIELD)
55@XmlType(name = "CT_DocProtect")
56public class CTDocProtect
57    implements Child
58{
59
60    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
61    protected STDocProtect edit;
62    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
63    protected Boolean formatting;
64    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
65    protected Boolean enforcement;
66    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
67    protected STCryptProv cryptProviderType;
68    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
69    protected STAlgClass cryptAlgorithmClass;
70    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
71    protected STAlgType cryptAlgorithmType;
72    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
73    protected BigInteger cryptAlgorithmSid;
74    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
75    protected BigInteger cryptSpinCount;
76    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
77    protected String cryptProvider;
78    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
79    protected String algIdExt;
80    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
81    protected String algIdExtSource;
82    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
83    protected String cryptProviderTypeExt;
84    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
85    protected String cryptProviderTypeExtSource;
86    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
87    protected byte[] hash;
88    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
89    protected byte[] salt;
90    @XmlTransient
91    private Object parent;
92
93    /**
94     * Gets the value of the edit property.
95     *
96     * @return
97     *     possible object is
98     *     {@link STDocProtect }
99     *     
100     */
101    public STDocProtect getEdit() {
102        return edit;
103    }
104
105    /**
106     * Sets the value of the edit property.
107     *
108     * @param value
109     *     allowed object is
110     *     {@link STDocProtect }
111     *     
112     */
113    public void setEdit(STDocProtect value) {
114        this.edit = value;
115    }
116
117    /**
118     * Gets the value of the formatting property.
119     *
120     * @return
121     *     possible object is
122     *     {@link Boolean }
123     *     
124     */
125    public boolean isFormatting() {
126        if (formatting == null) {
127            return true;
128        } else {
129            return formatting;
130        }
131    }
132
133    /**
134     * Sets the value of the formatting property.
135     *
136     * @param value
137     *     allowed object is
138     *     {@link Boolean }
139     *     
140     */
141    public void setFormatting(Boolean value) {
142        this.formatting = value;
143    }
144
145    /**
146     * Gets the value of the enforcement property.
147     *
148     * @return
149     *     possible object is
150     *     {@link Boolean }
151     *     
152     */
153    public boolean isEnforcement() {
154        if (enforcement == null) {
155            return true;
156        } else {
157            return enforcement;
158        }
159    }
160
161    /**
162     * Sets the value of the enforcement property.
163     *
164     * @param value
165     *     allowed object is
166     *     {@link Boolean }
167     *     
168     */
169    public void setEnforcement(Boolean value) {
170        this.enforcement = value;
171    }
172
173    /**
174     * Gets the value of the cryptProviderType property.
175     *
176     * @return
177     *     possible object is
178     *     {@link STCryptProv }
179     *     
180     */
181    public STCryptProv getCryptProviderType() {
182        return cryptProviderType;
183    }
184
185    /**
186     * Sets the value of the cryptProviderType property.
187     *
188     * @param value
189     *     allowed object is
190     *     {@link STCryptProv }
191     *     
192     */
193    public void setCryptProviderType(STCryptProv value) {
194        this.cryptProviderType = value;
195    }
196
197    /**
198     * Gets the value of the cryptAlgorithmClass property.
199     *
200     * @return
201     *     possible object is
202     *     {@link STAlgClass }
203     *     
204     */
205    public STAlgClass getCryptAlgorithmClass() {
206        return cryptAlgorithmClass;
207    }
208
209    /**
210     * Sets the value of the cryptAlgorithmClass property.
211     *
212     * @param value
213     *     allowed object is
214     *     {@link STAlgClass }
215     *     
216     */
217    public void setCryptAlgorithmClass(STAlgClass value) {
218        this.cryptAlgorithmClass = value;
219    }
220
221    /**
222     * Gets the value of the cryptAlgorithmType property.
223     *
224     * @return
225     *     possible object is
226     *     {@link STAlgType }
227     *     
228     */
229    public STAlgType getCryptAlgorithmType() {
230        return cryptAlgorithmType;
231    }
232
233    /**
234     * Sets the value of the cryptAlgorithmType property.
235     *
236     * @param value
237     *     allowed object is
238     *     {@link STAlgType }
239     *     
240     */
241    public void setCryptAlgorithmType(STAlgType value) {
242        this.cryptAlgorithmType = value;
243    }
244
245    /**
246     * Gets the value of the cryptAlgorithmSid property.
247     *
248     * @return
249     *     possible object is
250     *     {@link BigInteger }
251     *     
252     */
253    public BigInteger getCryptAlgorithmSid() {
254        return cryptAlgorithmSid;
255    }
256
257    /**
258     * Sets the value of the cryptAlgorithmSid property.
259     *
260     * @param value
261     *     allowed object is
262     *     {@link BigInteger }
263     *     
264     */
265    public void setCryptAlgorithmSid(BigInteger value) {
266        this.cryptAlgorithmSid = value;
267    }
268
269    /**
270     * Gets the value of the cryptSpinCount property.
271     *
272     * @return
273     *     possible object is
274     *     {@link BigInteger }
275     *     
276     */
277    public BigInteger getCryptSpinCount() {
278        return cryptSpinCount;
279    }
280
281    /**
282     * Sets the value of the cryptSpinCount property.
283     *
284     * @param value
285     *     allowed object is
286     *     {@link BigInteger }
287     *     
288     */
289    public void setCryptSpinCount(BigInteger value) {
290        this.cryptSpinCount = value;
291    }
292
293    /**
294     * Gets the value of the cryptProvider property.
295     *
296     * @return
297     *     possible object is
298     *     {@link String }
299     *     
300     */
301    public String getCryptProvider() {
302        return cryptProvider;
303    }
304
305    /**
306     * Sets the value of the cryptProvider property.
307     *
308     * @param value
309     *     allowed object is
310     *     {@link String }
311     *     
312     */
313    public void setCryptProvider(String value) {
314        this.cryptProvider = value;
315    }
316
317    /**
318     * Gets the value of the algIdExt property.
319     *
320     * @return
321     *     possible object is
322     *     {@link String }
323     *     
324     */
325    public String getAlgIdExt() {
326        return algIdExt;
327    }
328
329    /**
330     * Sets the value of the algIdExt property.
331     *
332     * @param value
333     *     allowed object is
334     *     {@link String }
335     *     
336     */
337    public void setAlgIdExt(String value) {
338        this.algIdExt = value;
339    }
340
341    /**
342     * Gets the value of the algIdExtSource property.
343     *
344     * @return
345     *     possible object is
346     *     {@link String }
347     *     
348     */
349    public String getAlgIdExtSource() {
350        return algIdExtSource;
351    }
352
353    /**
354     * Sets the value of the algIdExtSource property.
355     *
356     * @param value
357     *     allowed object is
358     *     {@link String }
359     *     
360     */
361    public void setAlgIdExtSource(String value) {
362        this.algIdExtSource = value;
363    }
364
365    /**
366     * Gets the value of the cryptProviderTypeExt property.
367     *
368     * @return
369     *     possible object is
370     *     {@link String }
371     *     
372     */
373    public String getCryptProviderTypeExt() {
374        return cryptProviderTypeExt;
375    }
376
377    /**
378     * Sets the value of the cryptProviderTypeExt property.
379     *
380     * @param value
381     *     allowed object is
382     *     {@link String }
383     *     
384     */
385    public void setCryptProviderTypeExt(String value) {
386        this.cryptProviderTypeExt = value;
387    }
388
389    /**
390     * Gets the value of the cryptProviderTypeExtSource property.
391     *
392     * @return
393     *     possible object is
394     *     {@link String }
395     *     
396     */
397    public String getCryptProviderTypeExtSource() {
398        return cryptProviderTypeExtSource;
399    }
400
401    /**
402     * Sets the value of the cryptProviderTypeExtSource property.
403     *
404     * @param value
405     *     allowed object is
406     *     {@link String }
407     *     
408     */
409    public void setCryptProviderTypeExtSource(String value) {
410        this.cryptProviderTypeExtSource = value;
411    }
412
413    /**
414     * Gets the value of the hash property.
415     *
416     * @return
417     *     possible object is
418     *     byte[]
419     */
420    public byte[] getHash() {
421        return hash;
422    }
423
424    /**
425     * Sets the value of the hash property.
426     *
427     * @param value
428     *     allowed object is
429     *     byte[]
430     */
431    public void setHash(byte[] value) {
432        this.hash = ((byte[]) value);
433    }
434
435    /**
436     * Gets the value of the salt property.
437     *
438     * @return
439     *     possible object is
440     *     byte[]
441     */
442    public byte[] getSalt() {
443        return salt;
444    }
445
446    /**
447     * Sets the value of the salt property.
448     *
449     * @param value
450     *     allowed object is
451     *     byte[]
452     */
453    public void setSalt(byte[] value) {
454        this.salt = ((byte[]) value);
455    }
456
457    /**
458     * Gets the parent object in the object tree representing the unmarshalled xml document.
459     *
460     * @return
461     *     The parent object.
462     */
463    public Object getParent() {
464        return this.parent;
465    }
466
467    public void setParent(Object parent) {
468        this.parent = parent;
469    }
470
471    /**
472     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
473     *
474     * @param parent
475     *     The parent object in the object tree.
476     * @param unmarshaller
477     *     The unmarshaller that generated the instance.
478     */
479    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
480        setParent(parent);
481    }
482
483}
Note: See TracBrowser for help on using the repository browser.