Request Semantics KVP encoding

86 Copyright © 2010 Open Geospatial Consortium Table 21 — Keywords for DescribeStoredQueries KVP-encoding URL Component OMa Description Common Keywords REQUEST=DescribeStoredQueries See Table 7 Only keywords for all operations or the DescribeStoredQueries operation. STOREDQUERY_ID O A comma-separated list of stored query identifiers to describe. If the keyword is not specified then all stored queries offered by a server shall be described. A O = Optional, M = Mandatory 14.4.4 Response 14.4.4.1 Response semantics Figure 26 describes the response to a DescribeStoredQueries operation. DescribeS toredQueriesResponse + query [0. .] : StoredQueryDesc ription ParameterExpression + name : LocalName + type : ScopedName + title [0..] : LocalisedCharacterString + abstract [0..] : LocalisedCharacterString + metadata [0..] : Any StoredQueryDescription + title [0..] : LocalisedCharacterString + abstract [0..] : LocalisedCharacterString + metadata [0. .] : Any + id : URI + parameter [ 0..] : ParameterExpression + queryExpressionText [ 0..] : QueryExpressionText QueryE xpressionText + any [0..] : Any + ret urnFeatureTypes [1..] : ScopedName + language : URI + isPrivate : Boolean = false Figure 26 — DescribeStoredQueriesResponse 14.4.4.2 XML encoding The following XML Schema fragment defines the response to a DescribeStoredQueries operation: xsd:element name=DescribeStoredQueriesResponse type=wfs:DescribeStoredQueriesResponseType xsd:complexType name=DescribeStoredQueriesResponseType xsd:sequence xsd:element name=StoredQueryDescription type=wfs:StoredQueryDescriptionType minOccurs=0 maxOccurs=unbounded xsd:sequence xsd:complexType The response contains one or more wfs:StoredQueryDescription elements each describing a stored query. See 14.2 for a description of the wfs:StoredQueryDescriptionType type. Copyright © 2010 Open Geospatial Consortium 87 14.5 CreateStoredQuery operation

14.5.1 Request Semantics

A stored query may be created using the CreateStoredQuery see Figure 27 operation. CreateStoredQuery + query [0. .] : St oredQueryDescript ion BaseRequest + service : Charact erSt ring = WFS {frozen} + version : Charact erSt ring = 2.0.0 {frozen} + handle [0..1] : CharacterString StoredQueryDesc ription + title [0..] : LocalisedCharacterString + abstract [0..] : LocalisedCharacterString + metadata [0..] : Any + id : URI + parameter [0..] : ParameterExpression + queryExpressionText [0. .] : QueryExpressionText Figure 27 — CreateStoredQuery request Not all stored queries that a server offers need to be created using the CreateStoredQuery operation. Servers can be pre-configured to offer any number of stored queries implemented in any number of ways. It is anticipated that profiles of this International Standard may define sets of stored queries that compliant WFSs must offer. NOTE It is further anticipated that in many cases, for the sake of efficiency and performance, pre-configured stored queries would be implemented as executable code. Such implementations would also allow for complex query logic to be implemented and hidden behind a simple stored query interface.

14.5.2 XML encoding

The following XML Schema fragment defines the XML encoding for the CreateStoredQuery operation. xsd:element name=CreateStoredQuery type=wfs:CreateStoredQueryType xsd:complexType name=CreateStoredQueryType xsd:complexContent xsd:extension base=wfs:BaseRequestType xsd:sequence xsd:element name=StoredQueryDefinition type=wfs:StoredQueryDescriptionType minOccurs=0 maxOccurs=unbounded xsd:sequence xsd:extension xsd:complexContent xsd:complexType

14.5.3 KVP encoding

No KVP-encoding is defined for the CreateStoredQuery operation.

14.5.4 Parameter discussions

The StoredQueryDefinition parameter, encoded using the wfs:StoredQueryDefinition element, shall contain the definition of a stored query. Multiple stored queries may be created in a single CreateStoredQuery request.