| 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_MailMergeDocType. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_MailMergeDocType"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="catalog"/> |
|---|
| 38 | * <enumeration value="envelopes"/> |
|---|
| 39 | * <enumeration value="mailingLabels"/> |
|---|
| 40 | * <enumeration value="formLetters"/> |
|---|
| 41 | * <enumeration value="email"/> |
|---|
| 42 | * <enumeration value="fax"/> |
|---|
| 43 | * </restriction> |
|---|
| 44 | * </simpleType> |
|---|
| 45 | * </pre> |
|---|
| 46 | * |
|---|
| 47 | */ |
|---|
| 48 | @XmlType(name = "ST_MailMergeDocType") |
|---|
| 49 | @XmlEnum |
|---|
| 50 | public enum STMailMergeDocType { |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | /** |
|---|
| 54 | * Catalog Source Document |
|---|
| 55 | * |
|---|
| 56 | */ |
|---|
| 57 | @XmlEnumValue("catalog") |
|---|
| 58 | CATALOG("catalog"), |
|---|
| 59 | |
|---|
| 60 | /** |
|---|
| 61 | * Envelope Source |
|---|
| 62 | * Document |
|---|
| 63 | * |
|---|
| 64 | */ |
|---|
| 65 | @XmlEnumValue("envelopes") |
|---|
| 66 | ENVELOPES("envelopes"), |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Mailing Label Source |
|---|
| 70 | * Document |
|---|
| 71 | * |
|---|
| 72 | */ |
|---|
| 73 | @XmlEnumValue("mailingLabels") |
|---|
| 74 | MAILING_LABELS("mailingLabels"), |
|---|
| 75 | |
|---|
| 76 | /** |
|---|
| 77 | * Form Letter Source |
|---|
| 78 | * Document |
|---|
| 79 | * |
|---|
| 80 | */ |
|---|
| 81 | @XmlEnumValue("formLetters") |
|---|
| 82 | FORM_LETTERS("formLetters"), |
|---|
| 83 | |
|---|
| 84 | /** |
|---|
| 85 | * E-Mail Source Document |
|---|
| 86 | * |
|---|
| 87 | */ |
|---|
| 88 | @XmlEnumValue("email") |
|---|
| 89 | EMAIL("email"), |
|---|
| 90 | |
|---|
| 91 | /** |
|---|
| 92 | * Fax Source Document |
|---|
| 93 | * |
|---|
| 94 | */ |
|---|
| 95 | @XmlEnumValue("fax") |
|---|
| 96 | FAX("fax"); |
|---|
| 97 | private final String value; |
|---|
| 98 | |
|---|
| 99 | STMailMergeDocType(String v) { |
|---|
| 100 | value = v; |
|---|
| 101 | } |
|---|
| 102 | |
|---|
| 103 | public String value() { |
|---|
| 104 | return value; |
|---|
| 105 | } |
|---|
| 106 | |
|---|
| 107 | public static STMailMergeDocType fromValue(String v) { |
|---|
| 108 | for (STMailMergeDocType c: STMailMergeDocType.values()) { |
|---|
| 109 | if (c.value.equals(v)) { |
|---|
| 110 | return c; |
|---|
| 111 | } |
|---|
| 112 | } |
|---|
| 113 | throw new IllegalArgumentException(v); |
|---|
| 114 | } |
|---|
| 115 | |
|---|
| 116 | } |
|---|