com.esri.arcgis.geodatabase
Interface ITopologyRule

All Superinterfaces:
Serializable
All Known Implementing Classes:
TopologyRule

public interface ITopologyRule
extends Serializable

Provides access to memebers that return information about topology rules.

Remarks

The ITopologyRule interface provides access to members which can be used to assign or retrieve information about a topology rule. Topology rules are cocreateable.

To be added to a topology, a rule must have (at a minimum) its Type and OriginClassID properties defined. Rules which use a destination feature class must also have the DestinationClassID property set.

When specifying the Origin properties, if the OriginSubtype, OriginSubtypeSpecified and AllOriginSubtypes are not specified, the OriginSubtype is set to the default subtype. If no subtypes are defined on the feature class, the OriginSubtype will equal zero. The same is true for the DestinationSubtype, DestinationSubtypeSpecified and AllDestinationSubtypes properties.

When To Use

The ITopologyRule is the main interface for creating and getting information about a topology rule. Use this interface to create a new topology rule between feature classes or for a single feature class. Topology rules can also be specified to the subtype level.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
ITopologyRuleContainer

Method Summary
 void errorShapeTypes(boolean[] multipoints, boolean[] polylines, boolean[] polygons)
          Indicates the shape types of errors for the topology rule.
 int getDestinationClassID()
          Destination ClassID of the topology rule.
 int getDestinationSubtype()
          Destination subtype of the topology rule.
 String getGUID()
          GUID of the topology rule.
 String getName()
          Name of the topology rule.
 int getOriginClassID()
          Origin ClassID of the topology rule.
 int getOriginSubtype()
          Origin subtype of the topology rule.
 int getTopologyRuleType()
          Topology rule type of the topology rule.
 boolean isAllDestinationSubtypes()
          Indicates if all destination subtypes are specified for the topology rule.
 boolean isAllOriginSubtypes()
          Indicates if all origin subtypes are specified for the topology rule.
 boolean isDestinationSubtypeSpecified()
          Indicates if a destination subtype has been specified.
 boolean isOriginSubtypeSpecified()
          Indicates if an origin subtype has been specified.
 boolean isTriggerErrorEvents()
          Indicates if error events are triggered for the topology rule.
 void setAllDestinationSubtypes(boolean allSubtypes)
          Indicates if all destination subtypes are specified for the topology rule.
 void setAllOriginSubtypes(boolean allSubtypes)
          Indicates if all origin subtypes are specified for the topology rule.
 void setDestinationClassID(int classID)
          Destination ClassID of the topology rule.
 void setDestinationSubtype(int subType)
          Destination subtype of the topology rule.
 void setName(String name)
          Name of the topology rule.
 void setOriginClassID(int classID)
          Origin ClassID of the topology rule.
 void setOriginSubtype(int subType)
          Origin subtype of the topology rule.
 void setTopologyRuleType(int ruleType)
          Topology rule type of the topology rule.
 void setTriggerErrorEvents(boolean errorEvents)
          Indicates if error events are triggered for the topology rule.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the topology rule.

Remarks

The Name property can be used to assign a user specified string to each rule. By default, the Name property is empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

void setName(String name)
             throws IOException,
                    AutomationException
Name of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGUID

String getGUID()
               throws IOException,
                      AutomationException
GUID of the topology rule.

Remarks

Each topology rule is uniquely identified by a GUID. It is assigned when the rule is added to the topology using ITopologyRuleContainer::AddRule. The GUID can be used to get the topology rule using ITopologyRuleContainer::RulebyGUID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The gUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOriginClassID

int getOriginClassID()
                     throws IOException,
                            AutomationException
Origin ClassID of the topology rule.

Remarks

The OriginClassID of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The classID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOriginClassID

void setOriginClassID(int classID)
                      throws IOException,
                             AutomationException
Origin ClassID of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
classID - The classID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOriginSubtype

int getOriginSubtype()
                     throws IOException,
                            AutomationException
Origin subtype of the topology rule.

Remarks

The origin subtype of the topology rule. If AllOriginSubtypes is set to True, the OriginSubtype is ignored. If OriginSubtype is set to -1, AllOriginSubtypes will return True. If the assigned value does not correspond to a valid subtype, and error will be raised when the rule is added to the Topology.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The subType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOriginSubtype

void setOriginSubtype(int subType)
                      throws IOException,
                             AutomationException
