当前页面:
在线文档首页 >
JBoss RULES 4.0.0.11754MR2 API 英文版文档
RuleModel (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档
org.drools.brms.client.modeldriven.brxml
Class RuleModel
java.lang.Object
org.drools.brms.client.modeldriven.brxml.RuleModel
- All Implemented Interfaces:
- PortableObject
public class RuleModel
- extends Object
- implements PortableObject
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public String name
modelVersion
public String modelVersion
attributes
public RuleAttribute[] attributes
lhs
public IPattern[] lhs
rhs
public IAction[] rhs
RuleModel
public RuleModel()
getBoundFact
public FactPattern getBoundFact(String var)
- This will return the fact pattern that a variable is bound to.
- Parameters:
var
- The bound fact variable (NOT bound field).
- Returns:
- null or the FactPattern found.
getBoundFacts
public List getBoundFacts()
- Returns:
- A list of bound facts (String). Or empty list if none are found.
removeLhsItem
public boolean removeLhsItem(int idx)
- Parameters:
idx
- Remove this index from the LHS.Returns
- false if it was NOT allowed to remove this item (ie
it is used on the RHS).
isBoundFactUsed
public boolean isBoundFactUsed(String binding)
- Parameters:
binding
- The name of the LHS fact binding.
- Returns:
- Returns true if the specified binding is used on the RHS.
addLhsItem
public void addLhsItem(IPattern pat)
addRhsItem
public void addRhsItem(IAction action)
removeRhsItem
public void removeRhsItem(int idx)
addAttribute
public void addAttribute(RuleAttribute attribute)
removeAttribute
public void removeAttribute(int idx)
getBoundVariablesInScope
public List getBoundVariablesInScope(IConstraint con)
- This uses a deceptively simple algorithm to determine
what bound variables are in scope for a given constraint (including connectives).
Does not take into account globals.
getAllVariables
public List getAllVariables()
- This will get a list of all bound variables, including bound fields.
isVariableNameUsed
public boolean isVariableNameUsed(String s)
- Checks to see if a variable is used or not, includes fields
as well as facts.
Copyright © 2001-2007
JBoss Inc.. All Rights Reserved.