com.esri.arcgis.geodatabase
Class ObjectClassValidator

java.lang.Object
  extended by com.esri.arcgis.geodatabase.ObjectClassValidator
All Implemented Interfaces:
IValidation, IValidation2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class ObjectClassValidator
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IValidation, IValidation2

ESRI ObjectClassValidator object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
ObjectClassValidator()
          Constructs a ObjectClassValidator using ArcGIS Engine.
ObjectClassValidator(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ObjectClassValidator theObjectClassValidator = (ObjectClassValidator) obj;
 
Method Summary
 void addRule(IRule rule)
          Adds the rule to the set of associated rules.
 void alterRule(IRule rule)
          Alter the existing validation rule.
 void deleteRule(IRule rule)
          Deletes the rule from the set of associated rules.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 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.
 int hashCode()
          the hashcode for this object
 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ObjectClassValidator

public ObjectClassValidator()
                     throws IOException,
                            UnknownHostException
Constructs a ObjectClassValidator using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

ObjectClassValidator

public ObjectClassValidator(Object obj)
                     throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ObjectClassValidator theObjectClassValidator = (ObjectClassValidator) obj;

Construct a ObjectClassValidator using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ObjectClassValidator.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

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.

alterRule

public void alterRule(IRule rule)
               throws IOException,
                      AutomationException
Alter the existing validation rule.

Remarks

The AlterRule method is used to change the characteristics of an existing rule. This is currently implemented to change a subset of properties for connectivity rules only. These properties are:

To alter other properties of a connectivity rule, the rule must be deleted and recreated with the appropriate changes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
alterRule in interface IValidation2
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.