DescribeStoredQueries

L’opération DescribeStoredQueries renvoie les métadonnées détaillées sur chaque requête stockée gérée par le serveur WFS. Une description d’une requête individuelle peut-être être demandée en fournissant l’ID de la requête spécifique. Si aucun ID n’est fourni, toutes les requêtes sont décrites. Un ID de requête stockée non valide renvoie un rapport d’exception. DescribeStoredQueries est pris en charge uniquement pour WFS versions 2.0.0 et 2.0.2 via les requêtes GET (KVP) et POST (XML) uniquement. Seul GetFeatureById est actuellement pris en charge ; il renvoie une description d’une requête stockée appelée GetFeatureById pour KVP et XML.

Requête GET

La requête GET contient :

Input Obligatoire Description
SERVICE=WFS Oui Défini sur WFS.
REQUEST=DescribeStoredQueries Oui Défini sur DescribeStoredQueries pour une opération de type description de fonction.
VERSION Oui Version prise en charge de la norme Web Feature Service (pour cette opération, soit 2.0.0, soit 2.0.2).
STOREDQUERY_ID=<stored query ID or IDs separated by comma> Non Un ou plusieurs ID de requêtes stockées spécifiques à décrire.

Exemple de requête GET avec KVP :

http://<server>:<port>/rest/Spatial/WFS?SERVICE=WFS&REQUEST=DescribeStoredQueries&VERSION=2.0.0

Requête POST

Exemple de requête POST avec XML (version 2.0.0 uniquement ; StoredQueryID utilise le format URN) :

<wfs:DescribeStoredQueries
version="2.0.0"
service="WFS"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
               <wfs:StoredQueryId>urn:ogc:def:query:OGC-WFS::GetFeatureById</wfs:StoredQueryId>
</wfs:DescribeStoredQueries>

Exemple de requête POST avec XML (version 2.0.2 uniquement ; StoredQueryID utilise le format URL (http)) :

<wfs:DescribeStoredQueries
version="2.0.2"
service="WFS"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
               <wfs:StoredQueryId>http://www.opengis.net/def/query/OGC-WFS/0/GetFeatureById</wfs:StoredQueryId>
</wfs:DescribeStoredQueries>

Exemple de réponse (v2.0.0)

<wfs:DescribeStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0/wfs.xsd">
		<wfs:StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
			<wfs:Title xml:lang="en">Get Feature By Identifier</wfs:Title>
			<wfs:Abstract>
				This stored query accepts a single argument, named "id" and of type xsd:string, and shall return a single feature with the identifier specified as its argument.
			</wfs:Abstract>
			<wfs:Parameter name="ID" type="xs:string">
				<wfs:Title>The Feature Id</wfs:Title>
				<wfs:Abstract>The id of the feature to be returned</wfs:Abstract>
			</wfs:Parameter>
			<wfs:QueryExpressionText xmlns:miwfs="http://www.mapinfo.com/wfs" xmlns:miwfs2="http://www.mapinfo.com/wfs2" returnFeatureTypes="miwfs:World miwfs:WorldCap miwfs:USA miwfs:USACap miwfs2:World miwfs:UK_REGNS miwfs:UKCTY215 miwfs:txairportswithtimefields" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="true"/>
		</wfs:StoredQueryDescription>
	</wfs:DescribeStoredQueriesResponse>

Exemple de réponse (v2.0.2)

<wfs:DescribeStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0/wfs.xsd">
	<wfs:StoredQueryDescription id="http://www.opengis.net/def/query/OGC-WFS/0/GetFeatureById">
		<wfs:Title xml:lang="en">Get Feature By Identifier</wfs:Title>
		<wfs:Abstract>
			This stored query accepts a single argument, named "id" and of type xsd:string, and shall return a single feature with the identifier specified as its argument.
		</wfs:Abstract>
		<wfs:Parameter name="ID" type="xs:string">
			<wfs:Title>The Feature Id</wfs:Title>
			<wfs:Abstract>The id of the feature to be returned</wfs:Abstract>
		</wfs:Parameter>
		<wfs:QueryExpressionText xmlns:miwfs="http://www.mapinfo.com/wfs" xmlns:miwfs2="http://www.mapinfo.com/wfs2" returnFeatureTypes="miwfs:World miwfs:WorldCap miwfs:USA miwfs:USACap miwfs2:World miwfs:UK_REGNS miwfs:UKCTY215 miwfs:txairportswithtimefields" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="true"/>
	</wfs:StoredQueryDescription>
</wfs:DescribeStoredQueriesResponse>