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

Revision 359, 3.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 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_MailMergeSourceType.
31 *
32 * <p>The following schema fragment specifies the expected content contained within this class.
33 * <p>
34 * <pre>
35 * &lt;simpleType name="ST_MailMergeSourceType">
36 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
37 *     &lt;enumeration value="database"/>
38 *     &lt;enumeration value="addressBook"/>
39 *     &lt;enumeration value="document1"/>
40 *     &lt;enumeration value="document2"/>
41 *     &lt;enumeration value="text"/>
42 *     &lt;enumeration value="email"/>
43 *     &lt;enumeration value="native"/>
44 *     &lt;enumeration value="legacy"/>
45 *     &lt;enumeration value="master"/>
46 *   &lt;/restriction>
47 * &lt;/simpleType>
48 * </pre>
49 *
50 */
51@XmlType(name = "ST_MailMergeSourceType")
52@XmlEnum
53public enum STMailMergeSourceType {
54
55
56    /**
57     * Database Data Source
58     *
59     */
60    @XmlEnumValue("database")
61    DATABASE("database"),
62
63    /**
64     * Address Book Data Source
65     *
66     */
67    @XmlEnumValue("addressBook")
68    ADDRESS_BOOK("addressBook"),
69
70    /**
71     * Alternate Document Format Data
72     *                                          Source
73     *
74     */
75    @XmlEnumValue("document1")
76    DOCUMENT_1("document1"),
77
78    /**
79     * Alternate Document Format Data Source
80     *                                          Two
81     *
82     */
83    @XmlEnumValue("document2")
84    DOCUMENT_2("document2"),
85
86    /**
87     * Text File Data Source
88     *
89     */
90    @XmlEnumValue("text")
91    TEXT("text"),
92
93    /**
94     * E-Mail Program Data
95     *                                          Source
96     *
97     */
98    @XmlEnumValue("email")
99    EMAIL("email"),
100
101    /**
102     * Native Data Souce
103     *
104     */
105    @XmlEnumValue("native")
106    NATIVE("native"),
107
108    /**
109     * Legacy Document Format Data
110     *                                          Source
111     *
112     */
113    @XmlEnumValue("legacy")
114    LEGACY("legacy"),
115
116    /**
117     * Aggregate Data Source
118     *
119     */
120    @XmlEnumValue("master")
121    MASTER("master");
122    private final String value;
123
124    STMailMergeSourceType(String v) {
125        value = v;
126    }
127
128    public String value() {
129        return value;
130    }
131
132    public static STMailMergeSourceType fromValue(String v) {
133        for (STMailMergeSourceType c: STMailMergeSourceType.values()) {
134            if (c.value.equals(v)) {
135                return c;
136            }
137        }
138        throw new IllegalArgumentException(v);
139    }
140
141}
Note: See TracBrowser for help on using the repository browser.