|
|
|
@ -41,7 +41,7 @@ public class ExpressionAccumulation extends Expression |
|
|
|
AccumulationConstraint constraint; |
|
|
|
ExpressionRegular regexp; |
|
|
|
TemporalOperatorBound bound; |
|
|
|
ArrayList<Expression> fireOn; |
|
|
|
ArrayList<Expression> recordSet; |
|
|
|
|
|
|
|
Expression operand1 = null; |
|
|
|
Expression operand2 = null; |
|
|
|
@ -110,16 +110,27 @@ public class ExpressionAccumulation extends Expression |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public ArrayList<Expression> getFireOn() { |
|
|
|
return fireOn; |
|
|
|
public ArrayList<Expression> getRecordSet() { |
|
|
|
return recordSet; |
|
|
|
} |
|
|
|
|
|
|
|
public void setFireOn(ArrayList<Expression> fireOn) { |
|
|
|
this.fireOn = fireOn; |
|
|
|
public void setRecordSet(ArrayList<Expression> fireOn) { |
|
|
|
this.recordSet = fireOn; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean hasFireOn() { |
|
|
|
return fireOn != null; |
|
|
|
public boolean hasRecordSet() { |
|
|
|
return recordSet != null; |
|
|
|
} |
|
|
|
|
|
|
|
public Expression recordSetExpression() { |
|
|
|
if(!hasRecordSet()) { return Expression.True(); } |
|
|
|
|
|
|
|
Expression ret = recordSet.get(0); |
|
|
|
for(int i=1;i<recordSet.size();i++) { |
|
|
|
ret = new ExpressionBinaryOp(ExpressionBinaryOp.OR, ret, recordSet.get(i)); |
|
|
|
} |
|
|
|
|
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean isNullary() { |
|
|
|
@ -140,8 +151,8 @@ public class ExpressionAccumulation extends Expression |
|
|
|
|
|
|
|
ret += "(" + constraint.toString() + ")"; |
|
|
|
|
|
|
|
if ( hasFireOn() ) { |
|
|
|
String fireOnString = fireOn.stream().map(f -> f.toString()).collect(Collectors.joining(",")); |
|
|
|
if ( hasRecordSet() ) { |
|
|
|
String fireOnString = recordSet.stream().map(f -> f.toString()).collect(Collectors.joining(",")); |
|
|
|
ret += "(" + fireOnString + ")"; |
|
|
|
} |
|
|
|
|
|
|
|
@ -186,10 +197,10 @@ public class ExpressionAccumulation extends Expression |
|
|
|
if ( this.hasRegularExpression() ) { |
|
|
|
ret.setRegularExpression((ExpressionRegular) this.getRegularExpression().deepCopy()); |
|
|
|
} |
|
|
|
if ( this.hasFireOn() ) { |
|
|
|
ret.setFireOn(new ArrayList<Expression>(this.getFireOn().size())); |
|
|
|
for(Expression e : this.getFireOn()) { |
|
|
|
ret.fireOn.add(e.deepCopy()); |
|
|
|
if ( this.hasRecordSet() ) { |
|
|
|
ret.setRecordSet(new ArrayList<Expression>(this.getRecordSet().size())); |
|
|
|
for(Expression e : this.getRecordSet()) { |
|
|
|
ret.recordSet.add(e.deepCopy()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|