|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRuleSetDeclaration
A rule set is a named collection of rules, with an optional precondition attached to the execution of the rules.
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.
Field Summary |
---|
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode |
---|
NEWLINE |
Method Summary | |
---|---|
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. |
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode |
---|
accept, dump, getColumn, getLine, getUserData, setUserData |
Method Detail |
---|
String 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |