1
|
package eu.dnetlib.domain.functionality.validator;
|
2
|
|
3
|
|
4
|
public class Rule{
|
5
|
|
6
|
// for XML//
|
7
|
public static String XPATH = "xpath";
|
8
|
public static String SUCCESS = "success";
|
9
|
|
10
|
// for cardinality rule
|
11
|
public static String GREATER_THAN = "greater_than";
|
12
|
public static String LESS_THAN = "less_than";
|
13
|
|
14
|
// for regular expresion
|
15
|
public static String REGEXP = "regexp";
|
16
|
|
17
|
// for vocabulary
|
18
|
public static String TERMS = "terms";
|
19
|
|
20
|
private int id;
|
21
|
private String name = null;
|
22
|
private String description = null;
|
23
|
private String type = null;
|
24
|
private boolean mandatory = false;
|
25
|
private int weight = 0;
|
26
|
private String provider_information = null;
|
27
|
private String job_type = null;
|
28
|
private String entity_type = null;
|
29
|
private boolean for_cris = false;
|
30
|
|
31
|
// protected Properties pros;
|
32
|
//
|
33
|
// public Rule() {
|
34
|
// }
|
35
|
//
|
36
|
// public Properties getConfiguration() {
|
37
|
// return pros;
|
38
|
// }
|
39
|
//
|
40
|
// public void setConfiguration(Properties pros) {
|
41
|
// this.pros = pros;
|
42
|
// }
|
43
|
|
44
|
protected CustomProperties pros;
|
45
|
|
46
|
public Rule() {
|
47
|
}
|
48
|
|
49
|
public CustomProperties getConfiguration() {
|
50
|
return pros;
|
51
|
}
|
52
|
|
53
|
public void setConfiguration(CustomProperties pros) {
|
54
|
this.pros = pros;
|
55
|
}
|
56
|
|
57
|
public int getId() {
|
58
|
return id;
|
59
|
}
|
60
|
|
61
|
public void setId(int id) {
|
62
|
this.id = id;
|
63
|
}
|
64
|
|
65
|
public String getName() {
|
66
|
return name;
|
67
|
}
|
68
|
|
69
|
public void setName(String name) {
|
70
|
this.name = name;
|
71
|
}
|
72
|
|
73
|
public String getDescription() {
|
74
|
return description;
|
75
|
}
|
76
|
|
77
|
public void setDescription(String description) {
|
78
|
this.description = description;
|
79
|
}
|
80
|
|
81
|
public String getType() {
|
82
|
return type;
|
83
|
}
|
84
|
|
85
|
public void setType(String type) {
|
86
|
this.type = type;
|
87
|
}
|
88
|
|
89
|
public boolean isMandatory() {
|
90
|
return mandatory;
|
91
|
}
|
92
|
|
93
|
public void setMandatory(boolean mandatory) {
|
94
|
this.mandatory = mandatory;
|
95
|
}
|
96
|
|
97
|
public boolean isFor_cris() {
|
98
|
return for_cris;
|
99
|
}
|
100
|
|
101
|
public void setFor_cris(boolean for_cris) {
|
102
|
this.for_cris = for_cris;
|
103
|
}
|
104
|
|
105
|
public int getWeight() {
|
106
|
return weight;
|
107
|
}
|
108
|
|
109
|
public void setWeight(int weight) {
|
110
|
this.weight = weight;
|
111
|
}
|
112
|
|
113
|
public String getProvider_information() {
|
114
|
return provider_information;
|
115
|
}
|
116
|
|
117
|
public void setProvider_information(String provider_information) {
|
118
|
this.provider_information = provider_information;
|
119
|
}
|
120
|
|
121
|
public String getJob_type() {
|
122
|
return job_type;
|
123
|
}
|
124
|
|
125
|
public void setJob_type(String job_type) {
|
126
|
this.job_type = job_type;
|
127
|
}
|
128
|
|
129
|
public String getEntity_type() {
|
130
|
return entity_type;
|
131
|
}
|
132
|
|
133
|
public void setEntity_type(String entity_type) {
|
134
|
this.entity_type = entity_type;
|
135
|
}
|
136
|
|
137
|
}
|