|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.ogcwebservices.wfs.operation.Query
public class Query
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.
Constructor Summary | |
---|---|
Query(PropertyPath[] propertyNames,
Function[] functions,
SortProperty[] sortProperties,
java.lang.String handle,
java.lang.String featureVersion,
QualifiedName[] typeNames,
java.lang.String[] aliases,
java.lang.String srsName,
Filter filter,
GetFeature.RESULT_TYPE resultType,
int maxFeatures,
int startPosition)
Creates a new Query instance. |
|
Query(PropertyPath[] propertyNames,
Function[] functions,
SortProperty[] sortProperties,
java.lang.String handle,
java.lang.String featureVersion,
QualifiedName[] typeNames,
java.lang.String[] aliases,
java.lang.String srsName,
Filter filter,
GetFeature.RESULT_TYPE resultType,
int maxFeatures,
int startPosition,
GetFeatureDocument.BBoxTest test)
|
Method Summary | |
---|---|
static Query |
create(org.w3c.dom.Element element)
Creates a Query instance from a document that contains the DOM representation of the request, using
the 1.1.0 filter encoding. |
static Query |
create(org.w3c.dom.Element element,
boolean useVersion_1_0_0)
Creates a Query instance from a document that contains the DOM representation of the request. |
static Query |
create(PropertyPath[] propertyNames,
Function[] functions,
SortProperty[] sortProperties,
java.lang.String handle,
java.lang.String featureVersion,
QualifiedName[] typeNames,
java.lang.String[] aliases,
java.lang.String srsName,
Filter filter,
int maxFeatures,
int startPosition,
GetFeature.RESULT_TYPE resultType)
Creates a new Query instance. |
static Query |
create(PropertyPath[] propertyNames,
Function[] functions,
SortProperty[] sortProperties,
java.lang.String handle,
java.lang.String featureVersion,
QualifiedName[] typeNames,
java.lang.String srsName,
Filter filter,
int maxFeatures,
int startPosition,
GetFeature.RESULT_TYPE resultType)
Deprecated. use create(PropertyPath[], Function[], SortProperty[], String, String, QualifiedName[], String[], String, Filter, int, int, RESULT_TYPE) instead |
static Query |
create(QualifiedName typeName)
Creates a new simple Query instance that selects the whole feature type. |
static Query |
create(QualifiedName typeName,
Filter filter)
Creates a new simple Query instance that selects the whole feature type. |
void |
deleteBBoxTest()
Sets the test to null, thus enabling the gc. |
java.lang.String[] |
getAliases()
Returns the aliases for the requested feature types. |
java.lang.String |
getFeatureVersion()
Returns the featureVersion attribute. |
Filter |
getFilter()
Returns the filter that limits the query. |
Function[] |
getFunctions()
Beside property names a query may contains 0 to n functions modifying the values of one or more original properties. |
java.lang.String |
getHandle()
Returns the handle attribute. |
int |
getMaxFeatures()
Returns the value of the maxFeatures attribute ("inherited" from the GetFeature container). |
PropertyPath[] |
getPropertyNames()
Returns all requested properties. |
GetFeature.RESULT_TYPE |
getResultType()
Returns the value of the resultType attribute ("inherited" from the GetFeature container). |
SortProperty[] |
getSortProperties()
Returns the sort criteria for the result. |
java.lang.String |
getSrsName()
Returns the srsName attribute. |
int |
getStartPosition()
Returns the value of the startPosition attribute ("inherited" from the GetFeature container). |
QualifiedName[] |
getTypeNames()
Returns the names of the requested feature types. |
void |
guessAllMissingNamespaces(WFService wfs)
Adds missing namespaces to requested feature type names, property names, filter properties and sort properties. |
void |
guessMissingTypeNameNamespace(WFService wfs)
Adds missing namespaces in the names of requested feature types. |
void |
performBBoxTest()
|
void |
setMaxFeatures(int maxFeatures)
|
void |
setSrsName(java.lang.String srsName)
Sets the srsName attribute to given value. |
void |
setStartPosition(int startPosition)
|
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Query(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, java.lang.String handle, java.lang.String featureVersion, QualifiedName[] typeNames, java.lang.String[] aliases, java.lang.String srsName, Filter filter, GetFeature.RESULT_TYPE resultType, int maxFeatures, int startPosition, GetFeatureDocument.BBoxTest test)
propertyNames
- functions
- sortProperties
- handle
- featureVersion
- typeNames
- aliases
- srsName
- filter
- resultType
- maxFeatures
- startPosition
- test
- public Query(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, java.lang.String handle, java.lang.String featureVersion, QualifiedName[] typeNames, java.lang.String[] aliases, java.lang.String srsName, Filter filter, GetFeature.RESULT_TYPE resultType, int maxFeatures, int startPosition)
Query
instance.
propertyNames
- names of the requested properties, may be null or emptyfunctions
- names of the requested functions, may be null or emptysortProperties
- sort criteria, may be null or emptyhandle
- client-generated identifier for the query, may be nullfeatureVersion
- version of the feature instances to fetched, may be nulltypeNames
- list of requested feature typesaliases
- list of aliases for the feature types, must either be null or have the same length as the typeNames
arraysrsName
- name of the spatial reference systemfilter
- spatial and none-spatial constraintsresultType
- deegree specific extension ("inherited" from GetFeature container)maxFeatures
- deegree specific extension ("inherited" from GetFeature container)startPosition
- deegree specific extension ("inherited" from GetFeature container)Method Detail |
---|
@Deprecated public static Query create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, java.lang.String handle, java.lang.String featureVersion, QualifiedName[] typeNames, java.lang.String srsName, Filter filter, int maxFeatures, int startPosition, GetFeature.RESULT_TYPE resultType)
Query
instance.
propertyNames
- names of the requested properties, may be null or emptyfunctions
- names of the requested functions, may be null or emptysortProperties
- sort criteria, may be null or emptyhandle
- client-generated identifier for the query, may be nullfeatureVersion
- version of the feature instances to fetched, may be nulltypeNames
- list of requested feature types. if more than one feature types is set a JOIN will be created (not yet
supported)srsName
- name of the spatial reference systemfilter
- spatial and none-spatial constraintsresultType
- deegree specific extension ("inherited" from GetFeature container)maxFeatures
- deegree specific extension ("inherited" from GetFeature container)startPosition
- deegree specific extension ("inherited" from GetFeature container)
Query
instancepublic static Query create(PropertyPath[] propertyNames, Function[] functions, SortProperty[] sortProperties, java.lang.String handle, java.lang.String featureVersion, QualifiedName[] typeNames, java.lang.String[] aliases, java.lang.String srsName, Filter filter, int maxFeatures, int startPosition, GetFeature.RESULT_TYPE resultType)
Query
instance.
propertyNames
- names of the requested properties, may be null or emptyfunctions
- names of the requested functions, may be null or emptysortProperties
- sort criteria, may be null or emptyhandle
- client-generated identifier for the query, may be nullfeatureVersion
- version of the feature instances to fetched, may be nulltypeNames
- list of requested feature types. if more than one feature types is set a JOIN will be created (not yet
supported)aliases
- list of aliases for the feature types, must either be null or have the same length as the typeNames
arraysrsName
- name of the spatial reference systemfilter
- spatial and none-spatial constraintsresultType
- deegree specific extension ("inherited" from GetFeature container)maxFeatures
- deegree specific extension ("inherited" from GetFeature container)startPosition
- deegree specific extension ("inherited" from GetFeature container)
Query
instancepublic static Query create(QualifiedName typeName)
Query
instance that selects the whole feature type.
typeName
- name of the feature to be queried
Query
instancepublic static Query create(QualifiedName typeName, Filter filter)
Query
instance that selects the whole feature type.
typeName
- name of the feature to be queriedfilter
- spatial and none-spatial constraints
Query
instancepublic static Query create(org.w3c.dom.Element element) throws XMLParsingException
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):
element
-
Query
instance
XMLParsingException
public static Query create(org.w3c.dom.Element element, boolean useVersion_1_0_0) throws XMLParsingException
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):
element
- useVersion_1_0_0
- if the filterencoding 1.0.0 rules should be applied.
Query
instance
XMLParsingException
public java.lang.String getHandle()
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.
public QualifiedName[] getTypeNames()
public java.lang.String[] getAliases()
The returned array is either null or has the same length as the array returned by getTypeNames()
.
getTypeNames()
public java.lang.String getSrsName()
public void setSrsName(java.lang.String srsName)
srsName
- name of the requested SRSpublic void performBBoxTest() throws InvalidParameterValueException
InvalidParameterValueException
public void deleteBBoxTest()
public java.lang.String getFeatureVersion()
public PropertyPath[] getPropertyNames()
getFunctions()
public Function[] getFunctions()
<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.
getPropertyNames()
public Filter getFilter()
public SortProperty[] getSortProperties()
public GetFeature.RESULT_TYPE getResultType()
public int getMaxFeatures()
public void setMaxFeatures(int maxFeatures)
maxFeatures
- public int getStartPosition()
The startPosition parameter identifies the first result set entry to be returned. If no startPosition is set explicitly, 1 will be returned.
public void setStartPosition(int startPosition)
startPosition
- getStartPosition()
public void guessMissingTypeNameNamespace(WFService wfs)
If the QualifiedName
of a requested type has a null namespace, the first qualified feature type name of
the given WFService
with the same local name is used instead.
Note: The method changes this request part (the feature type names) and should only be called by the
WFSHandler
class.
wfs
- WFService
instance that is used for the lookup of proper (qualified) feature type namespublic void guessAllMissingNamespaces(WFService wfs)
Note: The method changes the request and should only be called by the WFSHandler
class.
wfs
- WFService
instance that is used for the lookup of proper (qualified) feature and property
namespublic java.lang.String toString()
toString
in class java.lang.Object
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org