Class GeoprocessingFeatures
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
-
- com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingFeatures
-
- All Implemented Interfaces:
RemoteResource
public final class GeoprocessingFeatures extends GeoprocessingParameter implements RemoteResource
Corresponds to GPRecordSet and GPFeatureRecordSetLayer parameter types in the service REST specification.
A geoprocessing features has a
getFeatures()
method that returns aFeatureSet
. You can callGeoElement.getAttributes()
on theseFeature
s to get the attributes. Note that these features are not held in aFeatureTable
.When geoprocessing features are returned as an output parameter the returned results are provided as a
GeoprocessingFeatureSet
. These features can be visualized on a map using temporaryGraphic
in aGraphicsOverlay
or using aFeatureCollectionTable
in aFeatureLayer
. If the geoprocessing service is configured to use a result map server, thenGeoprocessingResult.getMapImageLayer()
can be used to visualize the results using the symbology predefined by the service.When providing geoprocessing features as an input to the
GeoprocessingTask
, features can be provided directly from aFeatureQueryResult
. If there is a need to create a new set a features or records,FeatureCollectionTable
can be used.- Since:
- 100.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
GeoprocessingParameter.Type
-
-
Constructor Summary
Constructors Constructor Description GeoprocessingFeatures()
Creates an instance.GeoprocessingFeatures(FeatureSet featureSet)
Creates an instance containing features.GeoprocessingFeatures(java.lang.String url)
Creates an instance based on a URL to features.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canFetchOutputFeatures()
Indicates if features can be fetched from the service for an output parameter.ListenableFuture<java.lang.Void>
fetchOutputFeaturesAsync()
Asynchronously requests features from the service.Credential
getCredential()
Gets the credential used to authenticate the user with the geoprocessing service.FeatureSet
getFeatures()
The feature set.RequestConfiguration
getRequestConfiguration()
Gets the RequestConfiguration object that contains parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.java.lang.String
getUrl()
Returns the URL or empty string if this has not been set.void
setCredential(Credential credential)
Sets the credential used to authenticate the user with the geoprocessing service.void
setFeatures(FeatureSet features)
Sets the features.void
setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets the configuration parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.void
setUrl(java.lang.String url)
Sets the URL.
-
-
-
Constructor Detail
-
GeoprocessingFeatures
public GeoprocessingFeatures()
Creates an instance.- Since:
- 100.0.0
-
GeoprocessingFeatures
public GeoprocessingFeatures(FeatureSet featureSet)
Creates an instance containing features.- Parameters:
featureSet
- the set of features- Throws:
java.lang.IllegalArgumentException
- if featureSet is null- Since:
- 100.0.0
-
GeoprocessingFeatures
public GeoprocessingFeatures(java.lang.String url)
Creates an instance based on a URL to features.- Parameters:
url
- the URL- Throws:
java.lang.IllegalArgumentException
- if the URL is null or empty- Since:
- 100.0.0
-
-
Method Detail
-
getUrl
public java.lang.String getUrl()
Returns the URL or empty string if this has not been set.- Returns:
- the URL
- Since:
- 100.0.0
-
setUrl
public void setUrl(java.lang.String url)
Sets the URL. If a URL is set then any features set withsetFeatures(FeatureSet)
will be ignored.- Parameters:
url
- the URL- Throws:
java.lang.IllegalArgumentException
- if url is null or empty- Since:
- 100.0.0
-
getFeatures
public FeatureSet getFeatures()
The feature set. If null is returned then check ifcanFetchOutputFeatures()
is true and if it is usefetchOutputFeaturesAsync()
to populate the result.- Returns:
- the result features
- Since:
- 100.0.0
-
setFeatures
public void setFeatures(FeatureSet features)
Sets the features. This should only be set when using this instance as an input parameter. This property will be ignored ifsetUrl(String)
is set.- Parameters:
features
- the features to use- Throws:
java.lang.IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
canFetchOutputFeatures
public boolean canFetchOutputFeatures()
Indicates if features can be fetched from the service for an output parameter.- Returns:
- true, if features can be fetched
- Since:
- 100.0.0
-
fetchOutputFeaturesAsync
public ListenableFuture<java.lang.Void> fetchOutputFeaturesAsync()
Asynchronously requests features from the service. It is not necessary to call this ifgetFeatures()
is already populated. Add a done listener to the listenable future to know when this method has completed. Once the future has completed, callinggetFeatures()
will return the features.- Returns:
- a listenable future that will be done when the features have been fetched
- Since:
- 100.0.0
- See Also:
canFetchOutputFeatures()
-
getCredential
public Credential 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
public void setCredential(Credential credential)
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
public RequestConfiguration getRequestConfiguration()
Gets the RequestConfiguration object that contains parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0
- See Also:
setRequestConfiguration(com.esri.arcgisruntime.io.RequestConfiguration)
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets the configuration parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
. The global RequestConfiguration is used if no RequestConfiguration is set.- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- contains the parameters to use- Since:
- 100.0.0
- See Also:
RequestConfiguration
-
-