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 @XmlType(name = "configuration", namespace = "http://workflow.opencastproject.org")
35 @XmlRootElement(name = "configuration", namespace = "http://workflow.opencastproject.org")
36 @XmlAccessorType(XmlAccessType.FIELD)
37 public class JaxbWorkflowConfiguration {
38 @XmlAttribute
39 protected String key;
40 @XmlValue
41 protected String value;
42
43 public JaxbWorkflowConfiguration() {
44 }
45
46 public JaxbWorkflowConfiguration(String key, String value) {
47 this.key = key;
48 this.value = value;
49 }
50
51 public String getKey() {
52 return key;
53 }
54
55 public void setKey(String key) {
56 this.key = key;
57 }
58
59 public String getValue() {
60 return value;
61 }
62
63 public void setValue(String value) {
64 this.value = value;
65 }
66
67
68
69
70
71
72 @Override
73 public int hashCode() {
74 final int prime = 31;
75 int result = 1;
76 result = prime * result + ((key == null) ? 0 : key.hashCode());
77 return result;
78 }
79
80
81
82
83
84
85 @Override
86 public boolean equals(Object obj) {
87 if (this == obj)
88 return true;
89 if (obj == null)
90 return false;
91 if (getClass() != obj.getClass())
92 return false;
93 JaxbWorkflowConfiguration other = (JaxbWorkflowConfiguration) obj;
94 if (key == null) {
95 if (other.key != null)
96 return false;
97 } else if (!key.equals(other.key))
98 return false;
99 return true;
100 }
101
102 }
103