com.esri.arcgis.geoprocessing
Class GeoProcessor

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

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

COM Class 'GeoProcessor'. Generated 3/19/2015 1:20:44 PM from 'C:\ArcGIS\COM\esriGeoprocessing.olb'

Description 'GeoProcessor Access.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.geoprocessing.IGeoProcessor
IID, IIDefdde95c_61fc_419d_be35_e5f18c7df160, xxDummy
 
Fields inherited from interface com.esri.arcgis.geoprocessing.IGeoProcessor2
IID, IIDcdad9319_2080_4c89_91c6_b679ae671975, xxDummy
 
Constructor Summary
GeoProcessor()
          Constructs a GeoProcessor using ArcGIS Engine.
GeoProcessor(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeoProcessor theGeoProcessor = (GeoProcessor) obj;
 
Method Summary
 void addError(java.lang.String message)
          Output an error message.
 void addMessage(java.lang.String message)
          Output an informative message.
 void addReturnMessage(int index)
          Output message from the last tool executed.
 void addToolbox(java.lang.String toolbox)
          Add a toolbox to the current Geoprocessing session by catalog path.
 void addWarning(java.lang.String message)
          Output a warning message.
 void checkResultStatus(IGeoProcessorResult pGPResult)
          Check for end of result.
 void clearMessages()
          Clear the messages to be returned as tool message when running within a script tool.
 IGeoProcessorResult createResult(java.lang.String toolName, java.lang.String jobID)
          Create a new result object.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IGeoProcessorResult execute(GPTool tool, ITrackCancel pTrackCancel)
          This method executes a GPTool.
 IGeoProcessorResult execute(java.lang.String name, IVariantArray ipValues, ITrackCancel pTrackCancel)
          Execute a tool within the current Geoprocessing session.
 IGeoProcessorResult executeASync(GPTool tool)
          This method executes a GPTool in the background.
 IGeoProcessorResult executeASync(java.lang.String name, IVariantArray ipValues)
          Execute a tool within the current Geoprocessing session.
 boolean exists(java.lang.Object inputValue, java.lang.Object pDataType)
          Test the existence of a given parameter value (GPValue or catalog path) the type of the data is optional.
static java.lang.String getClsid()
          getClsid.
 IDataElement getDataElement(java.lang.Object inputValue, java.lang.Object pDataType)
          Make a dataelement from the given value.
 java.lang.Object getEnvironmentValue(java.lang.String environmentName)
          Retrieve the value of an environment by name.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 int getMaxSeverity()
          Return the maximum severity of the message of the last tool executed.
 java.lang.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.
 java.lang.String getMessages(java.lang.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.
 java.lang.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 isAddToResults()
          Set whether to add results to result view.
 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(java.lang.String toolName)
          Is server tool synchronous.
 boolean isTemporaryMapLayers()
          Set whether new map layers are temporary by default.
 IGpEnumList listDatasets(java.lang.String wildCard, java.lang.String datasetType)
          Return the list of feature datasets within the current workspace.
 IGpEnumList listEnvironments(java.lang.String wildCard)
          Return the list of environments (properties) within the current Geoprocessing session.
 IGpEnumList listFeatureClasses(java.lang.String wildCard, java.lang.String featureType, java.lang.String dataset)
          Return the list of feature classes within the current workspace or feature dataset within the workspace.
 IGpEnumList listRasters(java.lang.String wildCard, java.lang.String rasterType)
          Return the list of rasters within the current workspace.
 IGpEnumList listTables(java.lang.String wildCard, java.lang.String tableType)
          Return the list of tables within the current workspace.
 IGpEnumList listToolboxes(java.lang.String wildCard)
          Return the list of toolboxes within the current Geoprocessing session.
 IGpEnumList listTools(java.lang.String wildCard)
          Return the list of tools within the current Geoprocessing session.
 IGpEnumList listWorkspaces(java.lang.String wildCard, java.lang.String workspaceType)
          Return the list of workspaces within the current workspace (the workspace can be a folder).
 void loadSettings(java.lang.String fileName)
          Load the current settings (toolboxes, environment values, etc) from a file on disk in XML format.
 java.lang.Object open(java.lang.Object value)
          Open an objector a namestring.
 java.lang.String parseFieldName(java.lang.String inputFieldName, java.lang.String workspace)
          Parse a field name within the given workspace.
 java.lang.String parseTableName(java.lang.String inputTableName, java.lang.String workspace)
          Parse a table name within the given workspace.
 java.lang.String qualifyFieldName(java.lang.String inputFieldName, java.lang.String workspace)
          Qualify a field name within the given workspace.
 java.lang.String qualifyTableName(java.lang.String inputTableName, java.lang.String workspace)
          Qualify a table name within the given workspace.
 void registerGeoProcessorEvents(IGeoProcessorEvents pGeoProcessorEvents)
          Register an object to recieve IGeoProcessorEvents.
 void registerGeoProcessorEvents3(IGeoProcessorEvents3 pGeoProcessorEvents3)
          Register an object to recieve IGeoProcessorEvents3.
 void release()
          Release a GeoProcessor.
 void removeToolbox(java.lang.String toolbox)
          Remove a toolbox from the current Geoprocessing session by catalog path.
 void resetEnvironments()
          Reset the environments to their initial state.
 void saveSettings(java.lang.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 setAddToResults(boolean addToResults)
          Set whether to add results to result view.
 void setEnvironmentValue(java.lang.String environmentName, java.lang.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, java.lang.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.
 java.lang.String testSchemaLock(java.lang.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.
 void unRegisterGeoProcessorEvents3(IGeoProcessorEvents3 pGeoProcessorEvents3)
          UnRegister an object to stop recieving IGeoProcessorEvents3.
 java.lang.String usage(java.lang.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(java.lang.String name, IVariantArray ipValues, boolean bUpdateValues)
          Validate the parameters (input) of a tool within the current Geoprocessing session.
 java.lang.String validateFieldName(java.lang.String inputFieldName, java.lang.String workspace)
          Validate a field name within the given workspace.
 java.lang.String validateTableName(java.lang.String inputTableName, java.lang.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
 

Constructor Detail

GeoProcessor

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

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

GeoProcessor

public GeoProcessor(java.lang.Object obj)
             throws java.io.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:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a GeoProcessor.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getEnvironmentValue

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

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

setEnvironmentValue

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

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

resetEnvironments

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

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

execute

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

Specified by:
execute in interface IGeoProcessor
Specified by:
execute in interface IGeoProcessor2
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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validate

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

Specified by:
validate in interface IGeoProcessor
Specified by:
validate in interface IGeoProcessor2
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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

open

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

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

getDataElement

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

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

listTools

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

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

listEnvironments

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

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

listToolboxes

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

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

addToolbox

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

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

removeToolbox

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

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

setAddOutputsToMap

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

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

isAddOutputsToMap

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

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

setOverwriteOutput

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

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

isOverwriteOutput

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

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

setTemporaryMapLayers

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

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

isTemporaryMapLayers

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

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

setLogHistory

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

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

isLogHistory

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

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

getReturnMessages

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

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

getMessageCount

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

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

getMessage

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

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

getSeverity

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

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

getReturnCode

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

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

getMessages

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

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

getMaxSeverity

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

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

addMessage

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

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

addError

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

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

addWarning

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

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

addReturnMessage

public void addReturnMessage(int index)
                      throws java.io.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

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

clearMessages

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

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

getParameterCount

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

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

getParameterValue

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

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

setParameterValue

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

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

exists

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

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

usage

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

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

listFeatureClasses

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

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

listDatasets

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

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

listWorkspaces

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

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

listTables

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

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

listRasters

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

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

validateFieldName

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

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

validateTableName

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

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

qualifyFieldName

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

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

qualifyTableName

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

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

parseFieldName

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

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

parseTableName

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

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

saveSettings

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

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

loadSettings

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

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

testSchemaLock

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

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

registerGeoProcessorEvents

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

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

unRegisterGeoProcessorEvents

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

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

createResult

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

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

isSynchronous

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

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

executeASync

public IGeoProcessorResult executeASync(java.lang.String name,
                                        IVariantArray ipValues)
                                 throws java.io.IOException,
                                        AutomationException
Execute a tool within the current Geoprocessing session.

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

registerGeoProcessorEvents3

public void registerGeoProcessorEvents3(IGeoProcessorEvents3 pGeoProcessorEvents3)
                                 throws java.io.IOException,
                                        AutomationException
Register an object to recieve IGeoProcessorEvents3.

Specified by:
registerGeoProcessorEvents3 in interface IGeoProcessor2
Parameters:
pGeoProcessorEvents3 - A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorEvents3 (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unRegisterGeoProcessorEvents3

public void unRegisterGeoProcessorEvents3(IGeoProcessorEvents3 pGeoProcessorEvents3)
                                   throws java.io.IOException,
                                          AutomationException
UnRegister an object to stop recieving IGeoProcessorEvents3.

Specified by:
unRegisterGeoProcessorEvents3 in interface IGeoProcessor2
Parameters:
pGeoProcessorEvents3 - A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorEvents3 (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkResultStatus

public void checkResultStatus(IGeoProcessorResult pGPResult)
                       throws java.io.IOException,
                              AutomationException
Check for end of result.

Specified by:
checkResultStatus in interface IGeoProcessor2
Parameters:
pGPResult - A reference to a com.esri.arcgis.geoprocessing.IGeoProcessorResult (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAddToResults

public void setAddToResults(boolean addToResults)
                     throws java.io.IOException,
                            AutomationException
Set whether to add results to result view.

Specified by:
setAddToResults in interface IGeoProcessor2
Parameters:
addToResults - The addToResults (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAddToResults

public boolean isAddToResults()
                       throws java.io.IOException,
                              AutomationException
Set whether to add results to result view.

Specified by:
isAddToResults in interface IGeoProcessor2
Returns:
The addToResults
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public IGeoProcessorResult execute(GPTool tool,
                                   ITrackCancel pTrackCancel)
                            throws java.io.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:
java.io.IOException

executeASync

public IGeoProcessorResult executeASync(GPTool tool)
                                 throws java.io.IOException
This method executes a GPTool in the background. This method will return immediately after submitting the GPTool for execution. Notifications about the progress of the tool's execution will be sent through the IGeoProcessorEvents3 interface. Interested client programs should register an event listener that implements IGeoProcessoeEvents3, with the Geoprocessor Geoprocessor.

Parameters:
tool - GPTool - A tool with all it's required values set.
Returns:
IGeoProcessorResult The result from the Geoprocessor
Throws:
java.io.IOException

validate

public IGPMessages validate(GPTool tool,
                            boolean bUpdateValues)
                     throws java.io.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:
java.io.IOException