Package org.drools.ancompiler
Class ObjectTypeNodeParser
- java.lang.Object
-
- org.drools.ancompiler.ObjectTypeNodeParser
-
public class ObjectTypeNodeParser extends Object
This class is used for reading anObjectTypeNodeusing callbacks. The user defines a number of callback methods in aNetworkHandlerthat will be called when events occur during parsing. The events include :- ObjectTypeNode
- Non-hashed and hashed AlphaNodes
- BetaNodes
- LeftInputAdapterNodes
Events are fired when each of these network features are encountered, and again when the end of them is encountered. OTN parsing is unidirectional; previously parsed data cannot be re-read without starting the parsing operation again.
-
-
Constructor Summary
Constructors Constructor Description ObjectTypeNodeParser(org.drools.core.reteoo.ObjectTypeNode objectTypeNode)Creates a new parser for the specified ObjectTypeNode
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(NetworkHandler handler)Parse theobjectTypeNode.org.drools.core.rule.IndexableConstraintgetIndexableConstraint()Set<org.drools.core.rule.IndexableConstraint>getIndexableConstraints()voidsetTraverseHashedAlphaNodes(boolean traverseHashedAlphaNodes)
-
-
-
Method Detail
-
setTraverseHashedAlphaNodes
public void setTraverseHashedAlphaNodes(boolean traverseHashedAlphaNodes)
-
accept
public void accept(NetworkHandler handler)
Parse theobjectTypeNode.The application can use this method to instruct the OTN parser to begin parsing an
Once a parse is complete, an application may reuse the same Parser object, possibly with a differentObjectTypeNode.NetworkHandler.- Parameters:
handler- handler that will receieve the events generated by this parser- See Also:
NetworkHandler
-
getIndexableConstraints
public Set<org.drools.core.rule.IndexableConstraint> getIndexableConstraints()
-
getIndexableConstraint
public org.drools.core.rule.IndexableConstraint getIndexableConstraint()
-
-