com.esri.arcgis.geoprocessing
Class GeoProcessor

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.GeoProcessor
All Implemented Interfaces:
IGeoProcessor, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class GeoProcessor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGeoProcessor

GeoProcessor Access.

Remarks

A geoprocessing tool is executed by a geoprocessor. The geoprocessor is a helper object that simplifies the task of executing tools. Toolboxes define the set of tools available for the geoprocessor. Toolboxes can be added and removed from the geoprocessor.

Product Availability

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

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GeoProcessor()
          Constructs a GeoProcessor using ArcGIS Engine.
GeoProcessor(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeoProcessor theGeoProcessor = (GeoProcessor) obj;
 
Method Summary
 void addError(String message)
          Output an error message.
 void addMessage(String message)
          Output an informative message.
 void addReturnMessage(int index)
          Output message from the last tool executed.
 void addToolbox(String toolbox)
          Add a toolbox to the current Geoprocessing session by catalog path.
 void addWarning(String message)
          Output a warning message.
 void clearMessages()
          Clear the messages to be returned as tool message when running within a script tool.
 IGeoProcessorResult createResult(String toolName, String jobID)
          Create a new result object.
 boolean equals(Object o)
          Compare this object with another
 IGeoProcessorResult execute(GPTool tool, ITrackCancel pTrackCancel)
          This method executes a GPTool.
 IGeoProcessorResult execute(String name, IVariantArray ipValues, ITrackCancel pTrackCancel)
          Execute a tool within the current Geoprocessing session.
 boolean exists(Object inputValue, Object pDataType)
          Test the existence of a given parameter value (GPValue or catalog path) the type of the data is optional.
static String getClsid()
          getClsid.
 IDataElement getDataElement(Object inputValue, Object pDataType)
          Make a dataelement from the given value.
 Object getEnvironmentValue(String environmentName)
          Retrieve the value of an environment by name.
 int getMaxSeverity()
          Return the maximum severity of the message of the last tool executed.
 String getMessage(int index)
          Return the message description by index of the last tool executed.
 int getMessageCount()
          Return the number of messages of the last tool executed.
 String getMessages(Object pSeverity)
          Return all of the message descriptions of the last tool executed.
 int getParameterCount()
          Return the number of input command line or script tool parameters.
 Object getParameterValue(int index)
          Return the input command line or script tool parameter by index as a GPValue.
 int getReturnCode(int index)
          Return the message error code (Error Messages Only) by index of the last tool executed.
 IGPMessages getReturnMessages()
          Return the GPMessages object which will be messages of the last tool executed.
 int getSeverity(int index)
          Return the message severity by index of the last tool executed.
 int hashCode()
          the hashcode for this object
 boolean isAddOutputsToMap()
          Set whether resulting output datasets should be added to the application display.
 boolean isLogHistory()
          Set whether or not to log the execution of geoprocessing tools.
 boolean isOverwriteOutput()
          Set the overwrite outputs flag within the current Geoprocessing session.
 boolean isSynchronous(String toolName)
          Is server tool synchronous.
 boolean isTemporaryMapLayers()
          Set whether new map layers are temporary by default.
 IGpEnumList listDatasets(String wildCard, String datasetType)
          Return the list of feature datasets within the current workspace.
 IGpEnumList listEnvironments(String wildCard)
          Return the list of environments (properties) within the current Geoprocessing session.
 IGpEnumList listFeatureClasses(String wildCard, String featureType, String dataset)
          Return the list of feature classes within the current workspace or feature dataset within the workspace.
 IGpEnumList listRasters(String wildCard, String rasterType)
          Return the list of rasters within the current workspace.
 IGpEnumList listTables(String wildCard, String tableType)
          Return the list of tables within the current workspace.
 IGpEnumList listToolboxes(String wildCard)
          Return the list of toolboxes within the current Geoprocessing session.
 IGpEnumList listTools(String wildCard)
          Return the list of tools within the current Geoprocessing session.
 IGpEnumList listWorkspaces(String wildCard, String workspaceType)
          Return the list of workspaces within the current workspace (the workspace can be a folder).
 void loadSettings(String fileName)
          Load the current settings (toolboxes, environment values, etc) from a file on disk in XML format.
 Object open(Object value)
          Open an objector a namestring.
 String parseFieldName(String inputFieldName, String workspace)
          Parse a field name within the given workspace.
 String parseTableName(String inputTableName, String workspace)
          Parse a table name within the given workspace.
 String qualifyFieldName(String inputFieldName, String workspace)
          Qualify a field name within the given workspace.
 String qualifyTableName(String inputTableName, String workspace)
          Qualify a table name within the given workspace.
 void registerGeoProcessorEvents(IGeoProcessorEvents pGeoProcessorEvents)
          Register an object to recieve IGeoProcessorEvents.
 void removeToolbox(String toolbox)
          Remove a toolbox from the current Geoprocessing session by catalog path.
 void resetEnvironments()
          Reset the environments to their initial state.
 void saveSettings(String fileName)
          Save the current settings (toolboxes, environment values, etc) to a file on disk in XML format.
 void setAddOutputsToMap(boolean addToMap)
          Set whether resulting output datasets should be added to the application display.
 void setEnvironmentValue(String environmentName, Object value)
          Update the value of an environment by name.
 void setLogHistory(boolean logHistory)
          Set whether or not to log the execution of geoprocessing tools.
 void setOverwriteOutput(boolean pOverrideOutput)
          Set the overwrite outputs flag within the current Geoprocessing session.
 void setParameterValue(int index, Object value)
          Set the output script tool parameter by index as a GPValue.
 void setTemporaryMapLayers(boolean temporaryMapLayers)
          Set whether new map layers are temporary by default.
 String testSchemaLock(String fileName)
          Test for the presence of a schema lock (already open for writing) of a given file or dataset.
 void unRegisterGeoProcessorEvents(IGeoProcessorEvents pGeoProcessorEvents)
          UnRegister an object to stop recieving IGeoProcessorEvents.
 String usage(String method)
          Returns the command line usage of a given tool by name.
 IGPMessages validate(GPTool tool, boolean bUpdateValues)
          This method validates the parameters of the tool before execution.
 IGPMessages validate(String name, IVariantArray ipValues, boolean bUpdateValues)
          Validate the parameters (input) of a tool within the current Geoprocessing session.
 String validateFieldName(String inputFieldName, String workspace)
          Validate a field name within the given workspace.
 String validateTableName(String inputTableName, String workspace)
          Validate a table or feature class name within the given workspace.
 
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

GeoProcessor

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

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

GeoProcessor

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

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

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

getEnvironmentValue

public Object getEnvironmentValue(String environmentName)
                           throws IOException,
                                  AutomationException
Retrieve the value of an environment by name. The properties of the current Geoprocessing session.

Product Availability

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

Specified by:
getEnvironmentValue in interface IGeoProcessor
Parameters:
environmentName - The environmentName (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEnvironmentValue

public void setEnvironmentValue(String environmentName,
                                Object value)
                         throws IOException,
                                AutomationException
Update the value of an environment by name. The properties of the current Geoprocessing session.

Product Availability

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

Specified by:
setEnvironmentValue in interface IGeoProcessor
Parameters:
environmentName - The environmentName (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resetEnvironments

public void resetEnvironments()
                       throws IOException,
                              AutomationException
Reset the environments to their initial state.

Product Availability

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

Specified by:
resetEnvironments in interface IGeoProcessor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public IGeoProcessorResult execute(String name,
                                   IVariantArray ipValues,
                                   ITrackCancel pTrackCancel)
                            throws IOException,
                                   AutomationException
Execute a tool within the current Geoprocessing session.

Product Availability

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

Specified by:
execute in interface IGeoProcessor
Parameters:
name - The name (in)
ipValues - A reference to a com.esri.arcgis.system.IVariantArray (in)
pTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validate

public IGPMessages validate(String name,
                            IVariantArray ipValues,
                            boolean bUpdateValues)
                     throws IOException,
                            AutomationException
Validate the parameters (input) of a tool within the current Geoprocessing session.

Product Availability

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

Specified by:
validate in interface IGeoProcessor
Parameters:
name - The name (in)
ipValues - A reference to a com.esri.arcgis.system.IVariantArray (in)
bUpdateValues - The bUpdateValues (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessages
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

open

public Object open(Object value)
            throws IOException,
                   AutomationException
Open an objector a namestring. Example a DEFeatureClass object will return an IFeatureClass.

Product Availability

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

Specified by:
open in interface IGeoProcessor
Parameters:
value - A Variant (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataElement

public IDataElement getDataElement(Object inputValue,
                                   Object pDataType)
                            throws IOException,
                                   AutomationException
Make a dataelement from the given value.

Product Availability

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

Specified by:
getDataElement in interface IGeoProcessor
Parameters:
inputValue - A Variant (in)
pDataType - A Variant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listTools

public IGpEnumList listTools(String wildCard)
                      throws IOException,
                             AutomationException
Return the list of tools within the current Geoprocessing session.

Product Availability

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

Specified by:
listTools in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listEnvironments

public IGpEnumList listEnvironments(String wildCard)
                             throws IOException,
                                    AutomationException
Return the list of environments (properties) within the current Geoprocessing session.

Product Availability

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

Specified by:
listEnvironments in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listToolboxes

public IGpEnumList listToolboxes(String wildCard)
                          throws IOException,
                                 AutomationException
Return the list of toolboxes within the current Geoprocessing session.

Product Availability

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

Specified by:
listToolboxes in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addToolbox

public void addToolbox(String toolbox)
                throws IOException,
                       AutomationException
Add a toolbox to the current Geoprocessing session by catalog path.

Product Availability

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

Supported Platforms

Windows

Specified by:
addToolbox in interface IGeoProcessor
Parameters:
toolbox - The toolbox (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeToolbox

public void removeToolbox(String toolbox)
                   throws IOException,
                          AutomationException
Remove a toolbox from the current Geoprocessing session by catalog path.

Product Availability

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

Supported Platforms

Windows

Specified by:
removeToolbox in interface IGeoProcessor
Parameters:
toolbox - The toolbox (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAddOutputsToMap

public void setAddOutputsToMap(boolean addToMap)
                        throws IOException,
                               AutomationException
Set whether resulting output datasets should be added to the application display.

Product Availability

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

Specified by:
setAddOutputsToMap in interface IGeoProcessor
Parameters:
addToMap - The addToMap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAddOutputsToMap

public boolean isAddOutputsToMap()
                          throws IOException,
                                 AutomationException
Set whether resulting output datasets should be added to the application display.

Product Availability

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

Specified by:
isAddOutputsToMap in interface IGeoProcessor
Returns:
The addToMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOverwriteOutput

public void setOverwriteOutput(boolean pOverrideOutput)
                        throws IOException,
                               AutomationException
Set the overwrite outputs flag within the current Geoprocessing session. True means outputs of tools will be overwritten.

Product Availability

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

Specified by:
setOverwriteOutput in interface IGeoProcessor
Parameters:
pOverrideOutput - The pOverrideOutput (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isOverwriteOutput

public boolean isOverwriteOutput()
                          throws IOException,
                                 AutomationException
Set the overwrite outputs flag within the current Geoprocessing session. True means outputs of tools will be overwritten.

Product Availability

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

Specified by:
isOverwriteOutput in interface IGeoProcessor
Returns:
The pOverrideOutput
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTemporaryMapLayers

public void setTemporaryMapLayers(boolean temporaryMapLayers)
                           throws IOException,
                                  AutomationException
Set whether new map layers are temporary by default.

Product Availability

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

Specified by:
setTemporaryMapLayers in interface IGeoProcessor
Parameters:
temporaryMapLayers - The temporaryMapLayers (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTemporaryMapLayers

public boolean isTemporaryMapLayers()
                             throws IOException,
                                    AutomationException
Set whether new map layers are temporary by default.

Product Availability

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

Specified by:
isTemporaryMapLayers in interface IGeoProcessor
Returns:
The temporaryMapLayers
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLogHistory

public void setLogHistory(boolean logHistory)
                   throws IOException,
                          AutomationException
Set whether or not to log the execution of geoprocessing tools.

Product Availability

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

Specified by:
setLogHistory in interface IGeoProcessor
Parameters:
logHistory - The logHistory (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLogHistory

public boolean isLogHistory()
                     throws IOException,
                            AutomationException
Set whether or not to log the execution of geoprocessing tools.

Product Availability

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

Specified by:
isLogHistory in interface IGeoProcessor
Returns:
The logHistory
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReturnMessages

public IGPMessages getReturnMessages()
                              throws IOException,
                                     AutomationException
Return the GPMessages object which will be messages of the last tool executed.

Product Availability

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

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

getMessageCount

public int getMessageCount()
                    throws IOException,
                           AutomationException
Return the number of messages of the last tool executed.

Product Availability

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

Specified by:
getMessageCount in interface IGeoProcessor
Returns:
The pCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

public String getMessage(int index)
                  throws IOException,
                         AutomationException
Return the message description by index of the last tool executed.

Product Availability

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

Specified by:
getMessage in interface IGeoProcessor
Parameters:
index - The index (in)
Returns:
The pMessage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSeverity

public int getSeverity(int index)
                throws IOException,
                       AutomationException
Return the message severity by index of the last tool executed.

Product Availability

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

Specified by:
getSeverity in interface IGeoProcessor
Parameters:
index - The index (in)
Returns:
The pSeverity
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReturnCode

public int getReturnCode(int index)
                  throws IOException,
                         AutomationException
Return the message error code (Error Messages Only) by index of the last tool executed.

Product Availability

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

Specified by:
getReturnCode in interface IGeoProcessor
Parameters:
index - The index (in)
Returns:
The pCode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessages

public String getMessages(Object pSeverity)
                   throws IOException,
                          AutomationException
Return all of the message descriptions of the last tool executed.

Product Availability

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

Specified by:
getMessages in interface IGeoProcessor
Parameters:
pSeverity - A Variant (in)
Returns:
The pMessages
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxSeverity

public int getMaxSeverity()
                   throws IOException,
                          AutomationException
Return the maximum severity of the message of the last tool executed.

Product Availability

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

Specified by:
getMaxSeverity in interface IGeoProcessor
Returns:
The pSeverity
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addMessage

public void addMessage(String message)
                throws IOException,
                       AutomationException
Output an informative message. When running within a script tool, message becomes part of the tool messages, otherwise outputs to console

Product Availability

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

Specified by:
addMessage in interface IGeoProcessor
Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addError

public void addError(String message)
              throws IOException,
                     AutomationException
Output an error message. When running within a script tool, message becomes part of the tool messages, otherwise outputs to console

Product Availability

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

Specified by:
addError in interface IGeoProcessor
Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addWarning

public void addWarning(String message)
                throws IOException,
                       AutomationException
Output a warning message. When running within a script tool, message becomes part of the tool messages, otherwise outputs to console

Product Availability

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

Specified by:
addWarning in interface IGeoProcessor
Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addReturnMessage

public void addReturnMessage(int index)
                      throws IOException,
                             AutomationException
Output message from the last tool executed. When running within a script tool, message becomes part of the tool messages, otherwise outputs to console

Product Availability

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

Specified by:
addReturnMessage in interface IGeoProcessor
Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearMessages

public void clearMessages()
                   throws IOException,
                          AutomationException
Clear the messages to be returned as tool message when running within a script tool.

Product Availability

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

Specified by:
clearMessages in interface IGeoProcessor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParameterCount

public int getParameterCount()
                      throws IOException,
                             AutomationException
Return the number of input command line or script tool parameters.

Product Availability

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

Specified by:
getParameterCount in interface IGeoProcessor
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getParameterValue

public Object getParameterValue(int index)
                         throws IOException,
                                AutomationException
Return the input command line or script tool parameter by index as a GPValue.

Product Availability

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

Specified by:
getParameterValue in interface IGeoProcessor
Parameters:
index - The index (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setParameterValue

public void setParameterValue(int index,
                              Object value)
                       throws IOException,
                              AutomationException
Set the output script tool parameter by index as a GPValue.

Product Availability

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

Specified by:
setParameterValue in interface IGeoProcessor
Parameters:
index - The index (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exists

public boolean exists(Object inputValue,
                      Object pDataType)
               throws IOException,
                      AutomationException
Test the existence of a given parameter value (GPValue or catalog path) the type of the data is optional.

Product Availability

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

Specified by:
exists in interface IGeoProcessor
Parameters:
inputValue - A Variant (in)
pDataType - A Variant (in)
Returns:
The exists
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

usage

public String usage(String method)
             throws IOException,
                    AutomationException
Returns the command line usage of a given tool by name.

Product Availability

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

Supported Platforms

Windows

Specified by:
usage in interface IGeoProcessor
Parameters:
method - The method (in)
Returns:
The usage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listFeatureClasses

public IGpEnumList listFeatureClasses(String wildCard,
                                      String featureType,
                                      String dataset)
                               throws IOException,
                                      AutomationException
Return the list of feature classes within the current workspace or feature dataset within the workspace.

Product Availability

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

Specified by:
listFeatureClasses in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
featureType - The featureType (in)
dataset - The dataset (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listDatasets

public IGpEnumList listDatasets(String wildCard,
                                String datasetType)
                         throws IOException,
                                AutomationException
Return the list of feature datasets within the current workspace.

Product Availability

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

Specified by:
listDatasets in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
datasetType - The datasetType (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listWorkspaces

public IGpEnumList listWorkspaces(String wildCard,
                                  String workspaceType)
                           throws IOException,
                                  AutomationException
Return the list of workspaces within the current workspace (the workspace can be a folder).

Product Availability

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

Specified by:
listWorkspaces in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
workspaceType - The workspaceType (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listTables

public IGpEnumList listTables(String wildCard,
                              String tableType)
                       throws IOException,
                              AutomationException
Return the list of tables within the current workspace.

Product Availability

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

Specified by:
listTables in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
tableType - The tableType (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

listRasters

public IGpEnumList listRasters(String wildCard,
                               String rasterType)
                        throws IOException,
                               AutomationException
Return the list of rasters within the current workspace.

Product Availability

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

Specified by:
listRasters in interface IGeoProcessor
Parameters:
wildCard - The wildCard (in)
rasterType - The rasterType (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGpEnumList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateFieldName

public String validateFieldName(String inputFieldName,
                                String workspace)
                         throws IOException,
                                AutomationException
Validate a field name within the given workspace.

Product Availability

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

Specified by:
validateFieldName in interface IGeoProcessor
Parameters:
inputFieldName - The inputFieldName (in)
workspace - The workspace (in)
Returns:
The outputFieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validateTableName

public String validateTableName(String inputTableName,
                                String workspace)
                         throws IOException,
                                AutomationException
Validate a table or feature class name within the given workspace.

Product Availability

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

Specified by:
validateTableName in interface IGeoProcessor
Parameters:
inputTableName - The inputTableName (in)
workspace - The workspace (in)
Returns:
The outputTableName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

qualifyFieldName

public String qualifyFieldName(String inputFieldName,
                               String workspace)
                        throws IOException,
                               AutomationException
Qualify a field name within the given workspace. This will add the connected user and database names.

Product Availability

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

Specified by:
qualifyFieldName in interface IGeoProcessor
Parameters:
inputFieldName - The inputFieldName (in)
workspace - The workspace (in)
Returns:
The outputFieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

qualifyTableName

public String qualifyTableName(String inputTableName,
                               String workspace)
                        throws IOException,
                               AutomationException
Qualify a table name within the given workspace. This will add the connected user and database names.

Product Availability

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

Specified by:
qualifyTableName in interface IGeoProcessor
Parameters:
inputTableName - The inputTableName (in)
workspace - The workspace (in)
Returns:
The outputTableName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseFieldName

public String parseFieldName(String inputFieldName,
                             String workspace)
                      throws IOException,
                             AutomationException
Parse a field name within the given workspace. This will strip the connected user and database names.

Product Availability

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

Specified by:
parseFieldName in interface IGeoProcessor
Parameters:
inputFieldName - The inputFieldName (in)
workspace - The workspace (in)
Returns:
The outputParsedName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseTableName

public String parseTableName(String inputTableName,
                             String workspace)
                      throws IOException,
                             AutomationException
Parse a table name within the given workspace. This will strip the connected user and database names.

Product Availability

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

Specified by:
parseTableName in interface IGeoProcessor
Parameters:
inputTableName - The inputTableName (in)
workspace - The workspace (in)
Returns:
The outputParsedName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveSettings

public void saveSettings(String fileName)
                  throws IOException,
                         AutomationException
Save the current settings (toolboxes, environment values, etc) to a file on disk in XML format.

Product Availability

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

Specified by:
saveSettings in interface IGeoProcessor
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadSettings

public void loadSettings(String fileName)
                  throws IOException,
                         AutomationException
Load the current settings (toolboxes, environment values, etc) from a file on disk in XML format.

Product Availability

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

Specified by:
loadSettings in interface IGeoProcessor
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

testSchemaLock

public String testSchemaLock(String fileName)
                      throws IOException,
                             AutomationException
Test for the presence of a schema lock (already open for writing) of a given file or dataset.

Product Availability

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

Specified by:
testSchemaLock in interface IGeoProcessor
Parameters:
fileName - The fileName (in)
Returns:
The pStatus
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

registerGeoProcessorEvents

public void registerGeoProcessorEvents(IGeoProcessorEvents pGeoProcessorEvents)
                                throws IOException,
                                       AutomationException
Register an object to recieve IGeoProcessorEvents.

Product Availability

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

Specified by:
registerGeoProcessorEvents in interface IGeoProcessor
Parameters:
pGeoProcessorEvents - A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorEvents (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unRegisterGeoProcessorEvents

public void unRegisterGeoProcessorEvents(IGeoProcessorEvents pGeoProcessorEvents)
                                  throws IOException,
                                         AutomationException
UnRegister an object to stop recieving IGeoProcessorEvents.

Product Availability

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

Specified by:
unRegisterGeoProcessorEvents in interface IGeoProcessor
Parameters:
pGeoProcessorEvents - A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorEvents (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createResult

public IGeoProcessorResult createResult(String toolName,
                                        String jobID)
                                 throws IOException,
                                        AutomationException
Create a new result object.

Product Availability

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

Specified by:
createResult in interface IGeoProcessor
Parameters:
toolName - The toolName (in)
jobID - The jobID (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSynchronous

public boolean isSynchronous(String toolName)
                      throws IOException,
                             AutomationException
Is server tool synchronous.

Product Availability

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

Specified by:
isSynchronous in interface IGeoProcessor
Parameters:
toolName - The toolName (in)
Returns:
The isSynchronous
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public IGeoProcessorResult execute(GPTool tool,
                                   ITrackCancel pTrackCancel)
                            throws IOException
This method executes a GPTool. After the execution the Geoprocessor, calling getReturnMessages to view the messages generated by executing this tool.

Parameters:
tool - GPTool - A tool with all it's required values set.
{@link - ITrackCancel} - If you do not wish to allow cancellation of a running Geoproceesing execution then you can pass in null
Returns:
Object The result from the Geoprocessor, which is usually a String or an Object representation of the a native type.
Throws:
IOException

validate

public IGPMessages validate(GPTool tool,
                            boolean bUpdateValues)
                     throws IOException
This method validates the parameters of the tool before execution. Any errors will be returned in the IGPMessages. It can be helpful to call this method before calling execute to catch errors in parameter values on the tool.

Parameters:
tool - The tool to executed
bUpdateValues - determines whether or not to update the values.
Returns:
IGPMessagesthe GPmessages returned from the validate call.
Throws:
IOException