View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.2-b01-fcs 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2008.07.04 at 11:56:00 PM CEST 
6   //
7   
8   
9   package org.springframework.ws.samples.airline.schema;
10  
11  import javax.xml.bind.annotation.XmlEnum;
12  import javax.xml.bind.annotation.XmlEnumValue;
13  
14  
15  /**
16   * <p>Java class for ServiceClass.
17   * 
18   * <p>The following schema fragment specifies the expected content contained within this class.
19   * <p>
20   * <pre>
21   * &lt;simpleType name="ServiceClass">
22   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NCName">
23   *     &lt;enumeration value="economy"/>
24   *     &lt;enumeration value="business"/>
25   *     &lt;enumeration value="first"/>
26   *   &lt;/restriction>
27   * &lt;/simpleType>
28   * </pre>
29   * 
30   */
31  @XmlEnum
32  public enum ServiceClass {
33  
34      @XmlEnumValue("economy")
35      ECONOMY("economy"),
36      @XmlEnumValue("business")
37      BUSINESS("business"),
38      @XmlEnumValue("first")
39      FIRST("first");
40      private final String value;
41  
42      ServiceClass(String v) {
43          value = v;
44      }
45  
46      public String value() {
47          return value;
48      }
49  
50      public static ServiceClass fromValue(String v) {
51          for (ServiceClass c: ServiceClass.values()) {
52              if (c.value.equals(v)) {
53                  return c;
54              }
55          }
56          throw new IllegalArgumentException(v.toString());
57      }
58  
59  }