com.esri.arcgis.geodatabase
Class IValidationProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IValidationProxy
All Implemented Interfaces:
IValidation, Externalizable, Serializable
Direct Known Subclasses:
IValidation2Proxy

public class IValidationProxy
extends com.esri.arcgis.interop.Dispatch
implements IValidation, Serializable

Provides access to members that manage rules and validate them.

Superseded By

IValidation2

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.

Product Availability

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

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IValidationProxy()
           
  IValidationProxy(Object obj)
           
protected IValidationProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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(String fieldName)
          The rules associated with the attribute.
 IEnumRule getRulesBySubtypeCode(int subtypeCode)
          The rules associated with the subtype.
 void removeListener(String iidStr, Object theListener)
           
 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.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IValidationProxy

public IValidationProxy()

IValidationProxy

public IValidationProxy(Object obj)
                 throws IOException
Throws:
IOException

IValidationProxy

protected IValidationProxy(Object obj,
                           String iid)
                    throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getRules

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

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 enumerator hydrated with all of the rules associated with the object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRules in interface IValidation
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.

getRulesByField

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

Product Availability

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

Specified by:
getRulesByField in interface IValidation
Parameters:
fieldName - The fieldName (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.

getRulesBySubtypeCode

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

Product Availability

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

Specified by:
getRulesBySubtypeCode in interface IValidation
Parameters:
subtypeCode - The subtypeCode (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.

addRule

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

Description

This method is deprecated. Use a rule-specific method to add rules (i.e. IClassSchemaEdit.AlterDomain for attribute rules, IGeometricNetwork.AddRule for connectivity rules, IRelationshipClass.AddRelationshipRule for relationship rules).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deleteRule

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

Description

This method is deprecated. Use a rule-specific method to delete rules (i.e. IClassSchemaEdit.AlterDomain for attribute rules, IGeometricNetwork.DeleteRule for connectivity rules, IRelationshipClass.DeleteRelationshipRule for relationship rules).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

validate

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

Description

This method creates a selection set that contains the underlying class' invalid objects.
A query filter can be provided to validate a portion of the class' objects, but passing a null value will evaluate all of the class' objects.
The Workspace parameter indicates where the selection set is to be created. In most cases, a null value can be used, indicating that the class' workspace be used. If necessary, a scratch workspace may also be used.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validate in interface IValidation
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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateSelection

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

Description

This method creates a selection set that contains the underlying class' invalid objects.
A selection set must be passed to the first parameter, indicating that a subset of the class' objects should be evaluated. Unlike the query filter parameter of the Validate method, this parameter requires a valid selection set, and passing a null value will cause the method to fail.
The Workspace parameter indicates where the selection set is to be created. In most cases, a null value can be used, indicating that the class' workspace be used. If necessary, a scratch workspace may also be used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validateSelection in interface IValidation
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:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateSet

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

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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