| java.lang.Object org.deegree.ogcwebservices.wfs.operation.Query
Query | public class Query (Code) | | Represents a Query operation as a part of a
GetFeature request.
Each individual query packaged in a
GetFeature request is defined using the query value.
The query value defines which feature type to query, what properties to retrieve and what
constraints (spatial and non-spatial) to apply to those properties.
The mandatory typeName attribute is used to indicate the name of one or more
feature type instances or class instances to be queried. Its value is a list of
namespace-qualified names (XML Schema type QName, e.g. myns:School) whose value must match one of
the feature types advertised in the Capabilities document of the WFS. Specifying more than one
typename indicates that a join operation is being performed. All the names in the typeName list
must be valid types that belong to this query's feature content as defined by the GML Application
Schema. Optionally, individual feature type names in the typeName list may be aliased using the
format QName=Alias. The following is an example typeName value that indicates that a join
operation is to be performed and includes aliases:
typeName="ns1:InwaterA_1m=A,ns1:InwaterA_1m=B,ns2:CoastL_1M=C"
This example encodes a join between three feature types aliased as A, B and C. The join between
feature type A and B is a self-join.
author: Andreas Poth author: Markus Schneider author: last edited by: $Author: apoth $ version: $Revision: 9345 $, $Date: 2007-12-27 08:22:25 -0800 (Thu, 27 Dec 2007) $ |
Constructor Summary | |
| Query(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String[] aliases, String srsName, Filter filter, RESULT_TYPE resultType, int maxFeatures, int startPosition) Creates a new Query instance. |
Method Summary | |
public static Query | create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String srsName, Filter filter, int maxFeatures, int startPosition, RESULT_TYPE resultType) Creates a new Query instance.
Parameters: propertyNames - names of the requested properties, may be null or empty Parameters: functions - names of the requested functions, may be null or empty Parameters: sortProperties - sort criteria, may be null or empty Parameters: handle - client-generated identifier for the query, may be null Parameters: featureVersion - version of the feature instances to fetched, may be null Parameters: typeNames - list of requested feature types. | public static Query | create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String[] aliases, String srsName, Filter filter, int maxFeatures, int startPosition, RESULT_TYPE resultType) Creates a new Query instance.
Parameters: propertyNames - names of the requested properties, may be null or empty Parameters: functions - names of the requested functions, may be null or empty Parameters: sortProperties - sort criteria, may be null or empty Parameters: handle - client-generated identifier for the query, may be null Parameters: featureVersion - version of the feature instances to fetched, may be null Parameters: typeNames - list of requested feature types. | public static Query | create(QualifiedName typeName) Creates a new simple Query instance that selects the whole feature type. | public static Query | create(QualifiedName typeName, Filter filter) Creates a new simple Query instance that selects the whole feature type. | public static Query | create(Element element) Creates a Query instance from a document that contains the DOM representation
of the request, using the 1.1.0 filter encoding. | public static Query | create(Element element, boolean useVersion_1_0_0) Creates a Query instance from a document that contains the DOM representation
of the request.
Note that the following attributes from the surrounding element are also considered (if it
present):
- resultType
- maxFeatures
- startPosition
Parameters: element - Parameters: useVersion_1_0_0 - if the filterencoding 1.0.0 rules should be applied. | public String[] | getAliases() Returns the aliases for the requested feature types. | public String | getFeatureVersion() Returns the featureVersion attribute.
The version attribute is included in order to accommodate systems that support feature
versioning. | public Filter | getFilter() Returns the filter that limits the query. | public Function[] | getFunctions() Beside property names a query may contains 0 to n functions modifying the values of one or
more original properties. | public String | getHandle() Returns the handle attribute. | public int | getMaxFeatures() Returns the value of the maxFeatures attribute ("inherited" from the GetFeature container).
The optional maxFeatures attribute can be used to limit the number of features that a
GetFeature request retrieves. | public PropertyPath[] | getPropertyNames() Returns all requested properties. | public RESULT_TYPE | getResultType() Returns the value of the resultType attribute ("inherited" from the GetFeature container). | public SortProperty[] | getSortProperties() Returns the sort criteria for the result. | public String | getSrsName() Returns the srsName attribute. | public int | getStartPosition() Returns the value of the startPosition attribute ("inherited" from the GetFeature container).
The startPosition parameter identifies the first result set entry to be returned. | public QualifiedName[] | getTypeNames() Returns the names of the requested feature types. | public void | setMaxFeatures(int maxFeatures) | public void | setSrsName(String srsName) Sets the srsName attribute to given value. | public void | setStartPosition(int startPosition) | public String | toString() Returns a string representation of the object. |
Query | Query(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String[] aliases, String srsName, Filter filter, RESULT_TYPE resultType, int maxFeatures, int startPosition)(Code) | | Creates a new Query instance.
Parameters: propertyNames - names of the requested properties, may be null or empty Parameters: functions - names of the requested functions, may be null or empty Parameters: sortProperties - sort criteria, may be null or empty Parameters: handle - client-generated identifier for the query, may be null Parameters: featureVersion - version of the feature instances to fetched, may be null Parameters: typeNames - list of requested feature types Parameters: aliases - list of aliases for the feature types, must either be null or have the same lengthas the typeNames array Parameters: srsName - name of the spatial reference system Parameters: filter - spatial and none-spatial constraints Parameters: resultType - deegree specific extension ("inherited" from GetFeature container) Parameters: maxFeatures - deegree specific extension ("inherited" from GetFeature container) Parameters: startPosition - deegree specific extension ("inherited" from GetFeature container) |
create | public static Query create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String srsName, Filter filter, int maxFeatures, int startPosition, RESULT_TYPE resultType)(Code) | | Creates a new Query instance.
Parameters: propertyNames - names of the requested properties, may be null or empty Parameters: functions - names of the requested functions, may be null or empty Parameters: sortProperties - sort criteria, may be null or empty Parameters: handle - client-generated identifier for the query, may be null Parameters: featureVersion - version of the feature instances to fetched, may be null Parameters: typeNames - list of requested feature types. if more than one feature types is set a JOIN willbe created (not yet supported) Parameters: srsName - name of the spatial reference system Parameters: filter - spatial and none-spatial constraints Parameters: resultType - deegree specific extension ("inherited" from GetFeature container) Parameters: maxFeatures - deegree specific extension ("inherited" from GetFeature container) Parameters: startPosition - deegree specific extension ("inherited" from GetFeature container) new Query instanceQuery.create(PropertyPath[],Function[],SortProperty[],String,String,QualifiedName[],String,Filter,int,int,RESULT_TYPE) |
create | public static Query create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, String handle, String featureVersion, QualifiedName[] typeNames, String[] aliases, String srsName, Filter filter, int maxFeatures, int startPosition, RESULT_TYPE resultType)(Code) | | Creates a new Query instance.
Parameters: propertyNames - names of the requested properties, may be null or empty Parameters: functions - names of the requested functions, may be null or empty Parameters: sortProperties - sort criteria, may be null or empty Parameters: handle - client-generated identifier for the query, may be null Parameters: featureVersion - version of the feature instances to fetched, may be null Parameters: typeNames - list of requested feature types. if more than one feature types is set a JOIN willbe created (not yet supported) Parameters: aliases - list of aliases for the feature types, must either be null or have the same lengthas the typeNames array Parameters: srsName - name of the spatial reference system Parameters: filter - spatial and none-spatial constraints Parameters: resultType - deegree specific extension ("inherited" from GetFeature container) Parameters: maxFeatures - deegree specific extension ("inherited" from GetFeature container) Parameters: startPosition - deegree specific extension ("inherited" from GetFeature container) new Query instance |
create | public static Query create(QualifiedName typeName)(Code) | | Creates a new simple Query instance that selects the whole feature type.
Parameters: typeName - name of the feature to be queried new Query instance |
create | public static Query create(QualifiedName typeName, Filter filter)(Code) | | Creates a new simple Query instance that selects the whole feature type.
Parameters: typeName - name of the feature to be queried Parameters: filter - spatial and none-spatial constraints new Query instance |
create | public static Query create(Element element) throws XMLParsingException(Code) | | Creates a Query instance from a document that contains the DOM representation
of the request, using the 1.1.0 filter encoding.
Note that the following attributes from the surrounding element are also considered (if it
present):
- resultType
- maxFeatures
- startPosition
Parameters: element - corresponding Query instance throws: XMLParsingException - |
create | public static Query create(Element element, boolean useVersion_1_0_0) throws XMLParsingException(Code) | | Creates a Query instance from a document that contains the DOM representation
of the request.
Note that the following attributes from the surrounding element are also considered (if it
present):
- resultType
- maxFeatures
- startPosition
Parameters: element - Parameters: useVersion_1_0_0 - if the filterencoding 1.0.0 rules should be applied. corresponding Query instance throws: XMLParsingException - |
getAliases | public String[] getAliases()(Code) | | Returns the aliases for the requested feature types.
The returned array is either null or has the same length as the array returned by
Query.getTypeNames() .
See Also: Query.getTypeNames() the aliases for the requested feature types, or null if no aliases are used |
getFeatureVersion | public String getFeatureVersion()(Code) | | Returns the featureVersion attribute.
The version attribute is included in order to accommodate systems that support feature
versioning. A value of ALL indicates that all versions of a feature should be fetched.
Otherwise an integer can be specified to return the n th version of a feature. The version
numbers start at '1' which is the oldest version. If a version value larger than the largest
version is specified then the latest version is return. The default action shall be for the
query to return the latest version. Systems that do not support versioning can ignore the
parameter and return the only version that they have.
the featureVersion attribute |
getFilter | public Filter getFilter()(Code) | | Returns the filter that limits the query.
the filter that limits the query |
getFunctions | public Function[] getFunctions()(Code) | | Beside property names a query may contains 0 to n functions modifying the values of one or
more original properties. E.g. instead of area and population the density of a country can be
requested by using a function instead:
<ogc:Div>
<ogc:PropertyName>population</ogc:PropertyName>
<ogc:PropertyName>area</ogc:PropertyName>
</ogc:Div>
If no functions and no property names are specified all properties should be fetched.
requested functions See Also: Query.getPropertyNames() |
getHandle | public String getHandle()(Code) | | Returns the handle attribute.
The handle attribute is included to allow a client to associate a mnemonic name to the query.
The purpose of the handle attribute is to provide an error handling mechanism for locating a
statement that might fail.
the handle attribute |
getMaxFeatures | public int getMaxFeatures()(Code) | | Returns the value of the maxFeatures attribute ("inherited" from the GetFeature container).
The optional maxFeatures attribute can be used to limit the number of features that a
GetFeature request retrieves. Once the maxFeatures limit is reached, the result set is
truncated at that point. If not limit is set -1 will be returned
the value of the maxFeatures attribute |
getResultType | public RESULT_TYPE getResultType()(Code) | | Returns the value of the resultType attribute ("inherited" from the GetFeature container).
the value of the resultType attribute |
getSortProperties | public SortProperty[] getSortProperties()(Code) | | Returns the sort criteria for the result.
the sort criteria for the result |
getSrsName | public String getSrsName()(Code) | | Returns the srsName attribute.
the srsName attribute |
getStartPosition | public int getStartPosition()(Code) | | Returns the value of the startPosition attribute ("inherited" from the GetFeature container).
The startPosition parameter identifies the first result set entry to be returned. If no
startPosition is set explicitly, 1 will be returned.
the value of the startPosition attribute, 1 if undefined |
getTypeNames | public QualifiedName[] getTypeNames()(Code) | | Returns the names of the requested feature types.
the names of the requested feature types |
setMaxFeatures | public void setMaxFeatures(int maxFeatures)(Code) | | Parameters: maxFeatures - |
setSrsName | public void setSrsName(String srsName)(Code) | | Sets the srsName attribute to given value.
Parameters: srsName - name of the requested SRS |
toString | public String toString()(Code) | | Returns a string representation of the object.
a string representation of the object |
|
|