This project has retired. For details please refer to its Attic page.
EnumPropertyType xref

1   
2   package org.apache.chemistry.opencmis.commons.impl.jaxb;
3   
4   import javax.xml.bind.annotation.XmlEnum;
5   import javax.xml.bind.annotation.XmlEnumValue;
6   import javax.xml.bind.annotation.XmlType;
7   
8   
9   /**
10   * <p>Java class for enumPropertyType.
11   * 
12   * <p>The following schema fragment specifies the expected content contained within this class.
13   * <p>
14   * <pre>
15   * &lt;simpleType name="enumPropertyType">
16   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
17   *     &lt;enumeration value="boolean"/>
18   *     &lt;enumeration value="id"/>
19   *     &lt;enumeration value="integer"/>
20   *     &lt;enumeration value="datetime"/>
21   *     &lt;enumeration value="decimal"/>
22   *     &lt;enumeration value="html"/>
23   *     &lt;enumeration value="string"/>
24   *     &lt;enumeration value="uri"/>
25   *   &lt;/restriction>
26   * &lt;/simpleType>
27   * </pre>
28   * 
29   */
30  @XmlType(name = "enumPropertyType", namespace = "http://docs.oasis-open.org/ns/cmis/core/200908/")
31  @XmlEnum
32  public enum EnumPropertyType {
33  
34      @XmlEnumValue("boolean")
35      BOOLEAN("boolean"),
36      @XmlEnumValue("id")
37      ID("id"),
38      @XmlEnumValue("integer")
39      INTEGER("integer"),
40      @XmlEnumValue("datetime")
41      DATETIME("datetime"),
42      @XmlEnumValue("decimal")
43      DECIMAL("decimal"),
44      @XmlEnumValue("html")
45      HTML("html"),
46      @XmlEnumValue("string")
47      STRING("string"),
48      @XmlEnumValue("uri")
49      URI("uri");
50      private final String value;
51  
52      EnumPropertyType(String v) {
53          value = v;
54      }
55  
56      public String value() {
57          return value;
58      }
59  
60      public static EnumPropertyType fromValue(String v) {
61          for (EnumPropertyType c: EnumPropertyType.values()) {
62              if (c.value.equals(v)) {
63                  return c;
64              }
65          }
66          throw new IllegalArgumentException(v);
67      }
68  
69  }