1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.internal.application.view.impl;
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
34
35 @XmlType(name = "ViewPerspective")
36 @XmlEnum
37 public enum ViewPerspective {
38
39 @XmlEnumValue("Global")
40 GLOBAL("Global"),
41 @XmlEnumValue("Region")
42 REGION("Region"),
43 EU("EU"),
44 @XmlEnumValue("Country")
45 COUNTRY("Country"),
46 @XmlEnumValue("Person")
47 PERSON("Person"),
48 @XmlEnumValue("Party")
49 PARTY("Party");
50 private final String value;
51
52 ViewPerspective(String v) {
53 value = v;
54 }
55
56 public String value() {
57 return value;
58 }
59
60 public static ViewPerspective fromValue(String v) {
61 for (ViewPerspective c: ViewPerspective.values()) {
62 if (c.value.equals(v)) {
63 return c;
64 }
65 }
66 throw new IllegalArgumentException(v);
67 }
68
69 }