source: trunk/docx4j/src/main/java/org/docx4j/wml/HdrFtrRef.java @ 568

Revision 568, 2.0 KB checked in by jharrop, 4 years ago (diff)

Regenerated JAXB classes, primarily to improve header/footer handling.
Also changed CT_Hyperlink to P.Hyperlink (though maybe its better not as an inner class)

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 HdrFtrRef.
31 *
32 * <p>The following schema fragment specifies the expected content contained within this class.
33 * <p>
34 * <pre>
35 * &lt;simpleType name="HdrFtrRef">
36 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
37 *     &lt;enumeration value="even"/>
38 *     &lt;enumeration value="default"/>
39 *     &lt;enumeration value="first"/>
40 *   &lt;/restriction>
41 * &lt;/simpleType>
42 * </pre>
43 *
44 */
45@XmlType(name = "HdrFtrRef")
46@XmlEnum
47public enum HdrFtrRef {
48
49
50    /**
51     * Even Numbered Pages Only
52     *
53     */
54    @XmlEnumValue("even")
55    EVEN("even"),
56
57    /**
58     * Default Header or Footer
59     *
60     */
61    @XmlEnumValue("default")
62    DEFAULT("default"),
63
64    /**
65     * First Page Only
66     *
67     */
68    @XmlEnumValue("first")
69    FIRST("first");
70    private final String value;
71
72    HdrFtrRef(String v) {
73        value = v;
74    }
75
76    public String value() {
77        return value;
78    }
79
80    public static HdrFtrRef fromValue(String v) {
81        for (HdrFtrRef c: HdrFtrRef.values()) {
82            if (c.value.equals(v)) {
83                return c;
84            }
85        }
86        throw new IllegalArgumentException(v);
87    }
88
89}
Note: See TracBrowser for help on using the repository browser.