com.esri.arcgis.geodatabase
Interface ITopologyRule

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ITopologyRuleProxy, TopologyRule

public interface ITopologyRule
extends java.io.Serializable

Provides access to memebers that return information about topology rules.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

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.

In order to be added to a topology, a rule must have it's Type, OriginID and DestinationID defined. Single feature class rules, need only have the Type and OriginID defined.

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.


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.
 java.lang.String getGUID()
          GUID of the topology rule.
 java.lang.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(java.lang.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

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
Name of the topology rule.

Supported Platforms

Windows, Solaris, Linux

Remarks

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

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

setName

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

Supported Platforms

Windows, Solaris, Linux

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

getGUID

public java.lang.String getGUID()
                         throws java.io.IOException,
                                AutomationException
GUID of the topology rule.

Supported Platforms

Windows, Solaris, Linux

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.

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

getOriginClassID

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

Supported Platforms

Windows, Solaris, Linux

Remarks

The OriginClassID of the topology rule.

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

setOriginClassID

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

Supported Platforms

Windows, Solaris, Linux

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

getOriginSubtype

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

Supported Platforms

Windows, Solaris, Linux

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.

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

setOriginSubtype

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

Supported Platforms

Windows, Solaris, Linux

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

getDestinationClassID

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

Supported Platforms

Windows, Solaris, Linux

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.

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

setDestinationClassID

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

Supported Platforms

Windows, Solaris, Linux

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

getDestinationSubtype

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

Supported Platforms

Windows, Solaris, Linux

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.

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

setDestinationSubtype

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

Supported Platforms

Windows, Solaris, Linux

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

getTopologyRuleType

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

Supported Platforms

Windows, Solaris, Linux

Remarks

A long corresponding to the type of topology rule from the esriTopologyRuleType.

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

setTopologyRuleType

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

Supported Platforms

Windows, Solaris, Linux

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

isTriggerErrorEvents

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

Supported Platforms

Windows, Solaris, Linux

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

setTriggerErrorEvents

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

Supported Platforms

Windows, Solaris, Linux

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

errorShapeTypes

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

Supported Platforms

Windows, Solaris, Linux

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.

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAllOriginSubtypes

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

Supported Platforms

Windows, Solaris, Linux

Remarks

AllOriginSubtypes specifies if the rule applies to all subtypes in the origin feature class.  By default AllOriginSubtypes is False and the OriginSubtype points to the default subtype. If AllOriginSubtypes is set to False, the OriginSubtype must be set or the rule will be invalid.

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.

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

setAllOriginSubtypes

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

Supported Platforms

Windows, Solaris, Linux

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

isAllDestinationSubtypes

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

Supported Platforms

Windows, Solaris, Linux

Remarks

AllDestinationSubtypes specifies if the rule applies to all subtypes in the destination feature class. By default AllDestinationSubtypes is False and the DestinationSubtype points to the default subtype. If AllDestinationSubtypes is set to False, the DestinationSubtype must be set or the rule will be invalid.

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.

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

setAllDestinationSubtypes

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

Supported Platforms

Windows, Solaris, Linux

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

isOriginSubtypeSpecified

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

Supported Platforms

Windows, Solaris, Linux

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.

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

isDestinationSubtypeSpecified

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

Supported Platforms

Windows, Solaris, Linux

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.

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