Origin subtype of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
subType - The subType (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDestinationClassID

int getDestinationClassID()
                          throws IOException,
                                 AutomationException
Destination ClassID of the topology rule.

Remarks

The DestinationClassID of the topology rule. If the topology rule is a single feature class type, the DestinationClassID does not need to be set, it will be equal to the OriginClassID by default. If DestinationClassID is specified, it will be ignored.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The classID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDestinationClassID

void setDestinationClassID(int classID)
                           throws IOException,
                                  AutomationException
Destination ClassID of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
classID - The classID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDestinationSubtype

int getDestinationSubtype()
                          throws IOException,
                                 AutomationException
Destination subtype of the topology rule.

Remarks

The destination subtype of the topology rule. If AllDestinationSubtypes is set to True, the DestinationSubtype is ignored. If DestinationSubtype is set to -1, AllDestinationSubtypes will return True. If the assigned value does not correspond to a valid subtype, an error will be raised when the rule is added to the Topology.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The subType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDestinationSubtype

void setDestinationSubtype(int subType)
                           throws IOException,
                                  AutomationException
Destination subtype of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
subType - The subType (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTopologyRuleType

int getTopologyRuleType()
                        throws IOException,
                               AutomationException
Topology rule type of the topology rule.

Remarks

A value from the esriTopologyRuleType enumeration that represents the rule's type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriTopologyRuleType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTopologyRuleType

void setTopologyRuleType(int ruleType)
                         throws IOException,
                                AutomationException
Topology rule type of the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
ruleType - A com.esri.arcgis.geodatabase.esriTopologyRuleType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTriggerErrorEvents

boolean isTriggerErrorEvents()
                             throws IOException,
                                    AutomationException
Indicates if error events are triggered for the topology rule.

Remarks

The TriggerErrorEvents property is not currently in use and is reserved for future use.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The errorEvents
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTriggerErrorEvents

void setTriggerErrorEvents(boolean errorEvents)
                           throws IOException,
                                  AutomationException
Indicates if error events are triggered for the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
errorEvents - The errorEvents (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

errorShapeTypes

void errorShapeTypes(boolean[] multipoints,
                     boolean[] polylines,
                     boolean[] polygons)
                     throws IOException,
                            AutomationException
Indicates the shape types of errors for the topology rule.

Remarks

The ErrorShapeTypes method returns the supported error geometries for the specific topology rule. Topology rules do not support multipoints, this parameter equates to points. Every topology rule supports the creation of point topology errors.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
multipoints - The multipoints (out: use single element array)
polylines - The polylines (out: use single element array)
polygons - The polygons (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAllOriginSubtypes

boolean isAllOriginSubtypes()
                            throws IOException,
                                   AutomationException
Indicates if all origin subtypes are specified for the topology rule.

Remarks

AllOriginSubtypes specifies if the rule applies to all subtypes in the origin feature class. By default AllOriginSubtypes is False and the OriginSubtype property is set to -1. If the origin class contains subtypes, and these values are not changed, adding the rule to a topology will fail.

AllOriginSubtypes is set to the opposite value of OriginSubtypeSpecified. If the topology rule is a single feature class type, AllOriginSubtypes is set to True once the rule is added to the Topology.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The allSubtypes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAllOriginSubtypes

void setAllOriginSubtypes(boolean allSubtypes)
                          throws IOException,
                                 AutomationException
Indicates if all origin subtypes are specified for the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
allSubtypes - The allSubtypes (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAllDestinationSubtypes

boolean isAllDestinationSubtypes()
                                 throws IOException,
                                        AutomationException
Indicates if all destination subtypes are specified for the topology rule.

Remarks

AllDestinationSubtypes specifies if the rule applies to all subtypes in the destination feature class. By default AllDestinationSubtypes is False and the DestinationSubtype property is set to -1. If the destination class contains subtypes, and these values are not changed, adding the rule to a topology will fail.

AllDestinationSubtypes is set to the opposite value of DestinationSubtypeSpecified. If the topology rule is a single feature class type, AllDestinationSubtypes is set to True once the rule is added to the Topology.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The allSubtypes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAllDestinationSubtypes

void setAllDestinationSubtypes(boolean allSubtypes)
                               throws IOException,
                                      AutomationException
Indicates if all destination subtypes are specified for the topology rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
allSubtypes - The allSubtypes (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isOriginSubtypeSpecified

boolean isOriginSubtypeSpecified()
                                 throws IOException,
                                        AutomationException
Indicates if an origin subtype has been specified.

Remarks

OriginSubtypeSpecified will return True whenever the rule has been specified at the subtype level with the use of ITopologyRule::OriginSubtype. OriginSubtypeSpecified is the opposite of AllOriginSubtypes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The subtypeSpecified
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDestinationSubtypeSpecified

boolean isDestinationSubtypeSpecified()
                                      throws IOException,
                                             AutomationException
Indicates if a destination subtype has been specified.

Remarks

DestinationSubtypeSpecified will return True whenever the rule has been specified at the subtype level with the use of ITopologyRule::DestinationSubtype. DestinationSubtypeSpecified is the opposite of AllDestinationSubtypes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The subtypeSpecified
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.