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 keyType.
30 *
31 * <p>The following schema fragment specifies the expected content contained within this class.
32 * <p>
33 * <pre>
34 * <simpleType name="keyType">
35 * <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
36 * <enumeration value="businessKey"/>
37 * <enumeration value="tModelKey"/>
38 * <enumeration value="serviceKey"/>
39 * <enumeration value="bindingKey"/>
40 * <enumeration value="subscriptionKey"/>
41 * </restriction>
42 * </simpleType>
43 * </pre>
44 *
45 */
46 @XmlType(name = "keyType")
47 @XmlEnum
48 public enum KeyType implements Serializable{
49
50 @XmlEnumValue("businessKey")
51 BUSINESS_KEY("businessKey"),
52 @XmlEnumValue("tModelKey")
53 T_MODEL_KEY("tModelKey"),
54 @XmlEnumValue("serviceKey")
55 SERVICE_KEY("serviceKey"),
56 @XmlEnumValue("bindingKey")
57 BINDING_KEY("bindingKey"),
58 @XmlEnumValue("subscriptionKey")
59 SUBSCRIPTION_KEY("subscriptionKey");
60 private final String value;
61
62 KeyType(String v) {
63 value = v;
64 }
65
66 public String value() {
67 return value;
68 }
69
70 public static KeyType fromValue(String v) {
71 for (KeyType c: KeyType.values()) {
72 if (c.value.equals(v)) {
73 return c;
74 }
75 }
76 throw new IllegalArgumentException(v);
77 }
78
79 }