| 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.dml; |
|---|
| 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_BlipCompression. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_BlipCompression"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}token"> |
|---|
| 37 | * <enumeration value="email"/> |
|---|
| 38 | * <enumeration value="screen"/> |
|---|
| 39 | * <enumeration value="print"/> |
|---|
| 40 | * <enumeration value="hqprint"/> |
|---|
| 41 | * <enumeration value="none"/> |
|---|
| 42 | * </restriction> |
|---|
| 43 | * </simpleType> |
|---|
| 44 | * </pre> |
|---|
| 45 | * |
|---|
| 46 | */ |
|---|
| 47 | @XmlType(name = "ST_BlipCompression") |
|---|
| 48 | @XmlEnum |
|---|
| 49 | public enum STBlipCompression { |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | /** |
|---|
| 53 | * Email Compression |
|---|
| 54 | * |
|---|
| 55 | */ |
|---|
| 56 | @XmlEnumValue("email") |
|---|
| 57 | EMAIL("email"), |
|---|
| 58 | |
|---|
| 59 | /** |
|---|
| 60 | * Screen Viewing Compression |
|---|
| 61 | * |
|---|
| 62 | */ |
|---|
| 63 | @XmlEnumValue("screen") |
|---|
| 64 | SCREEN("screen"), |
|---|
| 65 | |
|---|
| 66 | /** |
|---|
| 67 | * Printing Compression |
|---|
| 68 | * |
|---|
| 69 | */ |
|---|
| 70 | @XmlEnumValue("print") |
|---|
| 71 | PRINT("print"), |
|---|
| 72 | |
|---|
| 73 | /** |
|---|
| 74 | * High Quality Printing Compression |
|---|
| 75 | * |
|---|
| 76 | */ |
|---|
| 77 | @XmlEnumValue("hqprint") |
|---|
| 78 | HQPRINT("hqprint"), |
|---|
| 79 | |
|---|
| 80 | /** |
|---|
| 81 | * No Compression |
|---|
| 82 | * |
|---|
| 83 | */ |
|---|
| 84 | @XmlEnumValue("none") |
|---|
| 85 | NONE("none"); |
|---|
| 86 | private final String value; |
|---|
| 87 | |
|---|
| 88 | STBlipCompression(String v) { |
|---|
| 89 | value = v; |
|---|
| 90 | } |
|---|
| 91 | |
|---|
| 92 | public String value() { |
|---|
| 93 | return value; |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | public static STBlipCompression fromValue(String v) { |
|---|
| 97 | for (STBlipCompression c: STBlipCompression.values()) { |
|---|
| 98 | if (c.value.equals(v)) { |
|---|
| 99 | return c; |
|---|
| 100 | } |
|---|
| 101 | } |
|---|
| 102 | throw new IllegalArgumentException(v); |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | } |
|---|