DescribeStoredQueries
DescribeStoredQueries 操作は、WFS サーバーで管理されている各ストアド クエリに関する詳しいメタデータを返します。特定のクエリの ID を指定することによって、個々のクエリの記述を要求することができます。ID を指定しない場合は、すべてのクエリの記述が返されます。ストアド クエリの ID が無効である場合は、例外レポートが返されます。DescribeStoredQueries は、GET (KVP) および POST (XML) リクエストのみによって WFS バージョン 2.0.0 と 2.0.2 のみに対してサポートされています。現時点でサポートされているのは GetFeatureById のみです。これは、KVP および XML の GetFeatureById という 1 つのストアド クエリの記述を返します。
GET リクエスト
GET リクエストには以下の要素が含まれます。
入力 | 必須 | 説明 |
---|---|---|
SERVICE=WFS |
はい | WFS に固定されます。 |
REQUEST=DescribeStoredQueries |
はい | フィーチャー タイプの記述を取得する操作のために、DescribeStoredQueries を設定します。 |
VERSION |
はい | サポートされる Web Feature Service 規格のバージョン (この操作の場合は、2.0.0 または 2.0.2)。 |
STOREDQUERY_ID=<stored query ID or IDs separated by comma> |
いいえ | 記述対象の 1 つ以上のストアド クエリ ID。 |
KVP による GET リクエストの例
http://<server>:<port>/rest/Spatial/WFS?SERVICE=WFS&REQUEST=DescribeStoredQueries&VERSION=2.0.0
POST リクエスト
XML による POST リクエストの例 (バージョン 2.0.0 のみ。StoredQueryID は 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>
XML による POST リクエストの例 (バージョン 2.0.2 のみ。StoredQueryID は 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>
レスポンスの例 (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>
レスポンスの例 (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>