com.esri.arcgis.geodatabase
Interface IValidation

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
IValidation2
All Known Implementing Classes:
FeatureClass, IValidation2Proxy, IValidationProxy, ObjectClass, ObjectClassValidator, SchematicDiagramClass, SchematicElementClass

public interface IValidation
extends java.io.Serializable

Provides access to members that manage rules and validate them.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

IValidation interface is a member of the ObjectClass coclass. It is used to maintain rules, and also to validate the workspace or object class based on the rules associated with it. Rules can be added, deleted, and validated through this interface. Also rule objects associated with the object class can be obtained from this interface.

When To Use

IValidation is the interface on a ObjectClass object used to add/delete rules, as well as validate those rules against the current object class. For example, use the IValidation interface to add a connectivity/attribute rule to this particular object class. You can then create a query filter based on this object class and use the validate function to see if there are any features that are considered invalid based on these rules.


Method Summary
 void addRule(IRule rule)
          Adds the rule to the set of associated rules.
 void deleteRule(IRule rule)
          Deletes the rule from the set of associated rules.
 IEnumRule getRules()
          The rules associated with the class.
 IEnumRule getRulesByField(java.lang.String fieldName)
          The rules associated with the attribute.
 IEnumRule getRulesBySubtypeCode(int subtypeCode)
          The rules associated with the subtype.
 ISelectionSet validate(IQueryFilter selection, IWorkspace workspace)
          Validates the selection.
 ISelectionSet validateSelection(ISelectionSet selection, IWorkspace workspace)
          Validates the selection.
 ISet validateSet(ISet selection)
          Validates the set.
 

Method Detail

getRules

public IEnumRule getRules()
                   throws java.io.IOException,
                          AutomationException
The rules associated with the class.

Supported Platforms

Windows, Solaris, Linux

Description

Rules is a property that returns a IEnumRule object that contains all of the rules associated with the object class.

Remarks

Property Rules returns a IEnumRule enumeration hydrated with all of the rules associated with the object class.

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

getRulesByField

public IEnumRule getRulesByField(java.lang.String fieldName)
                          throws java.io.IOException,
                                 AutomationException
The rules associated with the attribute.

Supported Platforms

Windows, Solaris, Linux

Description

RulesByField is a property that returns a IEnumRule object that contains all of the rules associated with the FieldName parameter passed to this property for the given object class.

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

getRulesBySubtypeCode

public IEnumRule getRulesBySubtypeCode(int subtypeCode)
                                throws java.io.IOException,
                                       AutomationException
The rules associated with the subtype.

Supported Platforms

Windows, Solaris, Linux

Description

RulesBySubtypeCode returns a IEnumRule object that contains all of the rules associated with the SubtypeCode passed into this property for the given object class.

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

addRule

public void addRule(IRule rule)
             throws java.io.IOException,
                    AutomationException
Adds the rule to the set of associated rules.

Supported Platforms

Windows, Solaris, Linux

Description

AddRule function adds the IRule parameter to the object class.

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

deleteRule

public void deleteRule(IRule rule)
                throws java.io.IOException,
                       AutomationException
Deletes the rule from the set of associated rules.

Supported Platforms

Windows, Solaris, Linux

Description

DeleteRule function removes the IRule parameter from the object class.

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

validate

public ISelectionSet validate(IQueryFilter selection,
                              IWorkspace workspace)
                       throws java.io.IOException,
                              AutomationException
Validates the selection.

Supported Platforms

Windows, Solaris, Linux

Description

Validate function takes the IQueryFilter and IWorkspace parameters and validates the features in the Workspace based on the rules associated with it. It returns a ISelectionSet containing all of the invalid features. Using Nothing as the QueryFilter will validate all features in the object class, or a QueryFilter can be created to only validate those features meeting that QueryFilter.

Remarks

Validate on a row occurs in five steps:

  1. Validate the subtype

  2. Validate the attribute rules

  3. Validate the network connectivity rules (if network feature)

  4. Validate the relationship rules

  5. Perform custom validation (using optional class extension)

The validate process stops once a row is found invalid. For example, if a network feature violates an attribute rule, the validation process stops and the feature's network connectivity rules are not evaluated until the attribute rule violation is corrected.

Parameters:
selection - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
workspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ISelectionSet
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateSelection

public ISelectionSet validateSelection(ISelectionSet selection,
                                       IWorkspace workspace)
                                throws java.io.IOException,
                                       AutomationException
Validates the selection.

Supported Platforms

Windows, Solaris, Linux

Description

ValidateSelection function takes the ISelectionSet and IWorkspace and validates the features contained in the SelectionSet of the Workspace based on the rules associated with it. It returns a ISelectionSet containing all of the invalid features found.

Parameters:
selection - A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)
workspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ISelectionSet
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateSet

public ISet validateSet(ISet selection)
                 throws java.io.IOException,
                        AutomationException
Validates the set.

Supported Platforms

Windows, Solaris, Linux

Description

ValidateSet function takes the ISet parameter and validates that set based on the rules associated with the object class. It returns a ISet object containing all of the invalid features that it found in that set.

Parameters:
selection - A reference to a com.esri.arcgis.system.ISet (in)
Returns:
A reference to a com.esri.arcgis.system.ISet
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.