- All Implemented Interfaces:
RemoteResource
,Loadable
,PopupSource
To display data from an OGC feature collection table in a FeatureLayer
, use the
FeatureLayer(FeatureTable)
constructor where the OgcFeatureCollectionTable
is the
parameter that is passed into the constructor. Note: The OgcFeatureCollectionTable
should not be confused with FeatureCollectionTable
, which is used as an input to create a
FeatureCollection
.
This API provides building blocks for manipulating OGC 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 setFeatureRequestMode(FeatureRequestMode)
and populateFromServiceAsync(QueryParameters, boolean, List)
methods. Only the
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
mode is supported. This means
populateFromServiceAsync(QueryParameters, boolean, List)
must be called to populate, query, and return features
from the service. For the where clause (see QueryParameters.getWhereClause()
) that is used by the
populateFromServiceAsync(QueryParameters, boolean, List)
method, you can put any CQL2-TEXT or CQL2-JSON string as defined in the document
Common Query Language (CQL2).
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
-
Property Summary
Properties inherited from class com.esri.arcgisruntime.data.FeatureTable
loadError, loadStatus
-
Constructor Summary
ConstructorDescriptionOgcFeatureCollectionTable
(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
Modifier and TypeMethodDescriptionGets theCredential
that is set on the network-enabled resource.Gets the mode defining when features are requested from the service.Gets theRequestConfiguration
used to modify the parameters of network requests made by thisRemoteResource
.getUri()
Gets the URL of the "OGC API - Features" service landing page.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, getField, getFields, getGeometryType, getLayer, getLoadError, getLoadStatus, getPopupDefinition, getSpatialReference, getTableName, getTotalFeatureCount, hasGeometry, hasM, hasZ, isEditable, isPopupEnabled, loadAsync, loadErrorProperty, loadStatusProperty, queryExtentAsync, queryFeatureCountAsync, queryFeaturesAsync, queryStatisticsAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, retryLoadAsync, setDisplayName, setPopupDefinition, setPopupEnabled, updateFeatureAsync, updateFeaturesAsync
-
Constructor Details
-
OgcFeatureCollectionTable
Constructs an OGCFeatureCollectionTable from the givenOgcFeatureCollectionInfo
.- Parameters:
ogcFeatureCollectionInfo
- an OGCFeatureCollectionTable- Throws:
IllegalArgumentException
- if ogcFeatureCollectionInfo is null- Since:
- 100.9.0
-
OgcFeatureCollectionTable
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 Details
-
setFeatureRequestMode
Sets the mode defining when features are requested from the service.You must set the feature request mode to
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
before attempting to populate the table usingpopulateFromServiceAsync(QueryParameters, boolean, List)
.- Parameters:
featureRequestMode
- a FeatureRequestMode- Throws:
IllegalArgumentException
- if featureRequestMode is null- Since:
- 100.9.0
-
getFeatureRequestMode
Gets the mode defining when features are requested from the service.You must set the feature request mode to
ServiceFeatureTable.FeatureRequestMode.MANUAL_CACHE
before attempting to populate the table usingpopulateFromServiceAsync(QueryParameters, boolean, List)
.- 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
-
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
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
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
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
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
-