public class FastRulesBuilder
extends com.exalead.gni.GNIObject
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
Constructor and Description |
---|
FastRulesBuilder()
Initialize a new FastRulesBuilder for checking rules syntax
|
FastRulesBuilder(MOTPipeInterface pipe)
Initialize a new FastRulesBuilder with a MOT pipe
|
Modifier and Type | Method and Description |
---|---|
void |
addDateFormat(java.lang.String format) |
void |
addRule(java.lang.String name,
java.lang.String catValue,
boolean exceptionRule,
java.lang.String lang) |
boolean |
checkRuleSyntax(java.lang.String rule)
Check a rule syntax
|
boolean |
compile(FastRulesDefinition def,
java.lang.String outputDir)
Compile a set of rules to a binary format
|
boolean |
compile(java.lang.String outputDir)
Compile a set of rules to a binary format
|
protected boolean |
compileNative(java.lang.String outputDir) |
int |
compileValidRules(FastRulesDefinition def,
java.lang.String outputDir)
Compiles a set of rules to a binary format.
|
protected void |
finalize() |
java.lang.String |
getErrorMessage() |
protected void |
init(MOTPipeInterface pipe) |
protected void |
initForSyntaxCheck() |
void |
loadFromDefinition(FastRulesDefinition def) |
int |
loadFromDefinitionIgnoringInvalidRules(FastRulesDefinition def) |
void |
loadFromXML(java.lang.String inputPath) |
void |
setCategory(java.lang.String catName) |
protected java.lang.String |
testCompile() |
java.lang.String |
testRule(java.lang.String rule)
Compile a rule and returned the parse tree
|
public FastRulesBuilder(MOTPipeInterface pipe)
pipe
- The pipe used during rules compilationpublic FastRulesBuilder()
public boolean checkRuleSyntax(java.lang.String rule)
rule
- public void loadFromXML(java.lang.String inputPath) throws java.lang.Exception
java.lang.Exception
public void loadFromDefinition(FastRulesDefinition def) throws InvalidFastRuleException
InvalidFastRuleException
public int loadFromDefinitionIgnoringInvalidRules(FastRulesDefinition def)
public boolean compile(FastRulesDefinition def, java.lang.String outputDir) throws InvalidFastRuleException
def
- The source rulesoutputDir
- path to the target directory for binariesInvalidFastRuleException
public int compileValidRules(FastRulesDefinition def, java.lang.String outputDir)
def
- The source rulesoutputDir
- path to the target directory for binariespublic boolean compile(java.lang.String outputDir)
outputDir
- path to the target directory for binariespublic java.lang.String getErrorMessage()
public java.lang.String testRule(java.lang.String rule)
rule
- the XML representation of a rulepublic void addDateFormat(java.lang.String format)
public void addRule(java.lang.String name, java.lang.String catValue, boolean exceptionRule, java.lang.String lang)
public void setCategory(java.lang.String catName)
protected boolean compileNative(java.lang.String outputDir)
protected java.lang.String testCompile()
protected void init(MOTPipeInterface pipe)
protected void initForSyntaxCheck()
protected void finalize()
finalize
in class java.lang.Object
Copyright © 2013 Dassault Systèmes, All Rights Reserved.