source: vlo/trunk/vlo-vocabularies/src/main/java/eu/clarin/cmdi/vlo/normalization/pojo/Variant.java @ 6810

Last change on this file since 6810 was 6810, checked in by davor.ostojic@oeaw.ac.at, 9 years ago
  • Property svn:mime-type set to text/plain
File size: 1.4 KB
Line 
1package eu.clarin.cmdi.vlo.normalization.pojo;
2
3import java.util.List;
4
5import javax.xml.bind.annotation.XmlAccessType;
6import javax.xml.bind.annotation.XmlAccessorType;
7import javax.xml.bind.annotation.XmlAttribute;
8import javax.xml.bind.annotation.XmlElement;
9import javax.xml.bind.annotation.XmlRootElement;
10
11/**
12 * @author dostojic
13 *
14 */
15
16@XmlAccessorType(XmlAccessType.FIELD)
17@XmlRootElement(name = "variant")
18public 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}
Note: See TracBrowser for help on using the repository browser.