public class NFERulesModel extends java.lang.Object implements NFEModelListener
METHOD_MODEL_OBJECT_ADDED, METHOD_MODEL_OBJECT_REMOVED, METHOD_MODEL_OBJECTS_ADDED, METHOD_MODEL_OBJECTS_REMOVED, METHOD_PROPERTY_CHANGED| Constructor and Description | 
|---|
| NFERulesModel(NFEModel model)Creates a new instance of NFERulesModel | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addCardinalityRule(NFECardinalityRule cardRule)Adds a cardinality rule to the rules model | 
| void | addCardinalityRules(java.util.Collection<NFECardinalityRule> cardRules)Adds all the cardinality rules to the rules model | 
| void | addConnectivityRules(java.util.Collection<? extends NFEConnectivityRule> rules)Adds all the connectivity rules to the rules model. | 
| void | addLineLineRule(NFELineLineRule llRule)Adds a line-line rule to the rules model | 
| void | addLinePointRule(NFELinePointRule lpRule)Adds a line-point rule to the rules model | 
| void | addModelListener(NFEModelListener listener)Subscribes a model listener to receive events about rule instances | 
| boolean | addRuleInstance(NFERuleInstance ruleInstance)Adds a new rule instance to the rule model | 
| NFECardinalityRule | getCardinalityRule(NFEFeatureClass featClass)Gets cardinality rule applicable for the given feature class | 
| java.util.Collection<NFECardinalityRule> | getCardinalityRules()Gets all the cardinality rules contained in the rules model | 
| NFEEventDispatcher<NFEModelListener> | getEventDispatcher() | 
| java.util.Collection<NFELineLineRule> | getLineLineRules()Gets all the line-line rules contained in the rules model | 
| java.util.Collection<NFELinePointRule> | getLinePointRules()Gets all the line-point rules contained in the rules model | 
| NFEModel | getModel()Gets the NFE model associated to the rules model | 
| NFERuleInstance | getRuleInstance(long ruleInstanceId)Gets the rule instance identified by the given id | 
| java.util.Collection<NFERuleInstance> | getRuleInstances(NFEFeatureElement featElem)Gets all the rule instances associated to the given feature element | 
| java.util.Collection<NFERuleInstance> | getRuleInstances(NFEFeatureElement featElem, NFEConnectivityRule.ConnectivityRuleType type)Gets all the rule instances associated to the given feature element and created by a connectivity rule of the specified type | 
| void | modelObjectAdded(NFEModelObjectEvent event)Invoked when a model object has been added | 
| void | modelObjectPropertyChanged(NFEModelObjectPropertyChangedEvent event)Invoked when a model object's property has been changed | 
| void | modelObjectRemoved(NFEModelObjectEvent event)Invoked when a model object has been removed | 
| void | modelObjectsAdded(NFEModelObjectsEvent event)Invoked when one or more model objects have been added | 
| void | modelObjectsRemoved(NFEModelObjectsEvent event)Invoked when one or more model objects have been removed | 
| boolean | removeCardinalityRule(NFECardinalityRule cardRule)Removes a cardinality rule from the model | 
| boolean | removeLineLineRule(NFELineLineRule llRule)Removes the given line-line rule | 
| boolean | removeLinePointRule(NFELinePointRule lpRule)Removes the given line-point rule from the model | 
| void | removeModelListener(NFEModelListener listener)Removes a model listener | 
| NFERuleInstance | removeRuleInstance(long ruleInstanceId)Removes from the rules model the rule instance identified by the given id | 
| void | setEventDispatcher(NFEEventDispatcher<NFEModelListener> eventDispatcher) | 
| void | transferRuleInstances(NFEFeatureElement srcFeatElem, NFEFeatureElement dstFeatElem)Associates to dstFeatElem all the rule instances associated to srcFeatElem. | 
public NFERulesModel(NFEModel model)
model - the current NFE modelpublic NFEModel getModel()
public void addConnectivityRules(java.util.Collection<? extends NFEConnectivityRule> rules)
rules - a collection containing connectivity rule implementationspublic void addLinePointRule(NFELinePointRule lpRule)
lpRule - a line-point rulepublic boolean removeLinePointRule(NFELinePointRule lpRule)
lpRule - a line-point rulepublic java.util.Collection<NFELinePointRule> getLinePointRules()
public void addLineLineRule(NFELineLineRule llRule)
llRule - a line-line rulepublic java.util.Collection<NFELineLineRule> getLineLineRules()
public boolean removeLineLineRule(NFELineLineRule llRule)
llRule - a line-line rule from the modelpublic void addCardinalityRules(java.util.Collection<NFECardinalityRule> cardRules)
cardRules - a collection containing cardinality rulespublic void addCardinalityRule(NFECardinalityRule cardRule)
cardRule - a cardinality rulepublic java.util.Collection<NFECardinalityRule> getCardinalityRules()
public NFECardinalityRule getCardinalityRule(NFEFeatureClass featClass)
featClass - a feature classpublic boolean removeCardinalityRule(NFECardinalityRule cardRule)
cardRule - a cardinality rulepublic boolean addRuleInstance(NFERuleInstance ruleInstance)
ruleInstance - a rule instancepublic NFERuleInstance removeRuleInstance(long ruleInstanceId)
ruleInstanceId - a rule instance idpublic NFERuleInstance getRuleInstance(long ruleInstanceId)
ruleInstanceId - a rule instance idpublic java.util.Collection<NFERuleInstance> getRuleInstances(NFEFeatureElement featElem)
featElem - a feature elementpublic java.util.Collection<NFERuleInstance> getRuleInstances(NFEFeatureElement featElem, NFEConnectivityRule.ConnectivityRuleType type)
featElem - a feature elementtype - a connectivity rule typepublic void addModelListener(NFEModelListener listener)
listener - a model listener implementationpublic void removeModelListener(NFEModelListener listener)
listener - a model listener implementationpublic void setEventDispatcher(NFEEventDispatcher<NFEModelListener> eventDispatcher)
public NFEEventDispatcher<NFEModelListener> getEventDispatcher()
public void modelObjectAdded(NFEModelObjectEvent event)
NFEModelListenermodelObjectAdded in interface NFEModelListenerevent - contains a reference to the model object that has been addedpublic void modelObjectsAdded(NFEModelObjectsEvent event)
NFEModelListenermodelObjectsAdded in interface NFEModelListenerevent - contains a collection of references to the model objects that have been addedpublic void modelObjectRemoved(NFEModelObjectEvent event)
NFEModelListenermodelObjectRemoved in interface NFEModelListenerevent - contains a reference to the model object that has been removedpublic void modelObjectsRemoved(NFEModelObjectsEvent event)
NFEModelListenermodelObjectsRemoved in interface NFEModelListenerevent - contains a collection of references to the model objects that have been removedpublic void modelObjectPropertyChanged(NFEModelObjectPropertyChangedEvent event)
NFEModelListenermodelObjectPropertyChanged in interface NFEModelListenerevent - contains a reference to the model objects which property has been changed and the name and previous value of the changed propertypublic void transferRuleInstances(NFEFeatureElement srcFeatElem, NFEFeatureElement dstFeatElem)
srcFeatElem - the feature element from which the rule instances want to be moveddstFeatElem - the feature element which will be associated to the rule instances