| 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_DocPartBehavior. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_DocPartBehavior"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="content"/> |
|---|
| 38 | * <enumeration value="p"/> |
|---|
| 39 | * <enumeration value="pg"/> |
|---|
| 40 | * </restriction> |
|---|
| 41 | * </simpleType> |
|---|
| 42 | * </pre> |
|---|
| 43 | * |
|---|
| 44 | */ |
|---|
| 45 | @XmlType(name = "ST_DocPartBehavior") |
|---|
| 46 | @XmlEnum |
|---|
| 47 | public enum STDocPartBehavior { |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | /** |
|---|
| 51 | * Insert Content At Specified |
|---|
| 52 | * Location |
|---|
| 53 | * |
|---|
| 54 | */ |
|---|
| 55 | @XmlEnumValue("content") |
|---|
| 56 | CONTENT("content"), |
|---|
| 57 | |
|---|
| 58 | /** |
|---|
| 59 | * Ensure Entry Is In New |
|---|
| 60 | * Paragraph |
|---|
| 61 | * |
|---|
| 62 | */ |
|---|
| 63 | @XmlEnumValue("p") |
|---|
| 64 | P("p"), |
|---|
| 65 | |
|---|
| 66 | /** |
|---|
| 67 | * Ensure Entry Is On New |
|---|
| 68 | * Page |
|---|
| 69 | * |
|---|
| 70 | */ |
|---|
| 71 | @XmlEnumValue("pg") |
|---|
| 72 | PG("pg"); |
|---|
| 73 | private final String value; |
|---|
| 74 | |
|---|
| 75 | STDocPartBehavior(String v) { |
|---|
| 76 | value = v; |
|---|
| 77 | } |
|---|
| 78 | |
|---|
| 79 | public String value() { |
|---|
| 80 | return value; |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | public static STDocPartBehavior fromValue(String v) { |
|---|
| 84 | for (STDocPartBehavior c: STDocPartBehavior.values()) { |
|---|
| 85 | if (c.value.equals(v)) { |
|---|
| 86 | return c; |
|---|
| 87 | } |
|---|
| 88 | } |
|---|
| 89 | throw new IllegalArgumentException(v); |
|---|
| 90 | } |
|---|
| 91 | |
|---|
| 92 | } |
|---|