Object
Query
- Direct Known Subclasses:
CoverageQuery
,FeatureQuery
Definition of filtering to apply for fetching a resource subset.
Filtering can be applied on
FeatureSet
or on GridCoverageResource
.
A query contains at least two parts:
- Selection for choosing the feature instances to fetch. This is equivalent to choosing rows in a database table.
- Projection (not to be confused with map projection) for choosing the feature properties or the coverage sample dimensions to fetch. This is equivalent to choosing columns in a database table.
Query
contains the information in the SELECT
and
WHERE
clauses of a SQL statement. A Query
typically contains filtering capabilities
and (sometimes) simple attribute transformations. Well known query languages include SQL and CQL.
Optional values
All aspects of this query are optional and initialized to "none". Unless otherwise specified, all methods accept a null argument or can return a null value, which means "none".- Since:
- 0.8
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
setProjection
(String... properties) Sets the properties to retrieve by their names.abstract void
setSelection
(Envelope domain) Sets the approximate area of feature instances or pixels to include in the subset.
-
Constructor Details
-
Query
protected Query()Creates a new, initially empty, query.
-
-
Method Details
-
setSelection
Sets the approximate area of feature instances or pixels to include in the subset. For feature set, the domain is materialized by aFilter
. For grid coverage resource, the given envelope specifies the coverage domain.The given envelope is approximate. Features may test intersections using only bounding boxes instead of full geometries. Coverages may expand the envelope to an integer amount of tiles.
- Parameters:
domain
- the approximate area of interest, ornull
if none.- Since:
- 1.1
-
setProjection
Sets the properties to retrieve by their names. For features, the arguments are names of feature properties. For coverages, the arguments are names of sample dimensions.Note: in this context, the "projection" word come from relational database terminology. It is unrelated to map projection.
- Parameters:
properties
- properties to retrieve, ornull
to retrieve all properties.- Throws:
IllegalArgumentException
- if a property is duplicated.- Since:
- 1.1
-