This project has retired. For details please refer to its Attic page.
Direction xref
View Javadoc
1   /*
2    * Copyright 2001-2008 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   */
17  package org.uddi.api_v2;
18  
19  import javax.xml.bind.annotation.XmlEnum;
20  import javax.xml.bind.annotation.XmlEnumValue;
21  import javax.xml.bind.annotation.XmlType;
22  
23  
24  /**
25   * <p>Java class for direction.
26   * 
27   * <p>The following schema fragment specifies the expected content contained within this class.
28   * <p>
29   * <pre>
30   * &lt;simpleType name="direction">
31   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
32   *     &lt;enumeration value="fromKey"/>
33   *     &lt;enumeration value="toKey"/>
34   *   &lt;/restriction>
35   * &lt;/simpleType>
36   * </pre>
37   * 
38   */
39  @XmlType(name = "direction")
40  @XmlEnum
41  public enum Direction {
42  
43      @XmlEnumValue("fromKey")
44      FROM_KEY("fromKey"),
45      @XmlEnumValue("toKey")
46      TO_KEY("toKey");
47      private final String value;
48  
49      Direction(String v) {
50          value = v;
51      }
52  
53      public String value() {
54          return value;
55      }
56  
57      public static Direction fromValue(String v) {
58          for (Direction c: Direction.values()) {
59              if (c.value.equals(v)) {
60                  return c;
61              }
62          }
63          throw new IllegalArgumentException(v);
64      }
65  
66  }