public class FilterBySeriesRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.filterBySeries(FilterBySeriesRequest)
.
Filters objects matching all points of the given track (works only on track type data). It allows users to specify a particular track to find all other points in the table that fall within specified ranges-spatial and temporal-of all points of the given track. Additionally, the user can specify another track to see if the two intersect (or go close to each other within the specified ranges). The user also has the flexibility of using different metrics for the spatial distance calculation: Euclidean (flat geometry) or Great Circle (spherical geometry to approximate the Earth's surface distances). The filtered points are stored in a newly created result set. The return value of the function is the number of points in the resultant set (view).
This operation is synchronous, meaning that a response will not be returned until all the objects are fully available.
Modifier and Type | Class and Description |
---|---|
static class |
FilterBySeriesRequest.Options
Optional parameters.
|
Constructor and Description |
---|
FilterBySeriesRequest()
Constructs a FilterBySeriesRequest object with default parameters.
|
FilterBySeriesRequest(String tableName,
String viewName,
String trackId,
List<String> targetTrackIds,
Map<String,String> options)
Constructs a FilterBySeriesRequest object with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getTableName() |
List<String> |
getTargetTrackIds() |
String |
getTrackId() |
String |
getViewName() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
FilterBySeriesRequest |
setOptions(Map<String,String> options) |
FilterBySeriesRequest |
setTableName(String tableName) |
FilterBySeriesRequest |
setTargetTrackIds(List<String> targetTrackIds) |
FilterBySeriesRequest |
setTrackId(String trackId) |
FilterBySeriesRequest |
setViewName(String viewName) |
String |
toString() |
public FilterBySeriesRequest()
public FilterBySeriesRequest(String tableName, String viewName, String trackId, List<String> targetTrackIds, Map<String,String> options)
tableName
- Name of the table on which the filter by track
operation will be performed. Must be a currently
existing table with a track present.viewName
- If provided, then this will be the name of the view
containing the results. Has the same naming
restrictions as tables. The default value is ''.trackId
- The ID of the track which will act as the filtering
points. Must be an existing track within the given
table.targetTrackIds
- Up to one track ID to intersect with the "filter"
track. If any provided, it must be an valid track
ID within the given set.options
- Optional parameters.
COLLECTION_NAME
: Name of a collection which is to
contain the newly created view. If the collection
provided is non-existent, the collection will be
automatically created. If empty, then the newly created
view will be top-level.
SPATIAL_RADIUS
: A positive number passed as a string
representing the radius of the search area centered
around each track point's geospatial coordinates. The
value is interpreted in meters. Required parameter.
TIME_RADIUS
: A positive number passed as a string
representing the maximum allowable time difference
between the timestamps of a filtered object and the
given track's points. The value is interpreted in
seconds. Required parameter.
SPATIAL_DISTANCE_METRIC
: A string representing the
coordinate system to use for the spatial search
criteria. Acceptable values are 'euclidean' and
'great_circle'. Optional parameter; default is
'euclidean'.
Supported values:
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public FilterBySeriesRequest setTableName(String tableName)
tableName
- Name of the table on which the filter by track
operation will be performed. Must be a currently
existing table with a track present.this
to mimic the builder pattern.public String getViewName()
public FilterBySeriesRequest setViewName(String viewName)
viewName
- If provided, then this will be the name of the view
containing the results. Has the same naming
restrictions as tables. The default value is ''.this
to mimic the builder pattern.public String getTrackId()
public FilterBySeriesRequest setTrackId(String trackId)
trackId
- The ID of the track which will act as the filtering
points. Must be an existing track within the given
table.this
to mimic the builder pattern.public List<String> getTargetTrackIds()
public FilterBySeriesRequest setTargetTrackIds(List<String> targetTrackIds)
targetTrackIds
- Up to one track ID to intersect with the "filter"
track. If any provided, it must be an valid track
ID within the given set.this
to mimic the builder pattern.public Map<String,String> getOptions()
COLLECTION_NAME
: Name of a collection which is to contain the
newly created view. If the collection provided is non-existent,
the collection will be automatically created. If empty, then the
newly created view will be top-level.
SPATIAL_RADIUS
: A positive number passed as a string
representing the radius of the search area centered around each
track point's geospatial coordinates. The value is interpreted
in meters. Required parameter.
TIME_RADIUS
: A positive number passed as a string representing
the maximum allowable time difference between the timestamps of
a filtered object and the given track's points. The value is
interpreted in seconds. Required parameter.
SPATIAL_DISTANCE_METRIC
: A string representing the coordinate
system to use for the spatial search criteria. Acceptable values
are 'euclidean' and 'great_circle'. Optional parameter; default
is 'euclidean'.
Supported values:
Map
.public FilterBySeriesRequest setOptions(Map<String,String> options)
options
- Optional parameters.
COLLECTION_NAME
: Name of a collection which is to
contain the newly created view. If the collection
provided is non-existent, the collection will be
automatically created. If empty, then the newly created
view will be top-level.
SPATIAL_RADIUS
: A positive number passed as a string
representing the radius of the search area centered
around each track point's geospatial coordinates. The
value is interpreted in meters. Required parameter.
TIME_RADIUS
: A positive number passed as a string
representing the maximum allowable time difference
between the timestamps of a filtered object and the
given track's points. The value is interpreted in
seconds. Required parameter.
SPATIAL_DISTANCE_METRIC
: A string representing the
coordinate system to use for the spatial search
criteria. Acceptable values are 'euclidean' and
'great_circle'. Optional parameter; default is
'euclidean'.
Supported values:
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2019. All rights reserved.