Class NFERulesEngine
- java.lang.Object
-
- oracle.spatial.network.nfe.model.rule.NFERulesEngine
-
public class NFERulesEngine extends java.lang.Object
NFE component in charge of enforcing connectivity and cardinality rules. It performs the process of determining if some rule is applicable for an interaction between feature elements and apply such rule.
-
-
Constructor Summary
Constructors Constructor Description NFERulesEngine(NFERulesModel rulesModel)
Creates a new rules engine instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyConnectivityRules(java.util.List<Intersection<NFEFeatureElement>> intersections)
Runs the rule applicability process over the given intersections of feature elementsvoid
applyConnectivityRules(Intersection<NFEFeatureElement> intersection)
Runs the rule applicability process for the given intersection of feature elementsNFEExpressionAnalyzer
getExpressionAnalyzer()
Gets the current expression analyzer instanceNFERuleHandler
getHandler(NFEConnectivityRule rule)
Gets the appropriate handler for the given ruleboolean
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
-
-
-
Constructor Detail
-
NFERulesEngine
public NFERulesEngine(NFERulesModel rulesModel)
Creates a new rules engine instance- Parameters:
rulesModel
- the current rules model. The rules model must belong already to an NFE model.
-
-
Method Detail
-
getExpressionAnalyzer
public NFEExpressionAnalyzer getExpressionAnalyzer()
Gets the current expression analyzer instance- Returns:
- an expression analyzer object
-
setExpressionAnalyzer
public void setExpressionAnalyzer(NFEExpressionAnalyzer exprAnalyzer)
Sets the expression analyzer implementation to be used- Parameters:
exprAnalyzer
- an expression analyzer object
-
applyConnectivityRules
public void applyConnectivityRules(java.util.List<Intersection<NFEFeatureElement>> intersections)
Runs the rule applicability process over the given intersections of feature elements- Parameters:
intersections
- a list of feature elements intersections
-
applyConnectivityRules
public void applyConnectivityRules(Intersection<NFEFeatureElement> intersection)
Runs the rule applicability process for the given intersection of feature elements- Parameters:
intersection
- a feature elements intersection
-
isMatchingType
public boolean isMatchingType(NFEFeatureElement featElem, long ruleFeatLayerId, long ruleFeatClassId, java.lang.String ruleAttrCond)
Tells whether a feature element matches the predicate of a rule. The rule's predicate is given by one of its operands and it is formed by a feature layer id, a feature class id and a boolean expression which performs comparisons between attribute values.- Parameters:
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 operand- Returns:
- true if the feature element matches the given rule's predicate
-
getHandler
public NFERuleHandler getHandler(NFEConnectivityRule rule)
Gets the appropriate handler for the given rule- Parameters:
rule
- a connectivity rule objet (line-point or line-line)- Returns:
- a rule handler object
-
linePointConnectionPerformed
public 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. The rules engine eventually will create the rule instance and notify the rules model.- Parameters:
linePointRuleId
- a line-point rule id that allows the connectionfeatElems
- a collection of connected feature elements
-
lineLineConnectionPerformed
public 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. The rules engine eventually will create the rule instance and notify the rules model.- Parameters:
lineLineRuleId
- a line-line rule id that allows the connectionfeatElems
- a collection of connected feature elements
-
-