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 a FeatureSet. You can call GeoElement.getAttributes() on these Features to get the attributes. Note that these features are not held in a FeatureTable.

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 temporary Graphic in a GraphicsOverlay or using a FeatureCollectionTable in a FeatureLayer. If the geoprocessing service is configured to use a result map server, then GeoprocessingResult.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 a FeatureQueryResult. If there is a need to create a new set a features or records, FeatureCollectionTable can be used.

Since:
100.0.0
  • Constructor Details

    • 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:
      IllegalArgumentException - if featureSet is null
      Since:
      100.0.0
    • GeoprocessingFeatures

      public GeoprocessingFeatures(String url)
      Creates an instance based on a URL to features.
      Parameters:
      url - the URL
      Throws:
      IllegalArgumentException - if the URL is null or empty
      Since:
      100.0.0
  • Method Details

    • getUrl

      public 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(String url)
      Sets the URL. If a URL is set then any features set with setFeatures(FeatureSet) will be ignored.
      Parameters:
      url - the URL
      Since:
      100.0.0
    • getFeatures

      public FeatureSet getFeatures()
      The feature set. If null is returned then check if canFetchOutputFeatures() is true and if it is use fetchOutputFeaturesAsync() 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 if setUrl(String) is set.
      Parameters:
      features - the features to use
      Throws:
      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<Void> fetchOutputFeaturesAsync()
      Asynchronously requests features from the service. It is not necessary to call this if getFeatures() is already populated. Add a done listener to the listenable future to know when this method has completed. Once the future has completed, calling getFeatures() will return the features.
      Returns:
      a listenable future that will be done when the features have been fetched
      Since:
      100.0.0
      See Also:
    • getCredential

      public Credential getCredential()
      Gets the credential used to authenticate the user with the geoprocessing service.
      Specified by:
      getCredential in interface RemoteResource
      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 interface RemoteResource
      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 - See fetchOutputFeaturesAsync().
      Specified by:
      getRequestConfiguration in interface RemoteResource
      Returns:
      the RequestConfiguration object or default values if nothing was set
      Since:
      100.0.0
      See Also:
    • setRequestConfiguration

      public void setRequestConfiguration(RequestConfiguration requestConfiguration)
      Sets the configuration parameters used for sending a network request using this parameter object - See fetchOutputFeaturesAsync(). The global RequestConfiguration is used if no RequestConfiguration is set.
      Specified by:
      setRequestConfiguration in interface RemoteResource
      Parameters:
      requestConfiguration - contains the parameters to use
      Since:
      100.0.0
      See Also: