| 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.annotation.XmlEnum; |
|---|
| 25 | import javax.xml.bind.annotation.XmlEnumValue; |
|---|
| 26 | import javax.xml.bind.annotation.XmlType; |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | /** |
|---|
| 30 | * <p>Java class for ST_DocPartType. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_DocPartType"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="none"/> |
|---|
| 38 | * <enumeration value="normal"/> |
|---|
| 39 | * <enumeration value="autoExp"/> |
|---|
| 40 | * <enumeration value="toolbar"/> |
|---|
| 41 | * <enumeration value="speller"/> |
|---|
| 42 | * <enumeration value="formFld"/> |
|---|
| 43 | * <enumeration value="bbPlcHdr"/> |
|---|
| 44 | * </restriction> |
|---|
| 45 | * </simpleType> |
|---|
| 46 | * </pre> |
|---|
| 47 | * |
|---|
| 48 | */ |
|---|
| 49 | @XmlType(name = "ST_DocPartType") |
|---|
| 50 | @XmlEnum |
|---|
| 51 | public enum STDocPartType { |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | /** |
|---|
| 55 | * No Type |
|---|
| 56 | * |
|---|
| 57 | */ |
|---|
| 58 | @XmlEnumValue("none") |
|---|
| 59 | NONE("none"), |
|---|
| 60 | |
|---|
| 61 | /** |
|---|
| 62 | * Normal |
|---|
| 63 | * |
|---|
| 64 | */ |
|---|
| 65 | @XmlEnumValue("normal") |
|---|
| 66 | NORMAL("normal"), |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Automatically Replace Name With |
|---|
| 70 | * Content |
|---|
| 71 | * |
|---|
| 72 | */ |
|---|
| 73 | @XmlEnumValue("autoExp") |
|---|
| 74 | AUTO_EXP("autoExp"), |
|---|
| 75 | |
|---|
| 76 | /** |
|---|
| 77 | * AutoText User Interface |
|---|
| 78 | * Entry |
|---|
| 79 | * |
|---|
| 80 | */ |
|---|
| 81 | @XmlEnumValue("toolbar") |
|---|
| 82 | TOOLBAR("toolbar"), |
|---|
| 83 | |
|---|
| 84 | /** |
|---|
| 85 | * AutoCorrect Entry |
|---|
| 86 | * |
|---|
| 87 | */ |
|---|
| 88 | @XmlEnumValue("speller") |
|---|
| 89 | SPELLER("speller"), |
|---|
| 90 | |
|---|
| 91 | /** |
|---|
| 92 | * Form Field Help Text |
|---|
| 93 | * |
|---|
| 94 | */ |
|---|
| 95 | @XmlEnumValue("formFld") |
|---|
| 96 | FORM_FLD("formFld"), |
|---|
| 97 | |
|---|
| 98 | /** |
|---|
| 99 | * Structured Document Tag Placeholder |
|---|
| 100 | * Text |
|---|
| 101 | * |
|---|
| 102 | */ |
|---|
| 103 | @XmlEnumValue("bbPlcHdr") |
|---|
| 104 | BB_PLC_HDR("bbPlcHdr"); |
|---|
| 105 | private final String value; |
|---|
| 106 | |
|---|
| 107 | STDocPartType(String v) { |
|---|
| 108 | value = v; |
|---|
| 109 | } |
|---|
| 110 | |
|---|
| 111 | public String value() { |
|---|
| 112 | return value; |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | public static STDocPartType fromValue(String v) { |
|---|
| 116 | for (STDocPartType c: STDocPartType.values()) { |
|---|
| 117 | if (c.value.equals(v)) { |
|---|
| 118 | return c; |
|---|
| 119 | } |
|---|
| 120 | } |
|---|
| 121 | throw new IllegalArgumentException(v); |
|---|
| 122 | } |
|---|
| 123 | |
|---|
| 124 | } |
|---|