Class NFERuleInstance
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEBasicModelObject
-
- oracle.spatial.network.nfe.model.rule.NFERuleInstance
-
- All Implemented Interfaces:
NFEModelObject
public class NFERuleInstance extends NFEBasicModelObject
Represents a materialization of a rule. A rule instance is created every time a rule is applied to a set of feature element.
-
-
Field Summary
-
Fields inherited from interface oracle.spatial.network.nfe.model.NFEModelObject
EFLAG_EXISTING, EFLAG_REMOVED
-
-
Constructor Summary
Constructors Constructor Description NFERuleInstance()
Allocates a new rule instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addFeatureElementRelation(NFEFeatureElement featElem)
Adds a relation to the feature elementboolean
addRelation(NFERuleInstanceRelation relation)
Adds a relation to a feature element.long
getId()
Gets the rule instance idjava.util.Collection<NFEFeatureElement>
getRelatedFeatureElements()
Gets all the feature elements currently related to this rule instancejava.util.Collection<NFERuleInstanceRelation>
getRelations()
Gets all the feature element relations.int
getRelationsCount()
Gets the number of related feature elementslong
getRuleId()
Gets the rule instance's rule idNFERulesModel
getRulesModel()
Gets the current rules modelNFEConnectivityRule.ConnectivityRuleType
getRuleType()
Gets the rule instance's rule typeboolean
isRelatedToFeatureElement(NFEFeatureElement featElem)
Tells whether the given feature element is related to the rule instanceboolean
removeFeatureElementRelation(NFEFeatureElement featElem)
Removes the relation with the feature elementvoid
setId(long id)
Sets the rule instance idvoid
setRuleId(long ruleId)
Sets the rule instance's rule idvoid
setRulesModel(NFERulesModel rulesModel)
Sets the current rules model instancevoid
setRuleType(NFEConnectivityRule.ConnectivityRuleType ruleType)
Sets the rule instance's rule type-
Methods inherited from class oracle.spatial.network.nfe.model.NFEBasicModelObject
addEditionFlag, containsEditionFlag, getEditionFlags, removeEditionFlag, setEditionFlags
-
-
-
-
Method Detail
-
getRulesModel
public NFERulesModel getRulesModel()
Gets the current rules model- Returns:
- a rules model instance
-
setRulesModel
public void setRulesModel(NFERulesModel rulesModel)
Sets the current rules model instance- Parameters:
rulesModel
- a rules model instance
-
getId
public long getId()
Gets the rule instance id- Returns:
- a rule instance id
-
setId
public void setId(long id)
Sets the rule instance id- Parameters:
id
- a rule instance id
-
getRuleId
public long getRuleId()
Gets the rule instance's rule id- Returns:
- a rule id
-
setRuleId
public void setRuleId(long ruleId)
Sets the rule instance's rule id- Parameters:
ruleId
- a rule id
-
getRuleType
public NFEConnectivityRule.ConnectivityRuleType getRuleType()
Gets the rule instance's rule type- Returns:
- a connectivity rule type
-
setRuleType
public void setRuleType(NFEConnectivityRule.ConnectivityRuleType ruleType)
Sets the rule instance's rule type- Parameters:
ruleType
- a connectivity rule type
-
addRelation
public boolean addRelation(NFERuleInstanceRelation relation)
Adds a relation to a feature element. This method is useful when an existing rule instance representation is created.- Parameters:
relation
- an object defining the relationship between the rule instance and the feature element- Returns:
- true if the relation was added
-
addFeatureElementRelation
public boolean addFeatureElementRelation(NFEFeatureElement featElem)
Adds a relation to the feature element- Parameters:
featElem
- a feature element- Returns:
- true if the relation was added
-
removeFeatureElementRelation
public boolean removeFeatureElementRelation(NFEFeatureElement featElem)
Removes the relation with the feature element- Parameters:
featElem
- a feature element- Returns:
- true if the relation was removed
-
getRelatedFeatureElements
public java.util.Collection<NFEFeatureElement> getRelatedFeatureElements()
Gets all the feature elements currently related to this rule instance- Returns:
- a colleciton of feature elements
-
isRelatedToFeatureElement
public boolean isRelatedToFeatureElement(NFEFeatureElement featElem)
Tells whether the given feature element is related to the rule instance- Parameters:
featElem
- a feature element- Returns:
- true if the feature element is related to the rule instance
-
getRelations
public java.util.Collection<NFERuleInstanceRelation> getRelations()
Gets all the feature element relations.- Returns:
- a collection of rule instance relation objects
-
getRelationsCount
public int getRelationsCount()
Gets the number of related feature elements- Returns:
- the number of related feature elements
-
-