com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class AddField

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.AbstractGPTool
      extended by com.esri.arcgis.geoprocessing.tools.datamanagementtools.AddField
All Implemented Interfaces:
GPTool

public class AddField
extends AbstractGPTool

Adds a new field to a table or the table of a feature class, feature layer, raster catalog, and/or rasters with attribute tables. The Add Field tool is contained in the Data Management Tools tool box.

Usage tips:


Field Summary
 
Fields inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
vals
 
Constructor Summary
AddField()
          Creates the Add Field tool with defaults.
AddField(Object inTable, String fieldName, String fieldType)
          Creates the Add Field tool with the required parameters.
 
Method Summary
 String getFieldAlias()
          Returns the Field Alias parameter of this tool .
 String getFieldDomain()
          Returns the Field Domain parameter of this tool .
 String getFieldIsNullable()
          Returns the Field IsNullable parameter of this tool .
 String getFieldIsRequired()
          Returns the Field IsRequired parameter of this tool .
 int getFieldLength()
          Returns the Field Length parameter of this tool .
 String getFieldName()
          Returns the Field Name parameter of this tool .
 int getFieldPrecision()
          Returns the Field Precision parameter of this tool .
 int getFieldScale()
          Returns the Field Scale parameter of this tool .
 String getFieldType()
          Returns the Field Type parameter of this tool .
 Object getInTable()
          Returns the Input Table parameter of this tool .
 Object getOutTable()
          Returns the Output Feature Class parameter of this tool (Read only).
 String getToolboxAlias()
          Returns the alias of the tool box containing this tool.
 String getToolboxName()
          Returns the name of the tool box containing this tool.
 String getToolName()
          Returns the name of this tool.
 void setFieldAlias(String fieldAlias)
          Sets the Field Alias parameter of this tool .
 void setFieldDomain(String fieldDomain)
          Sets the Field Domain parameter of this tool .
 void setFieldIsNullable(String fieldIsNullable)
          Sets the Field IsNullable parameter of this tool .
 void setFieldIsRequired(String fieldIsRequired)
          Sets the Field IsRequired parameter of this tool .
 void setFieldLength(int fieldLength)
          Sets the Field Length parameter of this tool .
 void setFieldName(String fieldName)
          Sets the Field Name parameter of this tool .
 void setFieldPrecision(int fieldPrecision)
          Sets the Field Precision parameter of this tool .
 void setFieldScale(int fieldScale)
          Sets the Field Scale parameter of this tool .
 void setFieldType(String fieldType)
          Sets the Field Type parameter of this tool .
 void setInTable(Object inTable)
          Sets the Input Table parameter of this tool .
 
Methods inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
getParameterValues, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddField

public AddField()
Creates the Add Field tool with defaults.

Initializes the array of tool parameters with the default values specified when the tool was created.


AddField

public AddField(Object inTable,
                String fieldName,
                String fieldType)
Creates the Add Field tool with the required parameters.

Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.

Parameters:
inTable - the input table to which the specified field will be added. The field will be added to the existing input table and will not create a new output table. fields can be added to feature classes of ArcSDE, file or personal geodatabases, coverages, shapefiles, raster catalogs, stand-alone tables, rasters with attribute tables, and/or layers.
fieldName - the name of the field that will be added to the Input Table.
fieldType - the field type used in the creation of the new field.
Method Detail

getInTable

public Object getInTable()
Returns the Input Table parameter of this tool . This parameter is the input table to which the specified field will be added. The field will be added to the existing input table and will not create a new output table. fields can be added to feature classes of ArcSDE, file or personal geodatabases, coverages, shapefiles, raster catalogs, stand-alone tables, rasters with attribute tables, and/or layers. This is a required parameter.

Returns:
the Input Table

setInTable

public void setInTable(Object inTable)
Sets the Input Table parameter of this tool . This parameter is the input table to which the specified field will be added. The field will be added to the existing input table and will not create a new output table. fields can be added to feature classes of ArcSDE, file or personal geodatabases, coverages, shapefiles, raster catalogs, stand-alone tables, rasters with attribute tables, and/or layers. This is a required parameter.

Parameters:
inTable - the input table to which the specified field will be added. The field will be added to the existing input table and will not create a new output table. fields can be added to feature classes of ArcSDE, file or personal geodatabases, coverages, shapefiles, raster catalogs, stand-alone tables, rasters with attribute tables, and/or layers.

getFieldName

public String getFieldName()
Returns the Field Name parameter of this tool . This parameter is the name of the field that will be added to the Input Table. This is a required parameter.

Returns:
the Field Name

setFieldName

public void setFieldName(String fieldName)
Sets the Field Name parameter of this tool . This parameter is the name of the field that will be added to the Input Table. This is a required parameter.

Parameters:
fieldName - the name of the field that will be added to the Input Table.

getFieldType

public String getFieldType()
Returns the Field Type parameter of this tool . This parameter is the field type used in the creation of the new field. This is a required parameter.

Returns:
the Field Type

setFieldType

public void setFieldType(String fieldType)
Sets the Field Type parameter of this tool . This parameter is the field type used in the creation of the new field. This is a required parameter.

Parameters:
fieldType - the field type used in the creation of the new field.

getFieldPrecision

public int getFieldPrecision()
Returns the Field Precision parameter of this tool . This parameter is describes the number of digits that can be stored in the field. All digits are counted no matter what side of the decimal they are on. if the input table is a personal or file geodatabase the field precision value will be ignored. This is an optional parameter.

Returns:
the Field Precision

setFieldPrecision

public void setFieldPrecision(int fieldPrecision)
Sets the Field Precision parameter of this tool . This parameter is describes the number of digits that can be stored in the field. All digits are counted no matter what side of the decimal they are on. if the input table is a personal or file geodatabase the field precision value will be ignored. This is an optional parameter.

Parameters:
fieldPrecision - describes the number of digits that can be stored in the field. All digits are counted no matter what side of the decimal they are on. if the input table is a personal or file geodatabase the field precision value will be ignored.

getFieldScale

public int getFieldScale()
Returns the Field Scale parameter of this tool . This parameter is sets the number of decimal places stored in a field. This parameter is only used in Float and Double data field types. if the input table is a personal or file geodatabase the field scale value will be ignored. This is an optional parameter.

Returns:
the Field Scale

setFieldScale

public void setFieldScale(int fieldScale)
Sets the Field Scale parameter of this tool . This parameter is sets the number of decimal places stored in a field. This parameter is only used in Float and Double data field types. if the input table is a personal or file geodatabase the field scale value will be ignored. This is an optional parameter.

Parameters:
fieldScale - sets the number of decimal places stored in a field. This parameter is only used in Float and Double data field types. if the input table is a personal or file geodatabase the field scale value will be ignored.

getFieldLength

public int getFieldLength()
Returns the Field Length parameter of this tool . This parameter is the length of the field being added. This sets the maximum number of allowable characters for each record of the field. This option is only applicable on fields of type text or blob. This is an optional parameter.

Returns:
the Field Length

setFieldLength

public void setFieldLength(int fieldLength)
Sets the Field Length parameter of this tool . This parameter is the length of the field being added. This sets the maximum number of allowable characters for each record of the field. This option is only applicable on fields of type text or blob. This is an optional parameter.

Parameters:
fieldLength - the length of the field being added. This sets the maximum number of allowable characters for each record of the field. This option is only applicable on fields of type text or blob.

getFieldAlias

public String getFieldAlias()
Returns the Field Alias parameter of this tool . This parameter is the alternate name given to the field name. This name is used to give more descriptive names to cryptic field names. The field alias parameter only applies to geodatabases and coverages. This is an optional parameter.

Returns:
the Field Alias

setFieldAlias

public void setFieldAlias(String fieldAlias)
Sets the Field Alias parameter of this tool . This parameter is the alternate name given to the field name. This name is used to give more descriptive names to cryptic field names. The field alias parameter only applies to geodatabases and coverages. This is an optional parameter.

Parameters:
fieldAlias - the alternate name given to the field name. This name is used to give more descriptive names to cryptic field names. The field alias parameter only applies to geodatabases and coverages.

getFieldIsNullable

public String getFieldIsNullable()
Returns the Field IsNullable parameter of this tool . This parameter is a geographic feature where there is no associated attribute information. These are different from zero or empty fields and are only supported for fields in a geodatabase. This is an optional parameter.

Returns:
the Field IsNullable

setFieldIsNullable

public void setFieldIsNullable(String fieldIsNullable)
Sets the Field IsNullable parameter of this tool . This parameter is a geographic feature where there is no associated attribute information. These are different from zero or empty fields and are only supported for fields in a geodatabase. This is an optional parameter.

Parameters:
fieldIsNullable - a geographic feature where there is no associated attribute information. These are different from zero or empty fields and are only supported for fields in a geodatabase.

getFieldIsRequired

public String getFieldIsRequired()
Returns the Field IsRequired parameter of this tool . This parameter is specifies whether the field being created is a required field for the table; only supported for fields in a geodatabase. This is an optional parameter.

Returns:
the Field IsRequired

setFieldIsRequired

public void setFieldIsRequired(String fieldIsRequired)
Sets the Field IsRequired parameter of this tool . This parameter is specifies whether the field being created is a required field for the table; only supported for fields in a geodatabase. This is an optional parameter.

Parameters:
fieldIsRequired - specifies whether the field being created is a required field for the table; only supported for fields in a geodatabase.

getFieldDomain

public String getFieldDomain()
Returns the Field Domain parameter of this tool . This parameter is used to constrain the values allowed in any particular attribute for a table, feature class, or subtype in a geodatabase. You must specify the name of an existing domain for it to be applied to the field. This is an optional parameter.

Returns:
the Field Domain

setFieldDomain

public void setFieldDomain(String fieldDomain)
Sets the Field Domain parameter of this tool . This parameter is used to constrain the values allowed in any particular attribute for a table, feature class, or subtype in a geodatabase. You must specify the name of an existing domain for it to be applied to the field. This is an optional parameter.

Parameters:
fieldDomain - used to constrain the values allowed in any particular attribute for a table, feature class, or subtype in a geodatabase. You must specify the name of an existing domain for it to be applied to the field.

getOutTable

public Object getOutTable()
Returns the Output Feature Class parameter of this tool (Read only). This is an derived parameter.

Returns:
the Output Feature Class

getToolName

public String getToolName()
Returns the name of this tool.

Returns:
the tool name

getToolboxName

public String getToolboxName()
Returns the name of the tool box containing this tool.

Returns:
the tool box name

getToolboxAlias

public String getToolboxAlias()
Returns the alias of the tool box containing this tool.

Returns:
the tool box alias