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

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

public class TransposeTimeFields
extends AbstractGPTool

Shifts fields in a table or feature class that have time as the field names from columns to rows. This tool is useful when your table or feature class stores values for each date as multiple columns, where field names might be Year1980, Year1990, Year2000 and so on, and you want to animate your data through time in ArcMap, ArcScene or ArcGlobe. To animate through time you must have one time column only. When a table or feature class is transposed, the string (date value in this case) specified to represent each field name, such as 1980, 1990 and 2000, will be repeated in one field, based on how many locations have values associated with that string. The Transpose Time Fields tool is contained in the Data Management Tools tool box.

Software restrictions: none

Illustration:

Usage tips:


Field Summary
 
Fields inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
vals
 
Constructor Summary
TransposeTimeFields()
          Creates the Transpose Time Fields tool with defaults.
TransposeTimeFields(Object inputFeatureClassOrTable, Object fieldsToTranspose, Object outputFeatureClassOrTable, String timeFieldName, String valueFieldName)
          Creates the Transpose Time Fields tool with the required parameters.
 
Method Summary
 Object getAttributeFields()
          Returns the Attribute Fields parameter of this tool .
 Object getFieldsToTranspose()
          Returns the Fields to Transpose parameter of this tool .
 Object getInputFeatureClassOrTable()
          Returns the Input Feature Class or Table parameter of this tool .
 Object getOutputFeatureClassOrTable()
          Returns the Output Feature Class or Table parameter of this tool .
 String getTimeFieldName()
          Returns the Time Field Name parameter of this tool .
 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.
 String getValueFieldName()
          Returns the Value Field Name parameter of this tool .
 void setAttributeFields(Object attributeFields)
          Sets the Attribute Fields parameter of this tool .
 void setFieldsToTranspose(Object fieldsToTranspose)
          Sets the Fields to Transpose parameter of this tool .
 void setInputFeatureClassOrTable(Object inputFeatureClassOrTable)
          Sets the Input Feature Class or Table parameter of this tool .
 void setOutputFeatureClassOrTable(Object outputFeatureClassOrTable)
          Sets the Output Feature Class or Table parameter of this tool .
 void setTimeFieldName(String timeFieldName)
          Sets the Time Field Name parameter of this tool .
 void setValueFieldName(String valueFieldName)
          Sets the Value Field Name 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

TransposeTimeFields

public TransposeTimeFields()
Creates the Transpose Time Fields tool with defaults.

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


TransposeTimeFields

public TransposeTimeFields(Object inputFeatureClassOrTable,
                           Object fieldsToTranspose,
                           Object outputFeatureClassOrTable,
                           String timeFieldName,
                           String valueFieldName)
Creates the Transpose Time Fields 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:
inputFeatureClassOrTable - Table View, the input feature class or table that contains multiple fields that represent different times.
fieldsToTranspose - String, multiple strings can be entered, depending on how many fields you are transposing. Each string should be formatted as "Field_Name Time" (without the quotation marks). Each is a pair of substrings separated by a space. For example, the following string is a valid input - "POP1980 1980". In this example, POP1980 is the field name of a field containing population values for 1980. 1980 is the string that will be substituted for POP1980 and populated in a time field where it is repeated based on how many population values there are for that date in different locations.
outputFeatureClassOrTable - Table, the output feature class or table. The output table can be specified as a .dbf table, an info table, or a geodatabase table. The output feature class can only be stored in a geodatabase (shapefile is not available as a format for the output). The output feature class or table will contain a time field, a value field, and any number of attribute fields specified that need to be inherited from the input table.
timeFieldName - String, the name of the time field that will be created to store time values. The default name is "Time". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class.
valueFieldName - String, the name of the value field that will be created to store the values from the input table. The default name is "Value". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class.
Method Detail

getInputFeatureClassOrTable

public Object getInputFeatureClassOrTable()
Returns the Input Feature Class or Table parameter of this tool . This parameter is Table View, the input feature class or table that contains multiple fields that represent different times. This is a required parameter.

Returns:
the Input Feature Class or Table

setInputFeatureClassOrTable

public void setInputFeatureClassOrTable(Object inputFeatureClassOrTable)
Sets the Input Feature Class or Table parameter of this tool . This parameter is Table View, the input feature class or table that contains multiple fields that represent different times. This is a required parameter.

Parameters:
inputFeatureClassOrTable - Table View, the input feature class or table that contains multiple fields that represent different times.

getFieldsToTranspose

