|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.reteoo.Builder
Builds the Rete-OO network for a RuleSet
.
RuleSet
Constructor Summary | |
Builder()
Construct a Builder against an existing Rete
network. |
Method Summary | |
protected void |
addRule(Rule rule)
Add a Rule to the network. |
void |
addRuleSet(RuleSet ruleSet)
Add a RuleSet to the network. |
(package private) void |
attachConditions(Rule rule,
List conds,
List leafNodes)
Create and attach Condition s to the network. |
RuleBase |
buildRuleBase()
Build the RuleBase . |
(package private) List |
createParameterNodes(Rule rule)
Create the ParameterNode s for the Rule ,
and link into the network. |
(package private) TupleSource |
findMatchingTupleSourceForCondition(Condition condition,
List sources)
Locate a TupleSource suitable for attaching the
Condition . |
(package private) boolean |
matches(Condition condition,
Set declarations)
Determine if a set of Declarations match those required by
a Condition . |
void |
setConflictResolver(ConflictResolver conflictResolver)
Set the ConflictResolver . |
void |
setFactHandleFactory(FactHandleFactory factHandleFactory)
Set the FactHandleFactory . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Builder()
Builder
against an existing Rete
network.
Method Detail |
public RuleBase buildRuleBase()
RuleBase
.
public void setFactHandleFactory(FactHandleFactory factHandleFactory)
FactHandleFactory
.
factHandleFactory
- The fact handle factory.public void setConflictResolver(ConflictResolver conflictResolver)
ConflictResolver
.
conflictResolver
- The conflict resolver.public void addRuleSet(RuleSet ruleSet) throws RuleIntegrationException, RuleSetIntegrationException
RuleSet
to the network.
ruleSet
- The rule-set to add.
RuleIntegrationException
- if an error prevents complete construction of the network for
the Rule
.
RuleSetIntegrationException
protected void addRule(Rule rule) throws RuleIntegrationException
Rule
to the network.
rule
- The rule to add.
RuleIntegrationException
- if an error prevents complete construction of the network for
the Rule
.List createParameterNodes(Rule rule)
ParameterNode
s for the Rule
,
and link into the network.
rule
- The rule.
Set
of ParameterNodes
created and
linked into the network.void attachConditions(Rule rule, List conds, List leafNodes)
Condition
s to the network.
It may not be possible to satisfy all filder conditions on the first
pass. This method removes satisfied conditions from the
Condition
parameter, and leaves unsatisfied ones in the
Set
.
rule
- The rule.conds
- Set of Conditions
to attempt attaching.leafNodes
- The leaf node.TupleSource findMatchingTupleSourceForCondition(Condition condition, List sources)
TupleSource
suitable for attaching the
Condition
.
condition
- The Condition
to attach.sources
- Candidate TupleSources
.
TupleSource
if a suitable one can be
found, else null
.boolean matches(Condition condition, Set declarations)
Declarations
match those required by
a Condition
.
condition
- The Condition
.declarations
- The set of Declarations
to compare against.
true
if the set of Declarations
is
a super-set of the Declarations
required by the
Condition
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |