|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Encapsulates a data request.
The query object is used by the FeatureSource.getFeatures(Query) to encapsulate a request. For this use it the FeatureSource.getSchema().getTypeName() should match the one provided by the Query, or the Query should not provide one.
Suggested Extensions (Jody):
Field Summary | |
static Query |
ALL
Implements a query that will fetch all features from a datasource. |
static java.lang.String[] |
ALL_NAMES
Ask for all properties when used with setPropertyNames. |
static int |
DEFAULT_MAX
So getMaxFeatures does not return null we use a very large number. |
static Query |
FIDS
Implements a query that will fetch all the FeatureIDs from a datasource. |
static java.lang.String[] |
NO_NAMES
Ask for no properties when used with setPropertyNames. |
static java.net.URI |
NO_NAMESPACE
TODO: should this be ANY_URI |
Method Summary | |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateSystem()
Temporarily override the coordinate system. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCoordinateSystemReproject()
Request data reprojection. |
Filter |
getFilter()
The Filter can be used to define constraints on a query. |
java.lang.String |
getHandle()
The handle attribute is included to allow a client to associate a mnemonic name to the Query request. |
int |
getMaxFeatures()
The optional maxFeatures can be used to limit the number of features that a query request retrieves. |
java.net.URI |
getNamespace()
The namespace attribute is used to indicate the namespace of the schema being represented. |
java.lang.String[] |
getPropertyNames()
The properties array is used to specify the attributes that should be selected for the return feature collection. |
SortBy[] |
getSortBy()
SortBy results according to indicated property and order. |
java.lang.String |
getTypeName()
The typeName attribute is used to indicate the name of the feature type to be queried. |
java.lang.String |
getVersion()
From WFS Spec: The version attribute is included in order to accommodate systems that support feature versioning. |
boolean |
retrieveAllProperties()
Convenience method to determine if the query should use the full schema (all properties) of the data source for the features returned. |
Field Detail |
public static final java.net.URI NO_NAMESPACE
public static final int DEFAULT_MAX
public static final Query ALL
public static final Query FIDS
public static final java.lang.String[] NO_NAMES
Note the query will still return a result - limited to FeatureIDs.
public static final java.lang.String[] ALL_NAMES
Method Detail |
public java.lang.String[] getPropertyNames()
null
new String[0]
The available properties can be determined with a getSchema call from
the DataSource interface. A datasource can use retrieveAllProperties()
as a shortcut to determine if all its
available properties should be returned (same as checking to see if
getProperties is ALL_NAMES, but clearer)
If properties that are not part of the datasource's schema are requested then the datasource shall throw an exception.
This replaces our funky setSchema method of retrieving select properties. It makes it easier to understand how to get certain properties out of the datasource, instead of having users get the schema and then compose a new schema using the attributes that they want. The old way had problems because one couldn't have multiple object reuse the same datasource object, since some other object could come along and change its schema, and would then return the wrong properties.
public boolean retrieveAllProperties()
public int getMaxFeatures()
This is the only method that is not directly out of the Query element in the WFS spec. It is instead a part of a GetFeature request, which can hold one or more queries. But each of those in turn will need a maxFeatures, so it is needed here.
public Filter getFilter()
public java.lang.String getTypeName()
public java.net.URI getNamespace()
public java.lang.String getHandle()
public java.lang.String getVersion()
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateSystem()
This denotes a request to Temporarily to override the coordinate system contained in the FeatureSource being queried. The same coordinate values will be used, but the features created will appear in this Coordinate System.
This change is not persistant at all, indeed it is only for the Features returned by this Query. It may be used in conjunction with the reprojection Coordinate System, but this one will always be used first, the reprojection CS will perform its operation on this cs.
public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateSystemReproject()
Gets the coordinate System to reproject the data contained in the backend datastore to.
If the DataStore can optimize the reprojection it should, if not then a decorator on the reader should perform the reprojection on the fly.
If the datastore has the wrong CS then getOverrideCS() should be set to the CS to be used, this will perform the reprojection on that.
public SortBy[] getSortBy()
SortBy is part of the Filter 1.1 specification, it is referenced by WFS1.1 and Catalog 2.0.x specifications and is used to organize results.
The SortBy's are ment to be applied in order:
[year=2002 month=4],[year=2002 month=3],[year=2002 month=2],
[year=2002 month=1],[year=2003 month=12],[year=2002 month=4],
SortBy should be considered at the same level of abstraction as Filter, and like Filter you may sort using properties not listed in getPropertyNames.
At a technical level the interface SortBy2 is used to indicate the additional requirements of a GeoTools implementation. The pure WFS 1.1 specification itself is limited to SortBy.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |