1 | package eu.clarin.cmdi.vlo.normalization.pojo; |
---|
2 | |
---|
3 | import java.util.List; |
---|
4 | |
---|
5 | import javax.xml.bind.annotation.XmlAccessType; |
---|
6 | import javax.xml.bind.annotation.XmlAccessorType; |
---|
7 | import javax.xml.bind.annotation.XmlAttribute; |
---|
8 | import javax.xml.bind.annotation.XmlElement; |
---|
9 | import javax.xml.bind.annotation.XmlRootElement; |
---|
10 | |
---|
11 | /** |
---|
12 | * @author dostojic |
---|
13 | * |
---|
14 | */ |
---|
15 | |
---|
16 | @XmlAccessorType(XmlAccessType.FIELD) |
---|
17 | @XmlRootElement(name = "variant") |
---|
18 | public class Variant{ |
---|
19 | |
---|
20 | @XmlAttribute |
---|
21 | private String value; |
---|
22 | |
---|
23 | @XmlAttribute |
---|
24 | private Boolean isRegExp = null; |
---|
25 | |
---|
26 | @XmlElement(name = "cross-mappings") |
---|
27 | private CrossMappings crossMappings; |
---|
28 | |
---|
29 | public Boolean isRegExp() { |
---|
30 | return isRegExp != null ? isRegExp : false; |
---|
31 | } |
---|
32 | |
---|
33 | public void setRegExp(boolean isRegExp) { |
---|
34 | this.isRegExp = isRegExp; |
---|
35 | } |
---|
36 | |
---|
37 | public String getValue() { |
---|
38 | return value; |
---|
39 | } |
---|
40 | |
---|
41 | public void setValue(String value) { |
---|
42 | this.value = value; |
---|
43 | } |
---|
44 | |
---|
45 | public List<CrossMapping> getCrossMappings() { |
---|
46 | return crossMappings != null? crossMappings.getCrossMappings() : null; |
---|
47 | } |
---|
48 | |
---|
49 | public void setCrossMappings(List<CrossMapping> crossMappings) { |
---|
50 | if(this.crossMappings == null){ |
---|
51 | this.crossMappings = new CrossMappings(); |
---|
52 | } |
---|
53 | this.crossMappings.setCrossMappings(crossMappings); |
---|
54 | } |
---|
55 | |
---|
56 | @Override |
---|
57 | public String toString() { |
---|
58 | return value + " " + (isRegExp ? "isRegEx = true" : "") + " " + "cross-mappings["+ crossMappings.toString() + "]"; |
---|
59 | } |
---|
60 | |
---|
61 | |
---|
62 | } |
---|