78
Copyright © 2010 Open Geospatial Consortium
Table 19 — Additional keywords for GetFeatureWithLock KVP encoding
URL Component OMa
Default Description
EXPIRY O
300 This parameter may only be specified if the request is
GetFeatureWithLock. It value is a positive integer. The value is specified in seconds and indicates the length of time a lock will be held on the features
in the result set. If the parameter is not specified then the locks will be held for the default expiry period of 300 seconds.
LOCKACTION O
ALL Specify how the lock shall be acquired. ALL indicates to all feature shall be
locked in order for the operation to succeed, otherwise the operation shall raise a CannotLockAllFeatures exception. SOME indicates that the server
shall lock as many features as possible; the operation shall always succeed although the returned lockId may not lock anything.
a
O = Optional, M = Mandatory
13.2.4 Parameter discussion 13.2.4.1 expiry parameter
The expiry parameter is used to set a time limit for how long the WFS shall maintain the locks in the event that a Transaction request is never received to release them. The default lock duration is 300 s or 5 min.
13.2.4.2 lockAction parameter
The lockAction parameter controls how a WFS attempts to obtain locks on features in the result set of the operation.
A value of ALL the default value indicates that the WFS shall attempt to lock all features in the result set. In the event that this is not possible, because some of the features are already locked, the WFS shall raise a
CannotLockAllFeatures exception as described in 7.5. If all features are successfully locked, the WFS shall report to the client a lock identifier using the lockId attribute on the wfs:FeatureCollection element that can be
used in a subsequent Transaction operation to operate on the locked features and release the locks see 15.2.3.1.2.
A value of SOME indicates that the WFS shall lock as many feature in the result set as possible. The response document shall only contain those features that were successfully locked and the WFS shall report
to the client a lock identifier using the lockId attribute on the wfs:FeatureCollection element that can be used in a subsequent Transaction operation to operate on the locked features and release the locks see
15.2.3.1.2.
13.2.4.3 resultType parameter
The resultType parameter is described in 7.6.3.6. The only valid value for the resultType attribute for a GetFeatureWithLock request shall be results. If a client
specifies a value of hits the server shall raise an InvalidParameterValue exception see 7.5.
13.3 Response 13.3.1 Introduction
The response to a GetFeatureWithLock operation is similar to the response to a GetFeature operation. The only difference is that the response to a GetFeatureWithLock operation includes a value for the lockId
parameter.
Copyright © 2010 Open Geospatial Consortium
79 13.3.2 lockId parameter
For a GetFeatureWithLock request, a WFS shall generate a response document that includes the lock identifier used to lock features in the result set. The lock identifier shall be encoded in the response using the
lockId attribute that is declared on the wfs:FeatureCollection element see 11.3.2.
EXAMPLE The following XML fragment illustrates how to include the lockId attribute in the response to a
GetFeatureWithLock operation:
wfs:FeatureCollection lockId=00A01… …
wfs:FeatureCollection
The ellipses are meant to represent all the other components included in the GetFeatureWithLock response which are identical to the components included in the GetFeature response see 11.3.
13.4 Exceptions
If a WFS does not implement the GetFeatureWithLock operation then it shall generate an OperationNotSupported exception, indicating that the operation is not supported, if such a request is
encountered.
In the event that a web feature service does support the GetFeatureWithLock operation and encounters an error parsing the request, it shall raise an OperationParsingFailed exception as described in 7.5.
In the event that a web feature service does support the GetFeatureWithLock operation and encounters an error processing the request, it shall raise an OperationProcessingFailed exception as described in 7.5.
14 Stored query management
14.1 Introduction
This clause describes the operations ListStoredQueries, DescribeStoredQueries, CreateStoredQuery and DropStoredQuery.
All servers shall support the ListStoredQueries and DescribeStoredQueries operations and shall implement the GetFeatureById stored query see Table 1, 7.9.3.6.
Servers that implement the Manage stored queries conformance class see Table 1 shall declare this in their capabilities document using the ManageStoredQueries constraint see Table 13 and shall implement the
CreateStoredQuery and DropStoredQuery operations.
14.2 Defining stored queries 14.2.1 XML encoding
The following XML Schema fragment defines the XML encoding for describing or defining a stored query expression:
xsd:complexType name=StoredQueryDescriptionType xsd:sequence
xsd:element ref=wfs:Title minOccurs=0 maxOccurs=unbounded xsd:element ref=wfs:Abstract minOccurs=0 maxOccurs=unbounded
xsd:element ref=ows:Metadata minOccurs=0 maxOccurs=unbounded xsd:element name=Parameter
type=wfs:ParameterExpressionType minOccurs=0 maxOccurs=unbounded
xsd:element name=QueryExpressionText type=wfs:QueryExpressionTextType
minOccurs=1 maxOccurs=unbounded
80
Copyright © 2010 Open Geospatial Consortium
xsd:sequence xsd:attribute name=id type=xsd:anyURI use=required
xsd:complexType xsd:complexType name=ParameterExpressionType
xsd:sequence xsd:element ref=wfs:Title minOccurs=0 maxOccurs=unbounded
xsd:element ref=wfs:Abstract minOccurs=0 maxOccurs=unbounded xsd:element ref=ows:Metadata minOccurs=0 maxOccurs=unbounded
xsd:sequence xsd:attribute name=name type=xsd:string use=required
xsd:attribute name=type type=xsd:QName use=required xsd:complexType
xsd:complexType name=QueryExpressionTextType mixed=true xsd:choice
xsd:any namespace=other processContents=skip minOccurs=0 maxOccurs=unbounded
xsd:any namespace=targetNamespace processContents=skip minOccurs=0 maxOccurs=unbounded
xsd:choice xsd:attribute name=returnFeatureTypes
type=wfs:ReturnFeatureTypesListType use=required xsd:attribute name=language type=xsd:anyURI use=required
xsd:attribute name=isPrivate type=xsd:boolean default=false xsd:complexType
xsd:simpleType name=ReturnFeatureTypesListType xsd:list itemType=xsd:QName
xsd:simpleType
The type wfs:StoredQueryDescriptionType is used to declare the element wfs:StoredQueryDescription that provides a description of a stored query in response to a DescribeStoredQueries operation see 14.4 and the
element wfs:StoredQueryDefinition that is used by the CreateStoredQuery operation see 14.5 to define a stored query.
The description or definition of a stored query contains metadata describing the stored query, a list of zero or more arguments that the stored query accepts and one or more component query expressions that are
executed when the stored query is invoked.
14.2.2 Parameter discussion 14.2.2.1 Title parameter
The Title parameter may be used to assign a human-readable name to a stored query. Multiple titles can be specified in one or more languages. If more than one wfs:Title element is specified, the values of the xml:lang
attribute for each shall be different.
The language of a Title string shall be declared using a two-character language code as described in IETF RFC 4646. The default language value is en.
14.2.2.2 Abstract parameter
The Abstract parameter may be used to assign a descriptive human-readable to a stored query. Multiple abstracts can be specified in one or more languages. If more than one wfs:Abstract element is specified, the
values of the xml:lang attribute for each shall be different.
The language of an Abstract string shall be declared using a two-character language code as described in IETF RFC 4646. The default language value is en.
14.2.2.3 Metadata parameter
The Metadata parameter may be used to encode inline or reference more detailed metadata about a stored query. The ows:Metadata element is described in OGC 06-121r3.