1
2
3
4
5
6
7
8
9 package org.apache.ws.scout.model.uddi.v2;
10
11 import javax.xml.bind.annotation.XmlEnum;
12 import javax.xml.bind.annotation.XmlEnumValue;
13 import javax.xml.bind.annotation.XmlType;
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 @XmlType(name = "keyType")
34 @XmlEnum
35 public enum KeyType {
36
37 @XmlEnumValue("businessKey")
38 BUSINESS_KEY("businessKey"),
39 @XmlEnumValue("tModelKey")
40 T_MODEL_KEY("tModelKey"),
41 @XmlEnumValue("serviceKey")
42 SERVICE_KEY("serviceKey"),
43 @XmlEnumValue("bindingKey")
44 BINDING_KEY("bindingKey");
45 private final String value;
46
47 KeyType(String v) {
48 value = v;
49 }
50
51 public String value() {
52 return value;
53 }
54
55 public static KeyType fromValue(String v) {
56 for (KeyType c: KeyType.values()) {
57 if (c.value.equals(v)) {
58 return c;
59 }
60 }
61 throw new IllegalArgumentException(v);
62 }
63
64 }