com.esri.arcgis.geodatabase
Class FieldChecker

java.lang.Object
  extended by com.esri.arcgis.geodatabase.FieldChecker
All Implemented Interfaces:
IFieldChecker, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class FieldChecker
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IFieldChecker

Checks for errors in Field Name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
FieldChecker()
          Constructs a FieldChecker using ArcGIS Engine.
FieldChecker(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
FieldChecker theFieldChecker = (FieldChecker) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 IWorkspace getInputWorkspace()
          Input workspace of the fieldchecker.
 ISqlKeywordDictionary getValidateDictionary()
          Fieldchecker dictionary.
 IWorkspace getValidateWorkspace()
          Workspace of the fieldchecker.
 int hashCode()
          the hashcode for this object
 void setInputWorkspace(IWorkspace inputWorkspace)
          Input workspace of the fieldchecker.
 void setValidateDictionaryByRef(ISqlKeywordDictionary validateDictionary)
          Fieldchecker dictionary.
 void setValidateWorkspaceByRef(IWorkspace validateWorkspace)
          Workspace of the fieldchecker.
 void validate(IFields inputField, IEnumFieldError[] error, IFields[] fixedFields)
          Checks the validity of a list of field names.
 void validateField(int fieldIndex, IFields inputFields, IEnumFieldError[] error, IFields[] fixedFields)
          Checks the validity of a field.
 int validateTableName(String tableName, String[] fixedName)
          Checks the validity of a table name.
 
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

FieldChecker

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

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

FieldChecker

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

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

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

validate

public void validate(IFields inputField,
                     IEnumFieldError[] error,
                     IFields[] fixedFields)
              throws IOException,
                     AutomationException
Checks the validity of a list of field names.

Description

Validate sets the IFields parameter to a set of fields valid for the target data format, and sets the IEnumFieldError to contain field error codes and associated field names. The error codes are stored as a esriFieldNameErrorType. If the IEnumFieldError is returned as Nothing then no errors were found.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validate in interface IFieldChecker
Parameters:
inputField - A reference to a com.esri.arcgis.geodatabase.IFields (in)
error - A reference to a com.esri.arcgis.geodatabase.IEnumFieldError (out: use single element array)
fixedFields - A reference to a com.esri.arcgis.geodatabase.IFields (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateTableName

public int validateTableName(String tableName,
                             String[] fixedName)
                      throws IOException,
                             AutomationException
Checks the validity of a table name.

Description

ValidateTableName verifies that a table name is valid for the target data format, and if needed, returns a compliant table name. This method returns a esriTableNameErrorType indicating the type of error. Table existence is not checked.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validateTableName in interface IFieldChecker
Parameters:
tableName - The tableName (in)
fixedName - The fixedName (out: use single element array)
Returns:
The error
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateField

public void validateField(int fieldIndex,
                          IFields inputFields,
                          IEnumFieldError[] error,
                          IFields[] fixedFields)
                   throws IOException,
                          AutomationException
Checks the validity of a field.

Description

ValidateFields validates a field selected using its FieldIndex value from the entered IFields object. If the field is not valid IEnumFieldError and a IFields object is returned. The IEnumFieldError object will contain the field error code and the associated field name. The error codes are stored as a esriFieldNameErrorType. If the IEnumFieldError is returned as Nothing then no errors were found. The returned IFields object will include compliant field names.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validateField in interface IFieldChecker
Parameters:
fieldIndex - The fieldIndex (in)
inputFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
error - A reference to a com.esri.arcgis.geodatabase.IEnumFieldError (out: use single element array)
fixedFields - A reference to a com.esri.arcgis.geodatabase.IFields (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getValidateWorkspace

public IWorkspace getValidateWorkspace()
                                throws IOException,
                                       AutomationException
Workspace of the fieldchecker.

Description

Setting the ValidateWorkspace property is required prior to using any of this interface's Validate methods. This property should be set to the workspace where the dataset being validated is to be created.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getValidateWorkspace in interface IFieldChecker
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setValidateWorkspaceByRef

public void setValidateWorkspaceByRef(IWorkspace validateWorkspace)
                               throws IOException,
                                      AutomationException
Workspace of the fieldchecker.

Description

Setting the ValidateWorkspace property is required prior to using any of this interface's Validate methods. This property should be set to the workspace where the dataset being validated is to be created.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getInputWorkspace

public IWorkspace getInputWorkspace()
                             throws IOException,
                                    AutomationException
Input workspace of the fieldchecker.

Description

The InputWorkspace property should be set when the IFieldChecker interface is used for creating a dataset that uses another dataset's fields. For example, when using the feature data converter to create a new dataset, or when cloning the fields of an existing dataset to use with a new dataset.

This property should be set to the source workspace - the workspace that contains the original dataset, not the newly created dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInputWorkspace in interface IFieldChecker
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInputWorkspace

public void setInputWorkspace(IWorkspace inputWorkspace)
                       throws IOException,
                              AutomationException
Input workspace of the fieldchecker.

Description

The InputWorkspace property should be set when the IFieldChecker interface is used for creating a dataset that uses another dataset's fields. For example, when using the feature data converter to create a new dataset, or when cloning the fields of an existing dataset to use with a new dataset.

This property should be set to the source workspace - the workspace that contains the original dataset, not the newly created dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getValidateDictionary

public ISqlKeywordDictionary getValidateDictionary()
                                            throws IOException,
                                                   AutomationException
Fieldchecker dictionary.

Description

The ValidateDictionary method provides access to the dictionary used to verify that field and table names are reserved words in the target data source. A ISqlKeywordDictionary object can be used to search the dictionary used to validate a name when IFieldChecker::ValidateWorkspace has been set. If a ValidateWorkspace has not been set a custom keyword dictionary can be built using ISqlKeywordDictionary. If the ValidateWorkspace has been set the dictionary can not be changed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getValidateDictionary in interface IFieldChecker
Returns:
A reference to a com.esri.arcgis.geodatabase.ISqlKeywordDictionary
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setValidateDictionaryByRef

public void setValidateDictionaryByRef(ISqlKeywordDictionary validateDictionary)
                                throws IOException,
                                       AutomationException
Fieldchecker dictionary.

Description

The ValidateDictionary method provides access to the dictionary used to verify that field and table names are reserved words in the target data source. A ISqlKeywordDictionary object can be used to search the dictionary used to validate a name when IFieldChecker::ValidateWorkspace has been set. If a ValidateWorkspace has not been set a custom keyword dictionary can be built using ISqlKeywordDictionary. If the ValidateWorkspace has been set the dictionary can not be changed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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