public class NFERulesEngine
extends java.lang.Object
Constructor and Description |
---|
NFERulesEngine(NFERulesModel rulesModel)
Creates a new rules engine instance
|
Modifier and Type | Method and Description |
---|---|
void |
applyConnectivityRules(Intersection<NFEFeatureElement> intersection)
Runs the rule applicability process for the given intersection of feature elements
|
void |
applyConnectivityRules(java.util.List<Intersection<NFEFeatureElement>> intersections)
Runs the rule applicability process over the given intersections of feature elements
|
NFEExpressionAnalyzer |
getExpressionAnalyzer()
Gets the current expression analyzer instance
|
NFERuleHandler |
getHandler(NFEConnectivityRule rule)
Gets the appropriate handler for the given rule
|
boolean |
isMatchingType(NFEFeatureElement featElem, long ruleFeatLayerId, long ruleFeatClassId, java.lang.String ruleAttrCond)
Tells whether a feature element matches the predicate of a rule.
|
void |
lineLineConnectionPerformed(long lineLineRuleId, java.util.Collection<NFEFeatureElement> featElems)
Method called to notify the rules engine when a connection between the specified feature elements was performed using the given line-line rule.
|
void |
linePointConnectionPerformed(long linePointRuleId, java.util.Collection<NFEFeatureElement> featElems)
Method called to notify the rules engine when a connection between the specified feature elements was performed using the given line-point rule.
|
void |
setExpressionAnalyzer(NFEExpressionAnalyzer exprAnalyzer)
Sets the expression analyzer implementation to be used
|
public NFERulesEngine(NFERulesModel rulesModel)
rulesModel
- the current rules model. The rules model must belong already to an NFE model.public NFEExpressionAnalyzer getExpressionAnalyzer()
public void setExpressionAnalyzer(NFEExpressionAnalyzer exprAnalyzer)
exprAnalyzer
- an expression analyzer objectpublic void applyConnectivityRules(java.util.List<Intersection<NFEFeatureElement>> intersections)
intersections
- a list of feature elements intersectionspublic void applyConnectivityRules(Intersection<NFEFeatureElement> intersection)
intersection
- a feature elements intersectionpublic boolean isMatchingType(NFEFeatureElement featElem, long ruleFeatLayerId, long ruleFeatClassId, java.lang.String ruleAttrCond)
featElem
- the feature element which will be comparedruleFeatLayerId
- a feature layer id defined in a rule's operandruleFeatClassId
- a feature class id defined in a rule's operandruleAttrCond
- an attribute condition expression defined in a rule's operandpublic NFERuleHandler getHandler(NFEConnectivityRule rule)
rule
- a connectivity rule objet (line-point or line-line)public void linePointConnectionPerformed(long linePointRuleId, java.util.Collection<NFEFeatureElement> featElems)
linePointRuleId
- a line-point rule id that allows the connectionfeatElems
- a collection of connected feature elementspublic void lineLineConnectionPerformed(long lineLineRuleId, java.util.Collection<NFEFeatureElement> featElems)
lineLineRuleId
- a line-line rule id that allows the connectionfeatElems
- a collection of connected feature elements