org.drools
Class RuleBaseBuilder

java.lang.Object
  |
  +--org.drools.RuleBaseBuilder

public class RuleBaseBuilder
extends java.lang.Object

Factory for constructing a RuleBase.

The RuleBaseBuilder integrates the added RuleSets into the Rete network. A RuleBaseBuilder may be re-used after building a RuleBase but it may not be used to build multiple RuleBases simultaneously by multiple threads.

Version:
$Id: RuleBaseBuilder.java,v 1.1.1.1 2003/12/30 21:18:55 bob Exp $
Author:
bob mcwhirter
See Also:
build(), RuleSet, RuleBase

Constructor Summary
RuleBaseBuilder()
          Construct.
 
Method Summary
 void addRuleSet(RuleSet ruleSet)
          Add a RuleSet.
 RuleBase build()
          Build the RuleBase.
 void setConflictResolver(ConflictResolver conflictResolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBaseBuilder

public RuleBaseBuilder()
Construct.

Method Detail

addRuleSet

public void addRuleSet(RuleSet ruleSet)
                throws RuleIntegrationException
Add a RuleSet.

Parameters:
ruleSet - The rule-set to add.
Throws:
RuleIntegrationException - If an error occurs while attempting to integrate the rules into the Rete network..

build

public RuleBase build()
Build the RuleBase.

Builds the RuleBase based upon all previously added RuleSets.

Returns:
The new rule-base.
See Also:
addRuleSet(org.drools.rule.RuleSet)

setConflictResolver

public void setConflictResolver(ConflictResolver conflictResolver)