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

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

public class CalculateValue
extends AbstractGPTool

Calculate Value tool returns a value based on a specified Python expression. The Calculate Value 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
CalculateValue()
          Creates the Calculate Value tool with defaults.
CalculateValue(Object expression)
          Creates the Calculate Value tool with the required parameters.
 
Method Summary
 String getCodeBlock()
          Returns the Code Block parameter of this tool .
 String getDataType()
          Returns the Data type parameter of this tool .
 Object getExpression()
          Returns the Expression 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.
 Object getValue()
          Returns the output_value parameter of this tool (Read only).
 void setCodeBlock(String codeBlock)
          Sets the Code Block parameter of this tool .
 void setDataType(String dataType)
          Sets the Data type parameter of this tool .
 void setExpression(Object expression)
          Sets the Expression 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

CalculateValue

public CalculateValue()
Creates the Calculate Value tool with defaults.

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


CalculateValue

public CalculateValue(Object expression)
Creates the Calculate Value 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:
expression - the Python expression to be evaluated.
Method Detail

getExpression

public Object getExpression()
Returns the Expression parameter of this tool . This parameter is the Python expression to be evaluated. This is a required parameter.

Returns:
the Expression

setExpression

public void setExpression(Object expression)
Sets the Expression parameter of this tool . This parameter is the Python expression to be evaluated. This is a required parameter.

Parameters:
expression - the Python expression to be evaluated.

getCodeBlock

public String getCodeBlock()
Returns the Code Block parameter of this tool . This parameter is additional Python code. Code in the code block can be referenced in the Expression parameter. This is an optional parameter.

Returns:
the Code Block

setCodeBlock

public void setCodeBlock(String codeBlock)
Sets the Code Block parameter of this tool . This parameter is additional Python code. Code in the code block can be referenced in the Expression parameter. This is an optional parameter.

Parameters:
codeBlock - additional Python code. Code in the code block can be referenced in the Expression parameter.

getDataType

public String getDataType()
Returns the Data type parameter of this tool . This parameter is the data type of the output returned from the Python expression. This parameter should be used in ModelBuilder to help chain Calculate Value with other tools. This is an optional parameter.

Returns:
the Data type

setDataType

public void setDataType(String dataType)
Sets the Data type parameter of this tool . This parameter is the data type of the output returned from the Python expression. This parameter should be used in ModelBuilder to help chain Calculate Value with other tools. This is an optional parameter.

Parameters:
dataType - the data type of the output returned from the Python expression. This parameter should be used in ModelBuilder to help chain Calculate Value with other tools.

getValue

public Object getValue()
Returns the output_value parameter of this tool (Read only). This is an derived parameter.

Returns:
the output_value

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