For XML encoded requests, the ogc:SortBy element is used to specify a list of sort metadata record elements. The attribute sortOrder is used to specify the sort order for
each element. Valid values for the sortOrder attribute are ASC indicating an ascending sort and DESC indicating a descending sort.
10.8.4.13 DistributedSearch parameter
The DistributedSearch parameter may be used to indicate that the query should be distributed. The default query behaviour, if the DistributedSearch parameter is set to
FALSE or is not specified at all, is to execute the query on the local server. In the XML
encoding, if the DistributedSearch element is not specified then the query is executed on the local server.
The hopCount parameter controls the distributed query behaviour by limiting the maximum number of message hops before the search is terminated. Each catalogue
decrements this value by one when the request is received and does not propagate the request if the hopCount=0.
Catalogues may advertise, in the capabilities document, to which other catalogues a query is distributed using an operation constraint called “FederatedCatalogues”. Operation
constraints are described in Subclause 7.4.5 of OGC 05-008c1.
EXAMPLE The following XML fragment shows how the FederatedCatalogues constraint can be used to list the
catalogues on which distributed queries are executed.
ows:OperationsMetadata .
. . ows:Constraint name=”FederatedCatalogues”
ows:Value
http:www.mycatalogue.com ows:Value
ows:Value http:www.yourcatalogue.com
ows:Value ows:Valuehttp:www.theotherguyscatalogue.comows:Value
ows:Constraint ows:OperationsMetadata
10.8.4.14 ResponseHandler parameter
The ResponseHandler parameter is a flag that indicates how the GetRecords operation should be processed by a CSW.
If the parameter is not present, then the GetRecords operation is processed synchronously meaning that the client sends the GetRecords request to a CSW and waits
to receive a valid response or exception message as described in Subclause 10.3.7. The CSW immediately processes the GetRecords request while the client waits for a
response. The problem with this mode of operation is that the client may timeout waiting for the CSW to process the request.
If the ResponseHandler parameter is present, the GetRecords operation is processed asynchronously. In this case, the CSW responds immediately to a clients request with an
acknowledgment message that tells the client that the request has been received and validated, and notification of completion will be sent to the URI specified as the value of
156
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
the ResponseHandler parameter. The following XML Schema fragment defines the acknowledgement message:
xsd:element name=Acknowledgement type=csw:AcknowledgementType xsd:complexType
name=AcknowledgementType xsd:sequence
xsd:element name=EchoedRequest
type=csw:EchoedRequestType xsd:element
name=RequestId type=xsd:anyURI
minOccurs=0 xsd:sequence
xsd:attribute name=timeStamp
type=xsd:dateTime use=required
xsd:complexType xsd:complexType
name=EchoedRequestType xsd:sequence
xsd:any namespace=any
processContents=lax xsd:sequence
xsd:complexType
The acknowledgment message shall echo the exact XML text of the clients request, using the EchoedRequest element, and may include an optionally generated request
identifier using the RequestId element. The echoed request is used to correlate the acknowledgement message with the originating request.
The GetRecords request may then be processed at some later time, taking as much time as is required to complete the operation. When the operation is completed, a
csw:GetRecordsResponse
message or an exception message per Subclause 10.3.7 if a problem was encountered shall be sent to the URI specified as the value of the
ResponseHandler
parameter using the protocol encoded therein. Common protocols
include ftp and mailto.
10.8.5 Response
The following XML-Schema fragment defines the XML format response to a GetRecords
operation:
xsd:element name=GetRecordsResponse
type=csw:GetRecordsResponseType id=GetRecordsResponse
xsd:complexType name=GetRecordsResponseType xsd:sequence
xsd:element name=RequestId type=xsd:anyURI minOccurs=0
xsd:element name=SearchStatus type=csw:RequestStatusType
xsd:element name=SearchResults type=csw:SearchResultsType
xsd:sequence xsd:attribute name=version type=xsd:string use=optional
xsd:complexType xsd:complexType name=RequestStatusType id=RequestStatusType
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
157