public final class DroolsUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
DroolsUtil()
Prevent instances of this utility class.
|
Modifier and Type | Method and Description |
---|---|
static org.drools.KnowledgeBase |
getDefaultKnowledgeBase()
Loads and returns the current default
KnowledgeBase . |
static org.drools.KnowledgeBase |
getKnowledgeBase()
Creates and returns an empty
KnowledgeBase . |
static org.drools.builder.KnowledgeBuilder |
getKnowledgeBuilder(org.drools.io.Resource resource)
Creates an returns a new
KnowledgeBuilder based on a supplied Resource . |
static org.drools.builder.KnowledgeBuilder |
getKnowledgeBuilderFromFile(java.lang.String file)
Creates a new
KnowledgeBuilder based on a supplied file by using getKnowledgeBuilder(Resource) . |
static org.drools.builder.KnowledgeBuilder |
getKnowledgeBuilderFromString(java.lang.String rule)
Creates a new
KnowledgeBuilder based on a supplied rule by using getKnowledgeBuilder(Resource) . |
static org.drools.KnowledgeBase |
getRules(java.lang.String phenotypeFile)
Creates and loads the currently defined
KnowledgeBase based on the supplied phenotype file String
by using the WorkingMemoryRuleGenerator . |
public static org.drools.KnowledgeBase getRules(java.lang.String phenotypeFile)
KnowledgeBase
based on the supplied phenotype file String
by using the WorkingMemoryRuleGenerator
.phenotypeFile
- The path to the phenotype file as String
.KnowledgeBase
.public static org.drools.KnowledgeBase getDefaultKnowledgeBase()
KnowledgeBase
. The files REASONING_ENGINE_DEFAULT_SOURCE and
REASONING_ENGINE_RULE_SOURCE will be used for creation.KnowledgeBase
.public static org.drools.KnowledgeBase getKnowledgeBase()
KnowledgeBase
.KnowledgeBase
.public static org.drools.builder.KnowledgeBuilder getKnowledgeBuilderFromFile(java.lang.String file)
KnowledgeBuilder
based on a supplied file by using getKnowledgeBuilder(Resource)
.file
- The file on which the KnowledgeBuilder
shall be based.KnowledgeBuilder
based on the supplied file.public static org.drools.builder.KnowledgeBuilder getKnowledgeBuilderFromString(java.lang.String rule)
KnowledgeBuilder
based on a supplied rule by using getKnowledgeBuilder(Resource)
.rule
- The rule on which the KnowledgeBuilder
shall be based as String
.KnowledgeBuilder
based on the supplied rule.public static org.drools.builder.KnowledgeBuilder getKnowledgeBuilder(org.drools.io.Resource resource)
KnowledgeBuilder
based on a supplied Resource
.resource
- The Resource
on which the KnowledgeBuilder
shall be based.KnowledgeBuilder
based on the supplied Resource
.