Class ArcGISStreamServiceFilter
Set ArcGISStreamService.filterProperty()
to an object of this type to apply a server-side filter on observations
streamed from an ArcGIS stream service. Spatial or attribute filters (or both) are supported.
Using this server-side filter is useful for limiting how much data is streamed from an ArcGISStreamService
and handled in the client application, which can help with application performance and memory efficiency.
- Since:
- 200.1.0
-
Constructor Summary
ConstructorDescriptionCreates an empty ArcGISStreamServiceFilter object. -
Method Summary
Modifier and TypeMethodDescriptionGets the geometry that is used to filter results.Gets a collection of field names that identify the observation values the server should return.Gets the spatial reference that dynamic entities are returned in.Gets a SQL expression that defines the dynamic entities to return.void
setGeometry
(Geometry geometry) Sets the geometry that is used to filter results.void
setOutSpatialReference
(SpatialReference outSpatialReference) Sets the spatial reference that dynamic entities are returned in.void
setWhereClause
(String whereClause) Sets a SQL expression that defines the dynamic entities to return.
-
Constructor Details
-
ArcGISStreamServiceFilter
public ArcGISStreamServiceFilter()Creates an empty ArcGISStreamServiceFilter object.- Since:
- 200.1.0
-
-
Method Details
-
getGeometry
Gets the geometry that is used to filter results.Dynamic entity observations that intersect this geometry are included in the stream. Those that are outside are excluded.
The default value is null, meaning no spatial filter is applied to the stream.
Currently, only
GeometryType.ENVELOPE
geometries are supported.- Returns:
- the geometry
- Since:
- 200.1.0
-
setGeometry
Sets the geometry that is used to filter results.Dynamic entity observations that intersect this geometry are included in the stream. Those that are outside are excluded.
The default value is null, meaning no spatial filter is applied to the stream.
Currently, only
GeometryType.ENVELOPE
geometries are supported.- Parameters:
geometry
- the geometry- Since:
- 200.1.0
-
getOutFields
Gets a collection of field names that identify the observation values the server should return.This property instructs the service to return a subset of values when pushing observations to the client. Restricting the values returned will limit the amount of memory required to store individual observations and therefore reduce the memory footprint of the application.
The default is an empty
List
, which returns all observation fields from the server.The output fields take effect when connecting to an empty
DynamicEntityDataSource
. The following three steps are required to modify the output fields for an existing connection:DynamicEntityDataSource.disconnectAsync()
,DynamicEntityDataSource.purgeAllAsync()
, andDynamicEntityDataSource.connectAsync()
.Note that the geometry, track ID (if available), and timestamp fields are always included with each observation.
- Returns:
- a collection of field names that identify the observation values the server should return
- Since:
- 200.2.0
-
getOutSpatialReference
Gets the spatial reference that dynamic entities are returned in.Use this property to instruct the service to provide observation geometries in the given spatial reference.
This property is useful if the client application needs dynamic entities in a specific spatial reference. Setting this property forces the server to re-project geometries before adding observations to the stream. This relieves the client application from the performance burden of re-projecting dynamic entities.
The default value is null, meaning observation geometries should be returned in the spatial reference of the service.
- Returns:
- the out spatial reference
- Since:
- 200.1.0
-
setOutSpatialReference
Sets the spatial reference that dynamic entities are returned in.Use this property to instruct the service to provide observation geometries in the given spatial reference.
This property is useful if the client application needs dynamic entities in a specific spatial reference. Setting this property forces the server to re-project geometries before adding observations to the stream. This relieves the client application from the performance burden of re-projecting dynamic entities.
The default value is null, meaning observation geometries should be returned in the spatial reference of the service.
- Parameters:
outSpatialReference
- the out spatial reference- Since:
- 200.1.0
-
getWhereClause
Gets a SQL expression that defines the dynamic entities to return.Use this property to filter dynamic entities by attribute value. Setting this property forces the server to filter observations using the given expression before adding them to the stream.
The expression used as the where clause should follow standard SQL syntax as discussed in the document SQL reference for query expressions used in ArcGIS.
The default value is an empty string, meaning that no attribute filter will be applied to the stream.
- Returns:
- the where clause
- Since:
- 200.1.0
-
setWhereClause
Sets a SQL expression that defines the dynamic entities to return.Use this property to filter dynamic entities by attribute value. Setting this property forces the server to filter observations using the given expression before adding them to the stream.
The expression used as the
getWhereClause()
should follow standard SQL syntax as discussed in the document SQL reference for query expressions used in ArcGIS.The default value is an empty string, meaning that no attribute filter will be applied to the stream.
- Parameters:
whereClause
- the where clause- Throws:
NullPointerException
- if whereClause is null- Since:
- 200.1.0
-