DescribeStoredQueries
Der Vorgang „DescribeStoredQueries“ gibt detaillierte Metadaten zu jeder gespeicherten Abfrage zurück, die vom WFS-Server verwaltet wird. Eine Beschreibung einer einzelnen Abfrage kann angefordert werden, indem die ID dieser spezifischen Abfrage angegeben wird. Wenn keine ID angegeben ist, werden alle Abfragen beschrieben. Eine ungültige gespeicherte Abfrage-ID gibt einen Ausnahmebericht zurück. „DescribeStoredQueries“ wird nur für die WFS-Versionen 2.0.0 sowie 2.0.2 und nur über GET- (KVP) und POST-Anforderungen (XML) unterstützt. Nur „GetFeatureById“ wird derzeit unterstützt. Dieser Vorgang gibt eine Beschreibung einer gespeicherten Abfrage mit der Bezeichnung „GetFeatureById“ für KVP und XML zurück.
GET-Anforderung
Die GET-Anforderung enthält Folgendes:
Eingabe | Erforderlich | Beschreibung |
---|---|---|
SERVICE=WFS |
Ja | Auf WFS festgelegt. |
REQUEST=DescribeStoredQueries |
Ja | Bei einem Vorgang zur Beschreibung von Featuretypen auf „DescribeStoredQueries“ festlegen. |
VERSION |
Ja | Die unterstützte Version des Web Feature Service-Standards (bei diesem Vorgang entweder 2.0.0 oder 2.0.2). |
STOREDQUERY_ID=<stored query ID or IDs separated by comma> |
Nein | Bestimmte gespeicherte Abfrage-ID oder -IDs, die beschrieben werden soll(en). |
Beispiel für GET-Anforderung mit KVP:
http://<server>:<port>/rest/Spatial/WFS?SERVICE=WFS&REQUEST=DescribeStoredQueries&VERSION=2.0.0
POST-Anforderung
Beispiel einer POST-Anforderung mit XML (nur Version 2.0.0; die StoredQueryID verwendet das URN-Format):
<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>
Beispiel einer POST-Anforderung mit XML (nur Version 2.0.2; die StoredQueryID verwendet das URL-Format (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>
Beispielantwort (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>
Beispielantwort (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>