|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.ibm.able.rules.AbleARMLParser
This class will read an XML document written according to the RuleSet.xsd schema, and instantiate an AbleRuleSet object.
| Field Summary | |
|---|---|
protected boolean |
inRuleBlockHeader
|
protected boolean |
inTagPredicateRuleBody
|
protected boolean |
inTreeSharedCondition
|
protected double |
myAlphaCut
|
protected java.util.Vector |
myAntClauses
|
protected AbleExpression |
myAntExpression
|
protected java.util.Vector |
myAntExpressionList
|
protected AbleARLParser |
myARLParser
|
protected AbleAssertionClause |
myAstClause
|
protected AbleExpression |
myBooleanExpression
|
protected AbleConsequentClause |
myCnsClause
|
protected java.lang.String |
myComment
|
protected AbleVariable |
myDclVariable
|
protected AbleTree |
myDecisionTree
|
protected java.util.Vector |
myDoList
|
protected java.util.Vector |
myElseList
|
protected java.lang.String |
myEngineType
|
protected AbleRd |
myExpression
|
protected java.util.Stack |
myExpressionStack
|
protected java.util.Vector |
myForInitExprList
|
protected java.util.Vector |
myForIterExprList
|
protected java.util.Vector |
myFormalParameterList
|
protected java.lang.String |
myFormalSignature
|
protected AbleExpression |
myForTestExpr
|
protected AbleFuzzyVariable |
myFuzzyVariable
|
protected java.lang.String |
myImportLibName
|
protected AbleARLLexer |
myLexer
|
protected antlr.LexerSharedInputState |
myLexerState
|
protected org.xml.sax.Locator |
myLocator
|
protected AbleExpression |
myLogicalExpression
|
protected java.util.Vector |
myPlanEffectsList
|
protected java.util.Vector |
myPlanExpansionList
|
protected AbleExpression |
myPlanPrecondition
|
protected java.util.Vector |
myPredClauses
|
protected AblePredicate |
myPredLhs
|
protected java.util.Stack |
myPropertyStack
|
protected java.io.StringReader |
myReader
|
protected AbleRule |
myRule
|
protected double |
myRuleAntWeight
|
protected AbleRuleBlock |
myRuleBlock
|
protected java.lang.String |
myRuleBlockComment
|
protected java.lang.String |
myRuleBlockInferenceEngine
|
protected java.lang.String |
myRuleBlockName
|
protected java.lang.String |
myRuleBlockReturnType
|
protected AbleRd |
myRuleCns
|
protected java.lang.String |
myRuleHedges
|
protected java.lang.String |
myRuleLabel
|
protected java.lang.Object[] |
myRulePreConditions
|
protected AbleRd |
myRulePriority
|
protected java.util.Hashtable |
myRuleProperties
|
protected boolean |
myRuleReplacementMode
|
protected AbleRuleSet |
myRuleSet
|
protected java.lang.String |
myRuleSetName
|
protected java.lang.String |
mySource
|
protected boolean |
myStopOnParException
|
protected AbleSwitchStatement |
mySwitchStatement
|
protected boolean |
myTemplateFlag
|
protected java.lang.String |
myTempString
|
protected java.lang.StringBuffer |
myTempStringBuf
|
protected java.util.Vector |
myThenList
|
protected AbleLogger |
myTracer
|
protected AbleTreeActionNode |
myTreeActionNode
|
protected AbleTreeConditionNode |
myTreeConditionNode
|
protected AbleTreeEdge |
myTreeEdge
|
protected java.util.Stack |
myTreeStack
|
protected AbleTreePartialExpression |
myTreeTerm
|
protected java.lang.String |
myTreeTermRef
|
protected AbleTreePartialExpression |
myTreeValue
|
protected java.lang.String |
myTreeValueRef
|
protected java.util.Vector |
myTreeValues
|
protected java.lang.String |
myUserDefinedFunctionName
|
protected java.lang.String |
myUserTypeClass
|
protected java.lang.String |
myUserTypeName
|
protected java.lang.String |
myVariableClassName
|
protected double |
myVariableContinuousHi
|
protected double |
myVariableContinuousLo
|
protected int |
myVariableLength
|
protected java.lang.String |
myVariableName
|
protected boolean |
myVariableStaticFlag
|
protected java.lang.String |
myVariableType
|
protected AbleRd |
myVarInitializer
|
protected java.util.Vector |
myVarInitializerArgs
|
protected boolean |
myVarInitializerFlag
|
protected boolean |
myVarIsLocal
|
protected boolean |
myWdSelPosFlag
|
protected AbleVariable |
myWdSelVariable
|
protected java.lang.String |
myWdSelVarName
|
protected java.lang.String |
myWdSelVarType
|
protected java.util.Vector |
myWdWhenList
|
| Constructor Summary | |
|---|---|
AbleARMLParser()
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int end)
|
void |
endElement(java.lang.String theUri,
java.lang.String theLocalName,
java.lang.String theRawName)
|
void |
error(org.xml.sax.SAXParseException theSAXParseException)
|
void |
fatalError(org.xml.sax.SAXParseException theSAXParseException)
|
AbleRd |
instantiateExpressionFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource)
Instantiate an AbleRd object (a Literal, Variable, or Expression) by reading an input String containing ABLE Rule Language text source. |
void |
instantiateFrom(org.xml.sax.InputSource theRuleSetSource,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
Parse an XML ruleset with Sax InputSource as source object |
void |
instantiateFrom(java.io.InputStream theRuleSetInputStream,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
Parse an XML ruleset, with InputStream as source object |
void |
instantiateFrom(java.io.Reader theRuleSetReader,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
Parse an XML ruleset with a Reader as source object |
void |
instantiateFrom(java.lang.String theRuleSetDocument,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
Parse a XML ruleset with URI as source |
AbleRuleBlock |
instantiateRuleBlockFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource)
Instantiate a complete ruleblock object by reading an input String containing ABLE Rule Language XML source. |
AbleRule |
instantiateRuleFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource,
java.lang.String theRuleBlockName,
boolean theReplacementMode)
Instantiate a complete rule object by reading an input String containing ABLE Rule Language text source. |
boolean |
isStopOnParException()
|
boolean |
isTraceActive()
|
AbleExpression |
parseActionFromARL(java.lang.String theArlSource)
Parse and instantiate an Able action object (Expression or statement) by reading an input String containing ABLE Rule Language text source. |
AbleExpression |
parseExpressionFromARL(java.lang.String theArlSource)
Parse and instantiate an AbleRd object (a Literal, Variable, or Expression) by reading an input String containing ABLE Rule Language text source. |
void |
setDocumentLocator(org.xml.sax.Locator theLocator)
|
void |
setStopOnParException(boolean theStopOnParExceptionFlag)
|
void |
setTraceActive(boolean theTraceValue)
|
void |
startElement(java.lang.String theUri,
java.lang.String theLocalName,
java.lang.String theRawName,
org.xml.sax.Attributes theAttributes)
|
AbleRd |
testParseExpressionFromARL(AbleRuleSet theRuleSet,
java.lang.String theSource)
|
void |
warning(org.xml.sax.SAXParseException theSAXParseException)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.xml.sax.Locator myLocator
protected AbleRuleSet myRuleSet
protected AbleLogger myTracer
protected boolean myStopOnParException
protected java.lang.String myRuleSetName
protected java.lang.String myComment
protected boolean myTemplateFlag
protected double myAlphaCut
protected java.lang.String myEngineType
protected java.lang.String myImportLibName
protected java.lang.String myUserTypeName
protected java.lang.String myUserTypeClass
protected java.lang.String myVariableName
protected boolean myVarIsLocal
protected AbleVariable myDclVariable
protected boolean myVarInitializerFlag
protected AbleRd myVarInitializer
protected java.util.Vector myVarInitializerArgs
protected double myVariableContinuousLo
protected double myVariableContinuousHi
protected int myVariableLength
protected boolean myVariableStaticFlag
protected java.lang.String myVariableType
protected java.lang.String myVariableClassName
protected java.lang.String myUserDefinedFunctionName
protected AbleFuzzyVariable myFuzzyVariable
protected java.lang.String myTempString
protected java.lang.StringBuffer myTempStringBuf
protected java.lang.String myRuleBlockName
protected AbleRuleBlock myRuleBlock
protected java.lang.String myRuleBlockReturnType
protected java.lang.String myFormalSignature
protected double myRuleAntWeight
protected java.lang.String myRuleHedges
protected java.lang.String myRuleLabel
protected AbleRule myRule
protected java.lang.Object[] myRulePreConditions
protected boolean myRuleReplacementMode
protected boolean inRuleBlockHeader
protected java.lang.String myRuleBlockInferenceEngine
protected java.lang.String myRuleBlockComment
protected java.util.Vector myAntClauses
protected java.util.Vector myAntExpressionList
protected AbleExpression myAntExpression
protected AbleRd myRulePriority
protected AbleRd myExpression
protected java.util.Stack myExpressionStack
protected AbleExpression myBooleanExpression
protected AbleExpression myLogicalExpression
protected AbleRd myRuleCns
protected AbleAssertionClause myAstClause
protected AbleConsequentClause myCnsClause
protected java.util.Vector myThenList
protected java.util.Vector myElseList
protected java.util.Vector myWdWhenList
protected java.lang.String myWdSelVarName
protected java.lang.String myWdSelVarType
protected boolean myWdSelPosFlag
protected AbleVariable myWdSelVariable
protected AblePredicate myPredLhs
protected java.util.Vector myPredClauses
protected java.util.Vector myDoList
protected java.util.Vector myForInitExprList
protected AbleExpression myForTestExpr
protected java.util.Vector myForIterExprList
protected AbleExpression myPlanPrecondition
protected java.util.Vector myFormalParameterList
protected java.util.Vector myPlanEffectsList
protected java.util.Vector myPlanExpansionList
protected AbleSwitchStatement mySwitchStatement
protected AbleTree myDecisionTree
protected AbleTreePartialExpression myTreeTerm
protected java.lang.String myTreeTermRef
protected java.util.Vector myTreeValues
protected AbleTreePartialExpression myTreeValue
protected java.lang.String myTreeValueRef
protected boolean inTreeSharedCondition
protected AbleTreeActionNode myTreeActionNode
protected AbleTreeConditionNode myTreeConditionNode
protected java.util.Stack myTreeStack
protected AbleTreeEdge myTreeEdge
protected java.util.Hashtable myRuleProperties
protected java.util.Stack myPropertyStack
protected boolean inTagPredicateRuleBody
protected transient java.lang.String mySource
protected transient java.io.StringReader myReader
protected transient AbleARLLexer myLexer
protected transient AbleARLParser myARLParser
protected transient antlr.LexerSharedInputState myLexerState
| Constructor Detail |
public AbleARMLParser()
| Method Detail |
public void setDocumentLocator(org.xml.sax.Locator theLocator)
public void startElement(java.lang.String theUri,
java.lang.String theLocalName,
java.lang.String theRawName,
org.xml.sax.Attributes theAttributes)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String theUri,
java.lang.String theLocalName,
java.lang.String theRawName)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void characters(char[] ch,
int start,
int end)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic void error(org.xml.sax.SAXParseException theSAXParseException)
public void fatalError(org.xml.sax.SAXParseException theSAXParseException)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic void warning(org.xml.sax.SAXParseException theSAXParseException)
public void instantiateFrom(java.lang.String theRuleSetDocument,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
throws AbleParException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException
AbleParException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
public void instantiateFrom(java.io.Reader theRuleSetReader,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
throws AbleParException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException
AbleParException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
public void instantiateFrom(org.xml.sax.InputSource theRuleSetSource,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
throws AbleParException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException
AbleParException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
public void instantiateFrom(java.io.InputStream theRuleSetInputStream,
AbleRuleSet theRuleSet,
AbleLogger theTracer,
boolean theStopOnParExceptionFlag)
throws AbleParException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException
AbleParException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
public AbleRuleBlock instantiateRuleBlockFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource)
throws AbleParException
Note that the ruleblock is compiled using this ruleset object as the context, so all data types, variables, ruleblocks and rules which are referenced in the arlSource must have been already added to this ruleset.
theRuleSet - The ruleset object which serves as contexttheArmlSource - The source from which a ruleblock is compiled and added to
this ruleset object.
AbleParException - On any error.
antlr.RecognitionException - If the ruleblock cannot be parsed successfully.
public AbleRule instantiateRuleFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource,
java.lang.String theRuleBlockName,
boolean theReplacementMode)
throws AbleParException
Note that the rule is compiled using this ruleset object and the specfied ruleblock as the context, so all data types, variables, ruleblocks and rules which are referenced in the arlSource must have been already added to this ruleset.
theRuleSet - The ruleset object which serves as contexttheArmlSource - The source from which a rule is compiled and added to
this ruleset object.
theRuleBlockName - The name of the ruleblock to which this rule will be added.
theReplacementMode - A boolean true value if the rule is to replace an existing rule or
false if it is to be added as a new rule to the ruleset.
AbleParException - On any error.
antlr.RecognitionException - If the ruleblock cannot be parsed successfully.
public AbleRd instantiateExpressionFrom(AbleRuleSet theRuleSet,
java.lang.String theArmlSource)
throws AbleParException
This method is intended to be used to construct pieces of AbleRules, and is the preferred way of doing this.
Note that the AbleRd object is compiled using this ruleset object as the context, so all data types, variables, ruleblocks and rules which are referenced in the arlSource must have been already added to this ruleset.
theRuleSet - The ruleset object that serves as context.theArmlSource - The source from which a ruleblock is compiled and added to
this ruleset object.
AbleParException - On any error.
antlr.RecognitionException - If the ruleblock cannot be parsed successfully.
public AbleExpression parseExpressionFromARL(java.lang.String theArlSource)
throws AbleException
This method is intended to be used to construct pieces of AbleRules, and is the preferred way of doing this.
theArlSource - The source from which a ruleblock is compiled and added to
this ruleset object.
AbleParException - On any error.
AbleException
public AbleRd testParseExpressionFromARL(AbleRuleSet theRuleSet,
java.lang.String theSource)
throws AbleException
AbleException
public AbleExpression parseActionFromARL(java.lang.String theArlSource)
throws AbleException
This method is intended to be used to construct pieces of AbleRules, and is the preferred way of doing this.
theArlSource - The source from which a ruleblock is compiled and added to
this ruleset object.
AbleParException - On any error.
AbleExceptionpublic void setTraceActive(boolean theTraceValue)
public boolean isTraceActive()
public void setStopOnParException(boolean theStopOnParExceptionFlag)
public boolean isStopOnParException()
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||