public interface IRuleSetDeclaration extends INRLAstNode
The semantics of a rule set is such that the precondition is evaluated first. If the precondition evaluates to true, the rules in the rule set are executed, otherwise they are not executed. If there is no precondition, the rule set always executes.
The precondition of a rule set is evaluated relative to a context, the same way that a rule is evaluated relative to a context. For example:
RuleSet "old trades"
Applies if Trade has a tradedate before '2005-02-17'
In this example, all rules in the NRL file following the rule set declaration (but before the next rule set declaration) are executed only if in the input data, the context (Trade) fulfils the constraint.
NEWLINE| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Return the rule set identifier.
|
IConstraint |
getPreconditionConstraint()
Return the precondition constraint, if there is one.
|
IModelElement |
getPreconditionContext()
Return the precondition context, if there is one.
|
List<IRuleDeclaration> |
getRules()
Return the rules in this rule set.
|
accept, dump, getColumn, getLine, getUserData, setUserDataString getId()
IModelElement getPreconditionContext()
getPreconditionConstraint() will too.IConstraint getPreconditionConstraint()
getPreconditionContext() will return a value
too.List<IRuleDeclaration> getRules()
IRuleDeclaration objects. This can only be called once the AST
has been fully resolved.Copyright © 2006-2013. All Rights Reserved.