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

Revision 359, 2.4 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 javax.xml.bind.annotation.XmlEnum;
25import javax.xml.bind.annotation.XmlEnumValue;
26import javax.xml.bind.annotation.XmlType;
27
28
29/**
30 * <p>Java class for ST_DocProtect.
31 *
32 * <p>The following schema fragment specifies the expected content contained within this class.
33 * <p>
34 * <pre>
35 * &lt;simpleType name="ST_DocProtect">
36 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
37 *     &lt;enumeration value="none"/>
38 *     &lt;enumeration value="readOnly"/>
39 *     &lt;enumeration value="comments"/>
40 *     &lt;enumeration value="trackedChanges"/>
41 *     &lt;enumeration value="forms"/>
42 *   &lt;/restriction>
43 * &lt;/simpleType>
44 * </pre>
45 *
46 */
47@XmlType(name = "ST_DocProtect")
48@XmlEnum
49public enum STDocProtect {
50
51
52    /**
53     * No Editing Restrictions
54     *
55     */
56    @XmlEnumValue("none")
57    NONE("none"),
58
59    /**
60     * Allow No Editing
61     *
62     */
63    @XmlEnumValue("readOnly")
64    READ_ONLY("readOnly"),
65
66    /**
67     * Allow Editing of
68     *                                          Comments
69     *
70     */
71    @XmlEnumValue("comments")
72    COMMENTS("comments"),
73
74    /**
75     * Allow Editing With Revision
76     *                                          Tracking
77     *
78     */
79    @XmlEnumValue("trackedChanges")
80    TRACKED_CHANGES("trackedChanges"),
81
82    /**
83     * Allow Editing of Form
84     *                                          Fields
85     *
86     */
87    @XmlEnumValue("forms")
88    FORMS("forms");
89    private final String value;
90
91    STDocProtect(String v) {
92        value = v;
93    }
94
95    public String value() {
96        return value;
97    }
98
99    public static STDocProtect fromValue(String v) {
100        for (STDocProtect c: STDocProtect.values()) {
101            if (c.value.equals(v)) {
102                return c;
103            }
104        }
105        throw new IllegalArgumentException(v);
106    }
107
108}
Note: See TracBrowser for help on using the repository browser.