Class OgcFeatureCollectionTable
- java.lang.Object
-
- com.esri.arcgisruntime.data.FeatureTable
-
- com.esri.arcgisruntime.data.OgcFeatureCollectionTable
-
- All Implemented Interfaces:
RemoteResource
,Loadable
,PopupSource
public final class OgcFeatureCollectionTable extends FeatureTable implements RemoteResource
An OGC API - Features feature collection table.To display data from an OGC feature collection table in a
FeatureLayer
use theFeatureLayer(FeatureTable)
constructor where the OgcFeatureCollectionTable is the parameter that is passed into the constructor. Note: The OgcFeatureCollectionTable should not be confused withFeatureCollectionTable
which is used as an input to create aFeatureCollectionLayer
.The ArcGIS Runtime API for OGC API Features provides building blocks for manipulating features on the Web. For more information about the OGC API Features specification see the documents: OGC API - Features - Part 1 and OGC API - Features - Part 2.
The class includes two important members: the
getFeatureRequestMode()
property and thepopulateFromServiceAsync(QueryParameters, boolean, List)
method. Only theServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
mode is supported. This meansOgcFeatureCollectionTable.populateFromServiceAsync(QueryParameters, boolean, List)
must be called to populate, query, and return features from the service. For theQueryParameters.getWhereClause()
that is used by theOgcFeatureCollectionTable.populateFromServiceAsync(QueryParameters, boolean, List)
method, you can put any CQL2-TEXT or CQL2-JSON string as defined in the document OGC API - Features - Part3.When populating or updating a local table from an OGC service, you can now request features in a specified
SpatialReference
(also referred to as SRS in ArcGIS or CRS in OGC). This leverages the power of the server to return features in the same spatial reference as your map rather than having to re-project them on the client.This class supports loading and querying of features from a non-spatial OGC feature collection table.
- Since:
- 100.9.0
-
-
Constructor Summary
Constructors Constructor Description OgcFeatureCollectionTable(OgcFeatureCollectionInfo ogcFeatureCollectionInfo)
Constructs an OGCFeatureCollectionTable from the givenOgcFeatureCollectionInfo
.OgcFeatureCollectionTable(String url, String collectionId)
Constructs an OGCFeatureCollectionTable from the URL of the "OGC API - Features" service and the unique identifier for the collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Credential
getCredential()
Gets theCredential
that is set on the network-enabled resource.ServiceFeatureTable.FeatureRequestMode
getFeatureRequestMode()
Gets the mode defining when features are requested from the service.RequestConfiguration
getRequestConfiguration()
Gets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.String
getUri()
Gets the URL of the "OGC API - Features" service landing page.String
getUrl()
Deprecated.as of 100.13.0, usegetUri()
protected void
onRequestRequired(com.esri.arcgisruntime.internal.jni.CoreRequest request)
ListenableFuture<FeatureQueryResult>
populateFromServiceAsync(QueryParameters queryParameters, boolean clearCache, List<String> outfields)
Asynchronously populate the "OGC API - Features" feature collection table with the results of a query.void
setCredential(Credential credential)
Sets aCredential
to be used by the network-enabled resource in the event of an authentication challenge.void
setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode featureRequestMode)
Sets the mode defining when features are requested from the service.void
setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.-
Methods inherited from class com.esri.arcgisruntime.data.FeatureTable
addDoneLoadingListener, addFeatureAsync, addFeaturesAsync, addLoadStatusChangedListener, canAdd, cancelLoad, canDelete, canEditGeometry, canUpdate, createFeature, createFeature, deleteFeatureAsync, deleteFeaturesAsync, getDisplayName, getExtent, getFeatureLayer, getField, getFields, getGeometryType, getLayer, getLoadError, getLoadStatus, getPopupDefinition, getSpatialReference, getTableName, getTotalFeatureCount, hasGeometry, hasM, hasZ, isEditable, isPopupEnabled, loadAsync, onDoneLoadingInternal, queryExtentAsync, queryFeatureCountAsync, queryFeaturesAsync, queryStatisticsAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, retryLoadAsync, setDisplayName, setPopupDefinition, setPopupEnabled, updateFeatureAsync, updateFeaturesAsync
-
-
-
-
Constructor Detail
-
OgcFeatureCollectionTable
public OgcFeatureCollectionTable(OgcFeatureCollectionInfo ogcFeatureCollectionInfo)
Constructs an OGCFeatureCollectionTable from the givenOgcFeatureCollectionInfo
.- Parameters:
ogcFeatureCollectionInfo
- an OGCFeatureCollectionTable- Throws:
IllegalArgumentException
- if ogcFeatureCollectionInfo is null- Since:
- 100.9.0
-
OgcFeatureCollectionTable
public OgcFeatureCollectionTable(String url, String collectionId)
Constructs an OGCFeatureCollectionTable from the URL of the "OGC API - Features" service and the unique identifier for the collection.- Parameters:
url
- the URL of the "OGC API - Features" service landing page that contains the feature collectioncollectionId
- the unique identifier for the collection from the service- Throws:
IllegalArgumentException
- if url is null or emptyIllegalArgumentException
- if collectionId is null or empty- Since:
- 100.9.0
-
-
Method Detail
-
setFeatureRequestMode
public void setFeatureRequestMode(ServiceFeatureTable.FeatureRequestMode featureRequestMode)
Sets the mode defining when features are requested from the service.At v100.9, "OGC API - Features" collection table only supports
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
but defaults toServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_CACHE
. Set the feature request mode to manual before attempting to populate the table.- Parameters:
featureRequestMode
- a FeatureRequestMode- Throws:
IllegalArgumentException
- if featureRequestMode is null- Since:
- 100.9.0
-
getFeatureRequestMode
public ServiceFeatureTable.FeatureRequestMode getFeatureRequestMode()
Gets the mode defining when features are requested from the service.At v100.9, "OGC API - Features" collection table only supports
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
but defaults toServiceFeatureTable.FeatureRequestMode.ON_INTERACTION_CACHE
. Set the feature request mode to manual before attempting to populate the table.- Returns:
- a FeatureRequestMode
- Since:
- 100.9.0
-
populateFromServiceAsync
public ListenableFuture<FeatureQueryResult> populateFromServiceAsync(QueryParameters queryParameters, boolean clearCache, List<String> outfields)
Asynchronously populate the "OGC API - Features" feature collection table with the results of a query.Use the default (empty)
QueryParameters
to get all features from the service. Specifying null or an empty List for outfields will result in the default set of outfields being used. Spatial queries (those that specify geometries) must use theQueryParameters.SpatialRelationship.INTERSECTS
spatial relationship.- Parameters:
queryParameters
- parameters that define how features are returned from the serviceclearCache
- set to true to clear existing table data before populating it with features returned from the service, false otherwiseoutfields
- an optional list of names of attribute fields to include in the output result, null or an empty list to include the default outfields set- Returns:
- a ListenableFuture that represents the query operation on the service. When the query is
done the result returns a list of
FeatureQueryResult
objects. - Throws:
IllegalArgumentException
- if queryParameters is null- Since:
- 100.9.0
-
getUrl
@Deprecated public String getUrl()
Deprecated.as of 100.13.0, usegetUri()
Gets the URL of the "OGC API - Features" service landing page.- Returns:
- the service's landing page URL
- Since:
- 100.9.0
-
onRequestRequired
protected void onRequestRequired(com.esri.arcgisruntime.internal.jni.CoreRequest request)
-
getCredential
public Credential getCredential()
Description copied from interface:RemoteResource
Gets theCredential
that is set on the network-enabled resource.Only applicable if the resource is secured.
- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the Credential, or null if there is none
-
setCredential
public void setCredential(Credential credential)
Description copied from interface:RemoteResource
Sets aCredential
to be used by the network-enabled resource in the event of an authentication challenge. The default credential is null.Only applicable if the resource is secured.
- Specified by:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the Credential to be used for authentication
-
getRequestConfiguration
public RequestConfiguration getRequestConfiguration()
Description copied from interface:RemoteResource
Gets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the
RequestConfiguration
used to modify network requests
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Description copied from interface:RemoteResource
Sets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
. If not set, the globalRequestConfiguration
will be used (seeRequestConfiguration.getGlobalRequestConfiguration()
).- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- the RequestConfiguration used to modify network requests
-
getUri
public String getUri()
Gets the URL of the "OGC API - Features" service landing page.- Specified by:
getUri
in interfaceRemoteResource
- Returns:
- the service's landing page URL
- Since:
- 100.13.0
-
-