com.esri.arcgis.geodatabase
Interface ITopologyRuleContainer

All Superinterfaces:
Serializable
All Known Implementing Classes:
ITopologyRuleContainerProxy, Topology

public interface ITopologyRuleContainer
extends Serializable

Provides access to members that return and set topology rules.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
ITopologyRule

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(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

getRule

IRule getRule(int ruleID)
              throws IOException,
                     AutomationException
The topology rule with the corresponding ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
ruleID - The ruleID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRules

IEnumRule getRules()
                   throws IOException,
                          AutomationException
An enumeration of all the topology rules.

Remarks

Returns an enumerator of the topology rules associated with the topology. The enumerator will contain all rules defined for the Topology, but will not contain the one rule that is inherent to each Topology, the esriTRTFeatureLargerThanClusterTolerance rule.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRuleByGUID

IRule getRuleByGUID(String gUID)
                    throws IOException,
                           AutomationException
The rule with the globally unique ID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
gUID - The gUID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRulesByClass

IEnumRule getRulesByClass(int classID)
                          throws IOException,
                                 AutomationException
An enumeration of all the rules for a given class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
classID - The classID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRulesByClassAndSubtype

IEnumRule getRulesByClassAndSubtype(int classID,
                                    int subType)
                                    throws IOException,
                                           AutomationException
An enumeration of all the rules for a given class and subtype.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
classID - The classID (in)
subType - The subType (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanAddRule

boolean isCanAddRule(ITopologyRule rule)
                     throws IOException,
                            AutomationException
Indicates if the topology rule can be added to the topology.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
Returns:
The canAddRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addRule

void addRule(ITopologyRule rule)
             throws IOException,
                    AutomationException
Adds a topology rule.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRule

void deleteRule(ITopologyRule rule)
                throws IOException,
                       AutomationException
Deletes a topology rule.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
rule - A reference to a com.esri.arcgis.geodatabase.ITopologyRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

promoteToRuleException

void promoteToRuleException(ITopologyErrorFeature errorException)
                            throws IOException,
                                   AutomationException
Promotes a topology error to an exception.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
errorException - A reference to a com.esri.arcgis.geodatabase.ITopologyErrorFeature (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

demoteFromRuleException

void demoteFromRuleException(ITopologyErrorFeature errorException)
                             throws IOException,
                                    AutomationException
Demotes a topology error from an exception to an error.

Remarks

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
errorException - A reference to a com.esri.arcgis.geodatabase.ITopologyErrorFeature (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.