public class BatchTransformationRule<MATCH extends IPatternMatch,MATCHER extends ViatraQueryMatcher<MATCH>> extends java.lang.Object implements ITransformationRule<MATCH,MATCHER>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
ruleName |
static ActivationLifeCycle |
STATEFUL_RULE_LIFECYCLE
Lifecycle for a rule that stores the list of fired activations; thus effectively forbids re-firing the same
activation.
|
static ActivationLifeCycle |
STATELESS_RULE_LIFECYCLE
Lifecycle for a rule that does not store the list of fired activations; thus allows re-firing the same activation
again.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BatchTransformationRule() |
|
BatchTransformationRule(BatchTransformationRule<MATCH,MATCHER> rule,
EventFilter<MATCH> filter) |
|
BatchTransformationRule(java.lang.String rulename,
IQuerySpecification<MATCHER> matcher,
ActivationLifeCycle lifecycle,
java.util.function.Consumer<MATCH> action) |
|
BatchTransformationRule(java.lang.String rulename,
IQuerySpecification<MATCHER> matcher,
ActivationLifeCycle lifecycle,
java.util.function.Consumer<MATCH> action,
EventFilter<? super MATCH> filter) |
| Modifier and Type | Method and Description |
|---|---|
java.util.function.Consumer<MATCH> |
getAction()
Return a
Consumer representing the model manipulation executed by the rule. |
EventFilter<? super MATCH> |
getFilter()
Returns the event filter set up for this rule; if no specific filter is
set up, an dedicated empty filter is returned
|
java.lang.String |
getName() |
IQuerySpecification<MATCHER> |
getPrecondition()
Returns the query specification representing the pattern used as a precondition.
|
RuleSpecification<MATCH> |
getRuleSpecification()
Returns a RuleSpecification that can be added to a rule engine.
|
boolean |
registerRule(RuleEngine engine)
Registers the current transformation rule over a rule engine
|
boolean |
unregisterRule(RuleEngine engine)
Removes the current transformation rule from a rule engine
|
public static final ActivationLifeCycle STATELESS_RULE_LIFECYCLE
public static final ActivationLifeCycle STATEFUL_RULE_LIFECYCLE
protected java.lang.String ruleName
protected BatchTransformationRule()
public BatchTransformationRule(java.lang.String rulename,
IQuerySpecification<MATCHER> matcher,
ActivationLifeCycle lifecycle,
java.util.function.Consumer<MATCH> action)
public BatchTransformationRule(java.lang.String rulename,
IQuerySpecification<MATCHER> matcher,
ActivationLifeCycle lifecycle,
java.util.function.Consumer<MATCH> action,
EventFilter<? super MATCH> filter)
public BatchTransformationRule(BatchTransformationRule<MATCH,MATCHER> rule, EventFilter<MATCH> filter)
public java.lang.String getName()
getName in interface ITransformationRule<MATCH extends IPatternMatch,MATCHER extends ViatraQueryMatcher<MATCH>>public RuleSpecification<MATCH> getRuleSpecification()
getRuleSpecification in interface ITransformationRule<MATCH extends IPatternMatch,MATCHER extends ViatraQueryMatcher<MATCH>>public IQuerySpecification<MATCHER> getPrecondition()
getPrecondition in interface ITransformationRule<MATCH extends IPatternMatch,MATCHER extends ViatraQueryMatcher<MATCH>>public java.util.function.Consumer<MATCH> getAction()
Consumer representing the model manipulation executed by the rule.public EventFilter<? super MATCH> getFilter()
ITransformationRulegetFilter in interface ITransformationRule<MATCH extends IPatternMatch,MATCHER extends ViatraQueryMatcher<MATCH>>public boolean registerRule(RuleEngine engine)
public boolean unregisterRule(RuleEngine engine)