1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.fosstrak.epcis.repository.model;
22
23 import static org.fosstrak.epcis.repository.Utils.eq;
24
25 import java.io.Serializable;
26
27
28
29
30
31
32 public abstract class VocabularyAttributeElement implements Serializable {
33
34
35
36
37 private static final long serialVersionUID = -3825662827697962041L;
38
39 private String privateID;
40 private String value;
41 private VocabularyAttrCiD vocabularyAttrCiD;
42
43
44 public VocabularyAttributeElement() {
45 this.privateID = java.util.UUID.randomUUID().toString();
46 }
47
48 public int hashCode() {
49 return privateID.hashCode();
50 }
51
52 public String getValue() {
53 return value;
54 }
55
56 public void setValue(String value) {
57 this.value = value;
58 }
59
60 public VocabularyAttrCiD getVocabularyAttrCiD() {
61 return vocabularyAttrCiD;
62 }
63
64 public void setVocabularyAttrCiD(VocabularyAttrCiD vocabularyAttrCiD) {
65 this.vocabularyAttrCiD = vocabularyAttrCiD;
66 }
67
68 @Override
69 public boolean equals(Object o) {
70 if (o instanceof VocabularyAttributeElement) {
71 VocabularyAttributeElement that = (VocabularyAttributeElement) o;
72 return eq(this.value, that.value) && eq(this.vocabularyAttrCiD, that.vocabularyAttrCiD);
73 }
74 else {
75 return false;
76 }
77 }
78
79
80
81
82 public abstract String getVocabularyType();
83
84 }