|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides access to members that return and set topology rules.
The ITopologyRuleContainer interface provides access to members for adding, removing and returning topology rules from a topology. This interface also provides access to members that control the promotion and demotion of topology errors and exceptions.
| Method Summary | |
void |
addRule(ITopologyRule rule)
Adds a topology rule. |
void |
deleteRule(ITopologyRule rule)
Deletes a topology rule. |
void |
demoteFromRuleException(ITopologyErrorFeature errorException)
Demotes a topology error from an exception to an error. |
IRule |
getRule(int ruleID)
The topology rule with the corresponding ID. |
IRule |
getRuleByGUID(java.lang.String gUID)
The rule with the globally unique ID. |
IEnumRule |
getRules()
An enumeration of all the topology rules. |
IEnumRule |
getRulesByClass(int classID)
An enumeration of all the rules for a given class. |
IEnumRule |
getRulesByClassAndSubtype(int classID,
int subType)
An enumeration of all the rules for a given class and subtype. |
boolean |
isCanAddRule(ITopologyRule rule)
Indicates if the topology rule can be added to the topology. |
void |
promoteToRuleException(ITopologyErrorFeature errorException)
Promotes a topology error to an exception. |
| Method Detail |
public IRule getRule(int ruleID)
throws java.io.IOException,
AutomationException
The Rule property returns rule corresponding to the supplied ID. The RuleID is the internal ID of the topology rule as stored in the geodatabase system tables and is unique within the geodatabase. To get the ID of the topology rule, QI to the IRule interface and use the IRule::ID property.
ruleID - The ruleID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumRule getRules()
throws java.io.IOException,
AutomationException
Returns an enumeration of the topology rules associated with the topology. The enumeration will contain all rules defined for the Topology, but will not contain the one rule that is inherent to each Topology, the esriTRTFeatureLargerThanClusterTolerance rule.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IRule getRuleByGUID(java.lang.String gUID)
throws java.io.IOException,
AutomationException
Returns the rule identified by the specified GUID. The GUID is generated after the topology is added to the topology using ITopologyRuleContainer::AddRule. The GUID can be returned from the ITopologyRule::GUID property.
gUID - The gUID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumRule getRulesByClass(int classID)
throws java.io.IOException,
AutomationException
The RulesByClass property returns an enumeration of the rules associated with a particular class in the topology, given the feature class’ Object Class ID. If Object Class ID corresponding to a feature class that is not in the Topology is supplied, an empty enumeration is returned.
classID - The classID (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumRule getRulesByClassAndSubtype(int classID,
int subType)
throws java.io.IOException,
AutomationException
The RulesByClassAndSubtype property returns an enumeration of the rules associated with a particular class/subtype pair in the topology. If the Object Class ID corresponds to a feature class that is not in the Topology or the Subtype value does not exist, an empty enumeration is returned.
classID - The classID (in)subType - The subType (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public boolean isCanAddRule(ITopologyRule rule)
throws java.io.IOException,
AutomationException
The CanAddRule property returns a Boolean value indicating if the topology rule is valid and consistent with respect to the existing rules. This property will return false if:
- For a given rule type, the origin class and subtype and if applicable, destination class and subtype are equal to an existing rule.
- For single feature class rules, such as esriTRTAreaNoGaps in the origin feature class is defined at the class and subtype level.
- The destination feature class is specified at both the class and subtype level if the origin is specified at the class level.
- the origin subtype is defined twice, except for rules esriTRTAreaNoOverlapArea and esriTRTLineNoOverlapLine.
For example, for feature class FC1 with subtypes; SubT1 and SubT2, and a Topology with the rule; FC1 AreaNoOverlap, the following rules, specified at the subtype level, are invalid and CanAddRule would return false:
FC1: SubT1 AreNoOverlap
FC1: SubT2 AreNoOverlap
After calling CanAddRule, it is not guaranteed that the topology rule will be added to the Topology. AddRule may still fail if the geometry types of the Origin and Destination feature classes are incorrect. In this case, an -2147215009 - FDO_E_INVALID_GEOMETRY_TYPE_FOR_TOPOLOGY_RULE error would be raised.
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addRule(ITopologyRule rule)
throws java.io.IOException,
AutomationException
Adds the specified rule to the topology. Before adding the topology rule use CanAddRule to determine if the rule is inconsistent with any existing topology rules. Topology rules of the same type cannot be specified at the class level and subtype level for the same feature class.
Using AddRule on a topology which has already been validated, in whole or in part, will result in a dirty area created for the extent of the feature classes participating in the rule and a change to the state of the topology to esriTSUnanalyzed.
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void deleteRule(ITopologyRule rule)
throws java.io.IOException,
AutomationException
Removes the specified rule from the topology. DeleteRule will remove any associated topology errors and will not result in the creation of a dirty area, nor will the state of the topology change.
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void promoteToRuleException(ITopologyErrorFeature errorException)
throws java.io.IOException,
AutomationException
The PromoteToRuleException method will promote the specified error to an exception feature. On a topology in an ArcSDE geodatabase, PromoteToRuleException, must be called from within an edit session and edit operation. Topology Exceptions arise when a topology rule is purposefully violated. Marking purposeful topology errors as exceptions allows other clients of the topology to handle them in an appropriate or specific manner, e.g., in reporting or symbolization.
Note that it is also possible to demote an exception or mark the exception as an error with the ITopologyRuleContainer::DemoteFromRuleException method.
errorException - A reference to a com.esri.arcgis.geodatabase.ITopologyErrorFeature (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void demoteFromRuleException(ITopologyErrorFeature errorException)
throws java.io.IOException,
AutomationException
The DemoteFromRuleException method will demote an exception feature from an exception to an error. On a topology in an ArcSDE geodatabase, DemoteFromRuleException, must be called from within an edit session and edit operation. Topology Exceptions arise when a topology rule is purposefully violated. Marking purposeful topology errors as exceptions allows other clients of the topology to handle them in an appropriate or specific manner, e.g., in reporting or symbolization.
Note that it is also possible to promote an error or mark the error as an exception with the ITopologyRuleContainer::PromoteToRuleException method.
errorException - A reference to a com.esri.arcgis.geodatabase.ITopologyErrorFeature (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||