|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFieldChecker
Provides access to members that control the Field Checker.
IFieldChecker has methods for validating fields collections and table names for a specific workspace. It's strongly recommended that this interface be used prior to two types of operations:
The main difference between these two cases is that while setting the ValidateWorkspace property is required to validate in either case, setting the InputWorkspace property is only required for the second case.
The Validate and ValidateField methods are responsible for verifying that field name, data types, and other parameters meet a minimum set of criteria that are required for the target workspace (set using the ValidateWorkspace property). ValidateTableName is used to verify that a table's name is not a reserved word, and that it does not start with or contain any invalid characters.
The logic used to determine if the OID field should be renamed to "ObjectID" can be classified with 4 cases.
Case1: Both the InputWorkspace and ValidateWorkspace are provided.
Case2: Only the InputWorkspace is provided (the ValidateWorkspace has not been provided).
Case3: Only the ValidateWorkspace is provided (the InputWorkspace has not been provided).
Case4: Neither of the workspaces is provided
Method Summary | |
---|---|
IWorkspace |
getInputWorkspace()
Input workspace of the fieldchecker. |
ISqlKeywordDictionary |
getValidateDictionary()
Fieldchecker dictionary. |
IWorkspace |
getValidateWorkspace()
Workspace of the fieldchecker. |
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. |
Method Detail |
---|
void validate(IFields inputField, IEnumFieldError[] error, IFields[] fixedFields) throws IOException, AutomationException
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int validateTableName(String tableName, String[] fixedName) throws IOException, AutomationException
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.
tableName
- The tableName (in)fixedName
- The fixedName (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void validateField(int fieldIndex, IFields inputFields, IEnumFieldError[] error, IFields[] fixedFields) throws IOException, AutomationException
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IWorkspace getValidateWorkspace() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setValidateWorkspaceByRef(IWorkspace validateWorkspace) throws IOException, AutomationException
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.
validateWorkspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IWorkspace getInputWorkspace() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setInputWorkspace(IWorkspace inputWorkspace) throws IOException, AutomationException
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.
inputWorkspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISqlKeywordDictionary getValidateDictionary() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setValidateDictionaryByRef(ISqlKeywordDictionary validateDictionary) throws IOException, AutomationException
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.
validateDictionary
- A reference to a com.esri.arcgis.geodatabase.ISqlKeywordDictionary (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |