- Direct Known Subclasses:
public abstract class Query extends Object
Definition of filtering to apply for fetching a resource subset. Filtering can be applied 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.
Querycontains the information in the
WHEREclauses of a SQL statement. A
Querytypically contains filtering capabilities and (sometimes) simple attribute transformations. Well known query languages include SQL and CQL.
Optional valuesAll 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".
- See Also:
Defined in the
Query()Creates a new, initially empty, query.
Method SummaryModifier and TypeMethodDescription
(String... properties)Sets the properties to retrieve by their names.
(Envelope domain)Sets the approximate area of feature instances or pixels to include in the subset.
Queryprotected Query()Creates a new, initially empty, query.
setSelectionpublic abstract void setSelection
(Envelope domain)Sets the approximate area of feature instances or pixels to include in the subset. For feature set, the domain is materialized by a
Filter. 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.
domain- the approximate area of interest, or
setProjectionpublic abstract void setProjection
(String... properties)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.
properties- properties to retrieve, or
nullto retrieve all properties.
IllegalArgumentException- if a property is duplicated.