org.deegree.feature.persistence.query
Class Query

java.lang.Object
  extended by org.deegree.feature.persistence.query.Query

public class Query
extends Object

Encapsulates the parameter of a query to a FeatureStore.

Version:
$Revision: 30887 $, $Date: 2011-05-23 10:57:10 +0200 (Mon, 23 May 2011) $
Author:
Markus Schneider, last edited by: $Author: aschmitz $

Nested Class Summary
static class Query.QueryHint
          Names for hints and additional parameters that a FeatureStore implementation may take into account to increase efficient query processing.
 
Constructor Summary
Query(IdFilter filter, String featureVersion, ICRS srsName, SortProperty[] sortBy)
          Creates a new Query instance that selects features based on an IdFilter.
Query(QName ftName, Filter filter, int scale, int maxFeatures, double resolution)
          Creates a new Query instance.
Query(TypeName[] typeNames, Filter filter, String featureVersion, ICRS srsName, SortProperty[] sortBy)
          Creates a new Query instance.
 
Method Summary
 Filter getFilter()
          Returns the Filter.
 Object getHint(Query.QueryHint code)
           
 int getMaxFeatures()
           
 Envelope getPrefilterBBox()
          Returns an Envelope suitable for performing a spatial pre-filtering step on the set of feature candidates.
 SortProperty[] getSortProperties()
          Returns the sort criteria.
 TypeName[] getTypeNames()
          Returns the names of the requested feature types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query

public Query(QName ftName,
             Filter filter,
             int scale,
             int maxFeatures,
             double resolution)
Creates a new Query instance.

Parameters:
ftName - name of the requested feature type, must not be null
filter - additional filter constraints, may be null, if not null, all contained geometry operands must have a non-null CRS
scale - if scale is positive, a scale query hint will be used
maxFeatures - may be -1 if no limit needs to be exercised
resolution - if resolution is positive, a pixel resolution hint will be used

Query

public Query(TypeName[] typeNames,
             Filter filter,
             String featureVersion,
             ICRS srsName,
             SortProperty[] sortBy)
Creates a new Query instance.

Parameters:
typeNames - feature type names to be queried, must not be null and contain at least one entry
filter - filter to be applied, can be null, if not null, all contained geometry operands must have a non-null CRS
featureVersion - specific feature version to be returned, can be null
srsName - SRS for the returned geometries, can be null
sortBy - sort criteria to be applied, can be null

Query

public Query(IdFilter filter,
             String featureVersion,
             ICRS srsName,
             SortProperty[] sortBy)
Creates a new Query instance that selects features based on an IdFilter.

Parameters:
filter - filter to be applied, must not be null
featureVersion - specific feature version to be returned, can be null
srsName - SRS for the returned geometries, can be null
sortBy - sort criteria to be applied, can be null
Method Detail

getHint

public Object getHint(Query.QueryHint code)

getPrefilterBBox

public Envelope getPrefilterBBox()
Returns an Envelope suitable for performing a spatial pre-filtering step on the set of feature candidates.

The returned Envelope is determined by the following strategy:

Returns:
an Envelope suitable for pre-filtering feature candidates, can be null

getTypeNames

public TypeName[] getTypeNames()
Returns the names of the requested feature types.

Returns:
the names of the requested feature types, never null (but may be empty for id filter queries)

getFilter

public Filter getFilter()
Returns the Filter.

Returns:
filter, may be null

getSortProperties

public SortProperty[] getSortProperties()
Returns the sort criteria.

Returns:
the sort criteria, never null (but may be empty)

getMaxFeatures

public int getMaxFeatures()
Returns:
-1, if no limit has been set


Copyright © 2011. All Rights Reserved.