1
|
package eu.dnetlib.data.collective.transformation.rulelanguage;
|
2
|
|
3
|
/**
|
4
|
* @author jochen
|
5
|
*
|
6
|
*/
|
7
|
public class Condition {
|
8
|
|
9
|
private String applyExpression;
|
10
|
private String conditionExpression;
|
11
|
private Rules primaryRule;
|
12
|
private Rules secondaryRule;
|
13
|
|
14
|
/**
|
15
|
* @param applyExpression the applyExpression to set
|
16
|
*/
|
17
|
public void setApplyExpression(String applyExpression) {
|
18
|
this.applyExpression = applyExpression;
|
19
|
}
|
20
|
|
21
|
/**
|
22
|
* @return the applyExpression
|
23
|
*/
|
24
|
public String getApplyExpression() {
|
25
|
return applyExpression;
|
26
|
}
|
27
|
|
28
|
/**
|
29
|
* @param conditionExpression the conditionExpression to set
|
30
|
*/
|
31
|
public void setConditionExpression(String conditionExpression) {
|
32
|
this.conditionExpression = conditionExpression;
|
33
|
}
|
34
|
|
35
|
/**
|
36
|
* @return the conditionExpression
|
37
|
*/
|
38
|
public String getConditionExpression() {
|
39
|
return conditionExpression;
|
40
|
}
|
41
|
|
42
|
public boolean isPrimary(Rules aRule){
|
43
|
if (aRule.equals(primaryRule)) return true;
|
44
|
return false;
|
45
|
}
|
46
|
|
47
|
/**
|
48
|
* @param primaryRule the primaryRule to set
|
49
|
*/
|
50
|
public void setPrimaryRule(Rules primaryRule) {
|
51
|
this.primaryRule = primaryRule;
|
52
|
}
|
53
|
|
54
|
/**
|
55
|
* @return the primaryRule
|
56
|
*/
|
57
|
public Rules getPrimaryRule() {
|
58
|
return primaryRule;
|
59
|
}
|
60
|
|
61
|
/**
|
62
|
* @param secondaryRule the secondaryRule to set
|
63
|
*/
|
64
|
public void setSecondaryRule(Rules secondaryRule) {
|
65
|
this.secondaryRule = secondaryRule;
|
66
|
}
|
67
|
|
68
|
/**
|
69
|
* @return the secondaryRule
|
70
|
*/
|
71
|
public Rules getSecondaryRule() {
|
72
|
return secondaryRule;
|
73
|
}
|
74
|
|
75
|
|
76
|
}
|