org.drools.reteoo.builder
Class PatternBuilder
java.lang.Object
org.drools.reteoo.builder.PatternBuilder
- All Implemented Interfaces:
- ReteooComponentBuilder
public class PatternBuilder
- extends Object
- implements ReteooComponentBuilder
A builder for patterns
|
Method Summary |
void |
attachAlphaNodes(BuildContext context,
BuildUtils utils,
Pattern pattern,
List<AlphaNodeFieldConstraint> alphaConstraints)
|
static ObjectTypeNode |
attachObjectTypeNode(BuildContext context,
ObjectType objectType)
|
void |
build(BuildContext context,
BuildUtils utils,
RuleConditionElement rce)
Builds and attach if needed the given RuleConditionalElement |
protected void |
buildAlphaNodeChain(BuildContext context,
BuildUtils utils,
Pattern pattern,
List<AlphaNodeFieldConstraint> alphaConstraints)
|
protected void |
linkAlphaConstraint(AlphaNodeFieldConstraint constraint,
List<AlphaNodeFieldConstraint> alphaConstraints)
|
protected void |
linkBetaConstraint(BetaNodeFieldConstraint constraint,
List<BetaNodeFieldConstraint> betaConstraints)
|
boolean |
requiresLeftActivation(BuildUtils utils,
RuleConditionElement rce)
A boolean function that indicates if the builder requires a previous left
(tuple) activation in order to corretly build the given component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatternBuilder
public PatternBuilder()
build
public void build(BuildContext context,
BuildUtils utils,
RuleConditionElement rce)
- Description copied from interface:
ReteooComponentBuilder
- Builds and attach if needed the given RuleConditionalElement
- Specified by:
build in interface ReteooComponentBuilder
- Parameters:
context - current build context
linkBetaConstraint
protected void linkBetaConstraint(BetaNodeFieldConstraint constraint,
List<BetaNodeFieldConstraint> betaConstraints)
linkAlphaConstraint
protected void linkAlphaConstraint(AlphaNodeFieldConstraint constraint,
List<AlphaNodeFieldConstraint> alphaConstraints)
attachObjectTypeNode
public static ObjectTypeNode attachObjectTypeNode(BuildContext context,
ObjectType objectType)
attachAlphaNodes
public void attachAlphaNodes(BuildContext context,
BuildUtils utils,
Pattern pattern,
List<AlphaNodeFieldConstraint> alphaConstraints)
throws InvalidPatternException
- Throws:
InvalidPatternException
buildAlphaNodeChain
protected void buildAlphaNodeChain(BuildContext context,
BuildUtils utils,
Pattern pattern,
List<AlphaNodeFieldConstraint> alphaConstraints)
requiresLeftActivation
public boolean requiresLeftActivation(BuildUtils utils,
RuleConditionElement rce)
- Description copied from interface:
ReteooComponentBuilder
- A boolean function that indicates if the builder requires a previous left
(tuple) activation in order to corretly build the given component.
In other words, if it returns true and no previous TupleSource is already created,
an InitialFact pattern must be added with appropriate left input adapter for
the network to be correctly built.
For instance, NOT / EXISTS / ACCUMULATE are examples of builders that must return true
for this method, while PATTERN must return false.
- Specified by:
requiresLeftActivation in interface ReteooComponentBuilder
rce - the element to be built
- Returns:
- true if a tuple source is required, false otherwise.
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.