public Object getFieldsToTranspose()
Returns the Fields to Transpose parameter of this tool . This parameter is String, multiple strings can be entered, depending on how many fields you are transposing. Each string should be formatted as "Field_Name Time" (without the quotation marks). Each is a pair of substrings separated by a space. For example, the following string is a valid input - "POP1980 1980". In this example, POP1980 is the field name of a field containing population values for 1980. 1980 is the string that will be substituted for POP1980 and populated in a time field where it is repeated based on how many population values there are for that date in different locations. This is a required parameter.

Returns:
the Fields to Transpose

setFieldsToTranspose

public void setFieldsToTranspose(Object fieldsToTranspose)
Sets the Fields to Transpose parameter of this tool . This parameter is String, multiple strings can be entered, depending on how many fields you are transposing. Each string should be formatted as "Field_Name Time" (without the quotation marks). Each is a pair of substrings separated by a space. For example, the following string is a valid input - "POP1980 1980". In this example, POP1980 is the field name of a field containing population values for 1980. 1980 is the string that will be substituted for POP1980 and populated in a time field where it is repeated based on how many population values there are for that date in different locations. This is a required parameter.

Parameters:
fieldsToTranspose - String, multiple strings can be entered, depending on how many fields you are transposing. Each string should be formatted as "Field_Name Time" (without the quotation marks). Each is a pair of substrings separated by a space. For example, the following string is a valid input - "POP1980 1980". In this example, POP1980 is the field name of a field containing population values for 1980. 1980 is the string that will be substituted for POP1980 and populated in a time field where it is repeated based on how many population values there are for that date in different locations.

getOutputFeatureClassOrTable

public Object getOutputFeatureClassOrTable()
Returns the Output Feature Class or Table parameter of this tool . This parameter is Table, the output feature class or table. The output table can be specified as a .dbf table, an info table, or a geodatabase table. The output feature class can only be stored in a geodatabase (shapefile is not available as a format for the output). The output feature class or table will contain a time field, a value field, and any number of attribute fields specified that need to be inherited from the input table. This is a required parameter.

Returns:
the Output Feature Class or Table

setOutputFeatureClassOrTable

public void setOutputFeatureClassOrTable(Object outputFeatureClassOrTable)
Sets the Output Feature Class or Table parameter of this tool . This parameter is Table, the output feature class or table. The output table can be specified as a .dbf table, an info table, or a geodatabase table. The output feature class can only be stored in a geodatabase (shapefile is not available as a format for the output). The output feature class or table will contain a time field, a value field, and any number of attribute fields specified that need to be inherited from the input table. This is a required parameter.

Parameters:
outputFeatureClassOrTable - Table, the output feature class or table. The output table can be specified as a .dbf table, an info table, or a geodatabase table. The output feature class can only be stored in a geodatabase (shapefile is not available as a format for the output). The output feature class or table will contain a time field, a value field, and any number of attribute fields specified that need to be inherited from the input table.

getTimeFieldName

public String getTimeFieldName()
Returns the Time Field Name parameter of this tool . This parameter is String, the name of the time field that will be created to store time values. The default name is "Time". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class. This is a required parameter.

Returns:
the Time Field Name

setTimeFieldName

public void setTimeFieldName(String timeFieldName)
Sets the Time Field Name parameter of this tool . This parameter is String, the name of the time field that will be created to store time values. The default name is "Time". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class. This is a required parameter.

Parameters:
timeFieldName - String, the name of the time field that will be created to store time values. The default name is "Time". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class.

getValueFieldName

public String getValueFieldName()
Returns the Value Field Name parameter of this tool . This parameter is String, the name of the value field that will be created to store the values from the input table. The default name is "Value". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class. This is a required parameter.

Returns:
the Value Field Name

setValueFieldName

public void setValueFieldName(String valueFieldName)
Sets the Value Field Name parameter of this tool . This parameter is String, the name of the value field that will be created to store the values from the input table. The default name is "Value". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class. This is a required parameter.

Parameters:
valueFieldName - String, the name of the value field that will be created to store the values from the input table. The default name is "Value". Any valid field name can be set, as long as it does not conflict with existing field names from the input table or feature class.

getAttributeFields

public Object getAttributeFields()
Returns the Attribute Fields parameter of this tool . This parameter is Field, attribute fields from the input table to be included in the output table. This is an optional parameter.

Returns:
the Attribute Fields

setAttributeFields

public void setAttributeFields(Object attributeFields)
Sets the Attribute Fields parameter of this tool . This parameter is Field, attribute fields from the input table to be included in the output table. This is an optional parameter.

Parameters:
attributeFields - Field, attribute fields from the input table to be included in the output table.

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