Package org.yamcs.xtce
Class ConditionParser
- java.lang.Object
-
- org.yamcs.xtce.ConditionParser
-
public class ConditionParser extends Object
used by the SpreadsheetLoader to parse conditions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ConditionParser.ParameterReferenceFactory
-
Constructor Summary
Constructors Constructor Description ConditionParser(ConditionParser.ParameterReferenceFactory prefFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanExpression
parseBooleanExpression(String rawExpression)
Boolean expression has the following pattern: op(epx1;exp2;...MatchCriteria
parseMatchCriteria(String criteriaString)
Comparison
toComparison(String comparisonString)
-
-
-
Constructor Detail
-
ConditionParser
public ConditionParser(ConditionParser.ParameterReferenceFactory prefFactory)
-
-
Method Detail
-
parseMatchCriteria
public MatchCriteria parseMatchCriteria(String criteriaString) throws ParseException
- Throws:
ParseException
-
parseBooleanExpression
public BooleanExpression parseBooleanExpression(String rawExpression) throws ParseException
Boolean expression has the following pattern: op(epx1;exp2;...;expn) op is & (AND) or | (OR) expi are boolean expression or condition A condition is defined as: parametername op value value can be - plain value - quoted with " or ”. The two quote characters can be used interchangeably . Backslash can be use to escape those double quote. - $other_parametername parametername can be suffixed with .raw Top level expression can be in the form epx1;exp2;...;expn which will be transformed into &(epx1;exp2;...;expn) for compatibility with the previously implemented Comparison- Parameters:
rawExpression
-- Returns:
- Throws:
ParseException
-
toComparison
public Comparison toComparison(String comparisonString) throws ParseException
- Throws:
ParseException
-
-