Response .1 Response semantics ListStoredQueries operation .1 Request Semantics

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. 88 Copyright © 2010 Open Geospatial Consortium See 14.2 for a description of the wfs:StoredQueryDescriptionType type.

14.5.5 Response

Figure 28 describes the response to a CreateStoredQuery operation. ExecutionStatusResponse + status : Charact erSt ring = OK {frozen} Figure 28 — CreateStoredQuery response The following XML Schema fragment defines the response to a CreateStoredQuery operation: xsd:element name=CreateStoredQueryResponse type=wfs:CreateStoredQueryResponseType xsd:complexType name=ExecutionStatusType xsd:attribute name=status type=xsd:string fixed=OK xsd:complexType xsd:complexType name=CreateStoredQueryResponseType xsd:complexContent xsd:extension base=wfs:ExecutionStatusType xsd:complexContent xsd:complexType The root element of the response is wfs:CreateStoredQuery that contains a single attributed named status. The only valid value for the status attribute is OK indicating that the stored query was successfully processed and stored by the server. Otherwise the server shall generate an exception see 7.5. 14.6 DropStoredQuery operations 14.6.1 Request Semantics