Class GeoprocessingDataFile
- All Implemented Interfaces:
RemoteResource
- Direct Known Subclasses:
GeoprocessingRaster
- Since:
- 100.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
GeoprocessingParameter.Type
-
Constructor Summary
ConstructorDescriptionCreates an instance.GeoprocessingDataFile
(String inputUrl) Create a geoprocessing data parameter with the given URL. -
Method Summary
Modifier and TypeMethodDescriptionfetchFileAsync
(String filePath) Asynchronously fetches the data file at the url indicated bygetUrl()
.Gets the credential used to authenticate the user with the geoprocessing service.Gets the input file path set on this data file parameter.Gets the RequestConfiguration object that contains parameters used when making a request by this parameter - SeefetchFileAsync(String)
.Gets the upload ID of this parameter.getUrl()
Gets the URL of this parameter.void
setCredential
(Credential credential) Sets the credential used to authenticate the user with the geoprocessing service.void
setInputFilePath
(String inputFilePath) Sets the input file path of this parameter.void
setRequestConfiguration
(RequestConfiguration requestConfiguration) Sets the configuration parameters used for sending a network request using this parameter object - SeefetchFileAsync(String)
.void
setUploadId
(String uploadId) Sets the upload item ID of this parameter.void
Sets the URL of this parameter.
-
Constructor Details
-
GeoprocessingDataFile
public GeoprocessingDataFile()Creates an instance. The input url defaults to an empty string.- Since:
- 100.0.0
-
GeoprocessingDataFile
Create a geoprocessing data parameter with the given URL.- Parameters:
inputUrl
- the URL of the data file location- Throws:
NullPointerException
- if inputUrl is null- Since:
- 100.0.0
-
-
Method Details
-
getUrl
Gets the URL of this parameter. This will be the location of the data file for an input parameter.This is only for input parameters to a URL containing the input data file. Ensure this URL is accessible to the service. A geoprocessing service can have an uploads rest resource associated with it for placing inputs.
Note that if inputFilePath or uploadId are set the URL property will be ignored.
- Returns:
- the URL of this parameter
- Since:
- 100.0.0
- See Also:
-
setUrl
Sets the URL of this parameter. This will be the location of the data file for an input parameter.This is only for input parameters to a URL containing the input data file. Ensure this URL is accessible to the service. A geoprocessing service can have an uploads rest resource associated with it for placing inputs.
Note that if inputFilePath or uploadId are set the URL property will be ignored.
- Parameters:
url
- the URL of this parameter- Since:
- 100.0.0
- See Also:
-
setUploadId
Sets the upload item ID of this parameter. This should be the ID of an item in the geoprocessing service's uploads resource. This will be the upload ID of an item previously uploaded to the server. Note that if this property is set it will cause both the values ofgetInputFilePath()
andgetUrl()
to be ignored.- Parameters:
uploadId
- the upload ID- Throws:
IllegalArgumentException
- if the upload ID is null or empty- Since:
- 100.1.0
-
getUploadId
Gets the upload ID of this parameter. This will match the ID of an item in the geoprocessing service's uploads resource.- Returns:
- the upload ID
- Since:
- 100.1.0
-
setInputFilePath
Sets the input file path of this parameter. This should be the location on disk of a file that will be uploaded to the server that the geoprocessing task will run on. Setting this will mean that the value ofgetUrl()
will be ignored. Note that this property will be ignored if an upload ID is set.- Parameters:
inputFilePath
- path to the input file- Since:
- 100.1.0
-
getInputFilePath
Gets the input file path set on this data file parameter.- Returns:
- the input file path
- Since:
- 100.1.0
-
fetchFileAsync
Asynchronously fetches the data file at the url indicated bygetUrl()
.If filePath is a directory, the file will be given the name of the file taken from the end of the
GeoprocessingDataFile.getUrl()
. Alternatively filePath can be a destination filename within an existing directory. Note that any pre-existing file at that location with the same name will be deleted first.- Parameters:
filePath
- path to a directory or full file name- Throws:
IllegalArgumentException
- if filePath is nullIllegalArgumentException
- if filePath is empty- Since:
- 100.0.0
-
getCredential
Gets the credential used to authenticate the user with the geoprocessing service.- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the credential used for authentication
- Since:
- 100.0.0
-
setCredential
Sets the credential used to authenticate the user with the geoprocessing service.- Specified by:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the credential used for authentication- Since:
- 100.0.0
-
getRequestConfiguration
Gets the RequestConfiguration object that contains parameters used when making a request by this parameter - SeefetchFileAsync(String)
.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0
- See Also:
-
setRequestConfiguration
Sets the configuration parameters used for sending a network request using this parameter object - SeefetchFileAsync(String)
. The global RequestConfiguration is used if no RequestConfiguration is set which contains the default values from the getter/setter methods.- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- contains the parameters to use- Since:
- 100.0.0
- See Also:
-