public class BuildContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
alpha
Flag indicating if the builder is currently creating alpha nodes.
|
protected INode |
lastanode
The last alpha node.
|
protected INode |
lastbnode
The last beta node.
|
protected boolean |
rightunavailable
Flag indicating that no right input is available (for collect nodes).
|
protected ReteNode |
root
The root node.
|
protected IRule |
rule
The currently built rule.
|
protected int |
tuplecnt
The tuple cnt.
|
protected java.util.Map |
varinfos
The first variable occurrence.
|
Constructor and Description |
---|
BuildContext(ReteNode root,
IRule rule)
Create a new build context.
|
Modifier and Type | Method and Description |
---|---|
void |
addVarInfo(VarInfo vi)
Add a new var info.
|
INode |
getLastAlphaNode()
Get the lastnode.
|
INode |
getLastBetaNode()
Get the lastnode.
|
ReteNode |
getRootNode()
Get the root.
|
IRule |
getRule()
Get the rule.
|
int |
getTupleCount()
Get the tuple count.
|
VarInfo |
getVarInfo(Variable var)
Get the variable info.
|
java.util.Map |
getVarInfos()
Get the variable infos.
|
boolean |
isAlpha()
For each object condition, the builder first
creates alpha nodes for all constraints that only
apply to the object itself.
|
boolean |
isConstrainable(Variable var)
Test if a variable is constrainable (alpha node),
i.e.
|
boolean |
isJoinable(Variable var)
Test if a found variable is joinable (beta node),
i.e.
|
boolean |
isLeftAvailable(Variable var)
Test if a variable is left available.
|
boolean |
isRightUnavailable()
Get the rightunavailable.
|
void |
setAlpha(boolean alpha)
Set the alpha flag.
|
void |
setLastAlphaNode(INode lastanode)
Set the lastnode.
|
void |
setLastBetaNode(INode lastbnode)
Set the lastnode.
|
void |
setRightUnavailable(boolean rightunavailable)
Set the rightunavailable.
|
void |
setRootNode(ReteNode root)
Set the root.
|
void |
setRule(IRule rule)
Set the rule.
|
void |
setTupleCount(int tuplecnt)
Set the tuple count.
|
protected ReteNode root
protected IRule rule
protected INode lastanode
protected INode lastbnode
protected int tuplecnt
protected java.util.Map varinfos
protected boolean rightunavailable
protected boolean alpha
public ReteNode getRootNode()
public void setRootNode(ReteNode root)
root
- The root to set.public IRule getRule()
public void setRule(IRule rule)
rule
- The rule to set.public INode getLastAlphaNode()
public void setLastAlphaNode(INode lastanode)
lastnode
- The lastnode to set.public INode getLastBetaNode()
public void setLastBetaNode(INode lastbnode)
lastnode
- The lastnode to set.public int getTupleCount()
public void setTupleCount(int tuplecnt)
tuplecnt
- The tuplecnt to set.public void addVarInfo(VarInfo vi)
public VarInfo getVarInfo(Variable var)
var
- The variable.public java.util.Map getVarInfos()
public boolean isJoinable(Variable var)
var
- The variable.public boolean isConstrainable(Variable var)
var
- The variable.public boolean isLeftAvailable(Variable var)
var
- The variable.public boolean isRightUnavailable()
public void setRightUnavailable(boolean rightunavailable)
rightunavailable
- The rightunavailable to set.public boolean isAlpha()
public void setAlpha(boolean alpha)
isAlpha()