XML Response schema Exceptions Example GetCollectionCount Response .1 Example: Response Attributes

Copyright © 2012 Open Geospatial Consortium 59 AllowedValues DefaultValueapplicationxmlDefaultValue Parameter Parameter name=AcceptLanguages AllowedValues Valueen-USValue ValueenValue AllowedValues DefaultValueen-USDefaultValue Parameter Parameter name=NID AnyValue MeaningClient sets one Node ID. The service returns collection count information starting from this node. If not set or empty, implies root node. Shall be implemented by both client and server. Meaning Parameter Parameter name=Depth AllowedValues Value1Value ValueAllValue AllowedValues DefaultValueAllDefaultValue MeaningSpecifies how deep the collection counter shall go down the tree. It has two possible values: 1 or All. If not set or empty, implies Depth=All. Shall be implemented by both client and server. 1: Client received number of child nodes under root or specified node. All: Client receives all the node counts below specified node. Meaning Parameter Parameter name=Bbox AnyValue MeaningBounding box to filter collections wholly outside the box.Meaning Parameter Parameter name=CRS AllowedValues ValueEPSG:4326Value ValueEPSG:4269Value ValueEPSG:32645Value AllowedValues MeaningCoordinate reference system for BBoxMeaning Parameter Parameter name=Time AnyValue MeaningISO 8601 time intervalMeaning Parameter Operation

20.3.6 Response

The response from a GetCollectionCount request can be in a format of the clients choosing from a list of formats that the server supports. If the response is of MIME type applicationxml then the XSD for the response is specified below.

20.3.6.1 XML Response schema

See [WAMI XSD] element “ExceptionReport” for requests with errors. See [WAMI XSD] element “CS_CollectionCount” for normal applicationxml result content. Copyright © 2012 Open Geospatial Consortium 60

20.3.6.2 Exceptions

An error in a GetCollectionCount request may generate the following exceptionCodes: 1. MissingParameterValue 2. InvalidParameterValue 3. OptionNotSupported 4. NoApplicableCode 20.3.6.3 Example GetCollectionCount Response 20.3.6.3.1 Example: ?xml version=1.0 encoding=UTF-8? CS_CollectionCount xmlns=http:www.pixia.comwamiv101 xmlns:ows=http:www.opengis.netows2.0 xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:www.pixia.comwami wami_1_0_1.xsd http:www.opengis.netows2.0 owsAll.xsd childNodes=3 collections=5 depth=1 edgeDepth=2 NID=ROOT root=true totalNodes=25 version=1.0.2 -- depth could have been All -- DescriptionDetailed statistics about a snapshot of the tree from a given Node ID NIDDescription CS_CollectionCount The request provides information about entries in the entire collection tree.

20.3.6.4 Response Attributes

The response XSD specifies the syntax and constraints for each attribute. Below is the meaning of each attribute and an explanation of the interpretation of its values. 1. The attribute version specifies the version of the response. 2. The attribute root can be True or False. If root=True, it means the collection count information has been provided starting from the root node. If root=False, it means the specified node is either an inner node or leaf node.

3. The attribute depth can be 1 or All and specifies the value of the Depth parameter that was

set in the request that spawned this response. 4. The attribute NID is the node ID of the collection node being queried. Its value is either the value of the NID parameter in the request if it was set explicitly or the node ID of the root node. 5. The attribute childNodes holds the number of immediate children below this node. The value of childNodes shall be an integer ≥ 0. If childNodes=0, it means the given node is a leaf node and points to a valid collection. If childNode has a value ≥ 1, it means the given node is a root node or inner node.