1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.opencastproject.workflow.api;
23
24 import javax.xml.bind.annotation.XmlAccessType;
25 import javax.xml.bind.annotation.XmlAccessorType;
26 import javax.xml.bind.annotation.XmlAttribute;
27 import javax.xml.bind.annotation.XmlRootElement;
28 import javax.xml.bind.annotation.XmlType;
29 import javax.xml.bind.annotation.XmlValue;
30
31
32
33
34
35 @XmlType(name = "configuration", namespace = "http://workflow.opencastproject.org")
36 @XmlRootElement(name = "configuration", namespace = "http://workflow.opencastproject.org")
37 @XmlAccessorType(XmlAccessType.FIELD)
38 public class JaxbWorkflowConfiguration {
39 @XmlAttribute
40 protected String key;
41 @XmlValue
42 protected String value;
43
44 public JaxbWorkflowConfiguration() {
45 }
46
47 public JaxbWorkflowConfiguration(String key, String value) {
48 this.key = key;
49 this.value = value;
50 }
51
52 public String getKey() {
53 return key;
54 }
55
56 public void setKey(String key) {
57 this.key = key;
58 }
59
60 public String getValue() {
61 return value;
62 }
63
64 public void setValue(String value) {
65 this.value = value;
66 }
67
68
69
70
71
72
73 @Override
74 public int hashCode() {
75 final int prime = 31;
76 int result = 1;
77 result = prime * result + ((key == null) ? 0 : key.hashCode());
78 return result;
79 }
80
81
82
83
84
85
86 @Override
87 public boolean equals(Object obj) {
88 if (this == obj) {
89 return true;
90 }
91 if (obj == null) {
92 return false;
93 }
94 if (getClass() != obj.getClass()) {
95 return false;
96 }
97 JaxbWorkflowConfiguration other = (JaxbWorkflowConfiguration) obj;
98 if (key == null) {
99 if (other.key != null) {
100 return false;
101 }
102 } else if (!key.equals(other.key)) {
103 return false;
104 }
105 return true;
106 }
107
108 }
109