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  
18  
19  package org.uddi.api_v3;
20  
21  import java.io.Serializable;
22  
23  import javax.xml.bind.annotation.XmlEnum;
24  import javax.xml.bind.annotation.XmlEnumValue;
25  import javax.xml.bind.annotation.XmlType;
26  
27  
28  /**
29   * <p>Java class for direction.
30   * 
31   * <p>The following schema fragment specifies the expected content contained within this class.
32   * <p>
33   * <pre>
34   * &lt;simpleType name="direction">
35   *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
36   *     &lt;enumeration value="fromKey"/>
37   *     &lt;enumeration value="toKey"/>
38   *   &lt;/restriction>
39   * &lt;/simpleType>
40   * </pre>
41   * 
42   */
43  @XmlType(name = "direction")
44  @XmlEnum
45  public enum Direction implements Serializable{
46  
47      @XmlEnumValue("fromKey")
48      FROM_KEY("fromKey"),
49      @XmlEnumValue("toKey")
50      TO_KEY("toKey");
51      private final String value;
52  
53      Direction(String v) {
54          value = v;
55      }
56  
57      public String value() {
58          return value;
59      }
60  
61      public static Direction fromValue(String v) {
62          for (Direction c: Direction.values()) {
63              if (c.value.equals(v)) {
64                  return c;
65              }
66          }
67          throw new IllegalArgumentException(v);
68      }
69  
70  }