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

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. Copyright © 2012 Open Geospatial Consortium 61 6. The attribute totalNodes holds the total number of nodes below the node specified in NID, including the node specified in NID. The value of totalNodes shall be an integer 0. If Depth=1 in the request, then totalNodes shall be equal to childNodes+1. 7. The attribute collections holds the total number of collections available below this node. The value of collections is an integer ≥ 0. If collections=0 and childNodes=0, it means the node specified in NID points to a collection. If collections=0, childNodes0 in the response and Depth=1 in the request, it means the node specified in NID has child nodes that may have additional nodes under them that may have collections under them. If collections=0, childNodes0 in the response and Depth=All in the request, it means there are no collections under the node specified in NID. 8. The attribute edgeDepth holds the total number of edges or links from the node specified in NID to the deepest leaf in the sub-tree. The value of edgeDepth shall be an integer ≥ 0. A leaf node i.e. a node that points to a collection has edgeDepth=0. If Depth=1 in the request, then edgeDepth can be 1 or 0 in the response.

20.4 GetCollections

This request provides the client to retrieve a host of information regarding a collection of WAMI data being served by a server. The data is presented to the client in the form of a tree. A collection has been defined above. The structure and purpose of a collection tree have been discussed above. The client can retrieve from a server serving a collection tree: 1. One or more nodes in the WAMI collection tree 2. A sub-tree of one or more nodes, starting from any node in the WAMI collection tree 3. All, selected or no metadata about each node A sub-tree of nodes can be isolated by: 1. Node identifier 2. A range time intervals 3. A coverage area of interest In order for a client to get a collection start from a specific node, the nodes needs to be identified by a node identifier NID that is unique to the tree being served. If the node ID is not specified in the service request, then the root node is assumed. To retrieve all nodes below a specific node or the root node, the parameter Depth must be set to All, explicitly. The client can optionally choose to receive metadata about a node, or not. If the client chooses to receive metadata about a node, it can receive all metadata or some metadata based on a server- defined scheme.