Page 1 CSISS Center for Spatial Information Science and Systems CWIC Development Team Meeting, 2014 CWIC OpenSearch Design and Implementation Yuanzheng Shao, Lingjun Kang, Archie Warnock {yshao3, CWIC Workshop, Jan 28-30, 2014 Greenbelt, MD
Page 2 CSISS Center for Spatial Information Science and Systems Outline CWIC OpenSearch Design –Standards –OSDD –Request –Response –Error Handling CWIC OpenSearch implementation –Scenario –Integrated catalog INPE GHRSST USGS/LSI –Next
Page 3 CSISS Center for Spatial Information Science and Systems OGC r8 –OGC OpenSearch Geo and Time Extensions –Latest version, to be approved. –Voting page ( ect_id=82&tab=5) OpenSearch Draft 5 – raft_5 ATOM Syndication Format – CWIC OpenSearch Design - Standards
Page 4 CSISS Center for Spatial Information Science and Systems Aim –generating OpenSearch description document dynamically based on the dataset identifier. Instruct the granule-level querying –Customized response for each dataset, hard-coded the dataset identifier in the query template Parameter –datasetId: used to specify dataset identifier (DIF Entry ID) Sample OSDD request ( for Landsat_8 dataset ) – asetId=Landsat_8http://cwicdev.wgiss.ceos.org/opensearch/datasets.atom?dat asetId=Landsat_8 CWIC OpenSearch Design - OSDD
Page 5 CSISS Center for Spatial Information Science and Systems Sample Response CWIC OpenSearch CEOS WGISS Integrated Catalog OpenSearch CWIC,CEOS,WGISS,OpenSearch CWIC Development Team INPE open en-us UTF-8 UTF-8 CWIC OpenSearch Design - OSDD
Page 6 CSISS Center for Spatial Information Science and Systems Issue –How to generate the response without passing dataset identifier? Error output General response (See ) CWIC OpenSearch Design - OSDD
Page 7 CSISS Center for Spatial Information Science and Systems Dataset Identifier (Mandatory) –The dataset identifier (datasetId) parameter is used to specify the dataset identifier which could be retrieved from IDN as DIF Entry ID. This parameter is a required parameter. The client can not specify more than one dataset in single request –Required namespace: xmlns:cwic=" Error handling for non-exist Dataset Identifier –Set HTTP Status code to 400 –Generate user-friendly exception message in –Send the response to client CWIC OpenSearch Design – Request (datasetId)
Page 8 CSISS Center for Spatial Information Science and Systems Temporal Extension (Optional) –Adopted OGC r8 –Required namespace: xmlns:time=" Parameter Values –time:start - a string describing the start of the temporal interval to search (bigger or equal to) –time:end - a string describing the end of the temporal interval to search (smaller or equal to). Format –Character string with the start of the temporal interval according to RFC-3339 date only: YYYY-MM-DD date-time: YYYY-MM-DDTHH:MI:SSZ CWIC OpenSearch Design – Request (temporal)
Page 9 CSISS Center for Spatial Information Science and Systems GEO Extension (Optional) –Adopted OGC r8 –Required namespace: xmlns:geo=" Parameter Value –geo:box - the bouding box specifying the area of interest Format –the box is defined by "west, south, east, north" coordinates of longitude, latitude, in an EPSG:4326 decimal degrees. CWIC OpenSearch Design – Request (GEO)
Page 10 CSISS Center for Spatial Information Science and Systems Used namespace in ATOM Response CWIC OpenSearch Design – ATOM Response Namespace URL xmlnshttp:// xmlns:opensearchhttp://a9.com/-/spec/opensearch/1.1/ xmlns:dchttp://purl.org/dc/elements/1.1 xmlns:georsshttp:// xmlns:geohttp://a9.com/- /opensearch/extensions/geo/1.0/ xmlns:timehttp://a9.com/- /opensearch/extensions/time/1.0/ xmlns:cwichttp://cwic.wgiss.ceos.org/opensearch/ex tensions/1.0/ openSearch or opensearch
Page 11 CSISS Center for Spatial Information Science and Systems element CWIC OpenSearch Design – ATOM Response Element Value titleFixed value: CWIC OpenSearch Response updatedCurrent system date/time authorFixed value: CEOS WGISS Integrated Catalog (CWIC) - CWIC Contact - Web: idFixed value: linkProvide the “self” link corresponding to the request linkProvide the “search” link corresponding to the OSDD request opensearch:totalResultsThe number of search results available for the current search. opensearch:startPageReplaced with the page number of the set of search results desired by the search client. opensearch:itemsPerPageThe number of search results returned per page. opensearch:QueryDefines a search query that can be performed by search clients.
Page 12 CSISS Center for Spatial Information Science and Systems / element CWIC OpenSearch Design – ATOM Response Element Value titlegranule name idFixed URL prefix followed by granule identifier. For example: SST_s2348_e2352-v01.nc.bz2 updatedgranule update time authorFixed value for each data provider georss:boxbounding box of specific entry dc:datetemporal range of specific entry summarya text construct that conveys a short summary, abstract, or excerpt of an entry. linksee next slide
Page 13 CSISS Center for Spatial Information Science and Systems / / element CWIC OpenSearch Design – ATOM Response Type of link Definitionrel valuemime-type datalink representing a data file or other science data resource; enclosureapplication/x-netcdf, application/x-hdf, etc. metadatafile with (usually) structured information about corresponding data files describedBy (ESIP) via (OGC) text/xml browserimage of the data typically used for making data request decisions iconimage/jpeg, image/png etc. ordergranule ordering urlenclosuretext/html
Page 14 CSISS Center for Spatial Information Science and Systems / / for OPeNDAP CWIC OpenSearch Design – ATOM Response Type of link Definitionrel value mime-type Onlinkurn:x-esri:specification:ServiceType:ArcIMS:Metadata:Onlinkenclosuretext/html Thumbnailurn:x-esri:specification:ServiceType:ArcIMS:Metadata:Thumbnailiconimage/png (for GHRSST) Documenturn:x-esri:specification:ServiceType:ArcIMS:Metadata:Documentviatext/xml TDSurn:x-esri:specification:ServiceType:TDSenclosureapplication/x-bzip2 FTPurn:x-esri:specification:ServiceType:FTPenclosureapplication/x-bzip2 OPeNDAPurn:x-esri:specification:ServiceType:OPeNDAPenclosuretext/html LASurn:x-esri:specification:ServiceType:LASiconimage/png (for GHRSST) Downloadurn:x-esri:specification:ServiceType:Downloadenclosureapplication/x-bzip2 WMS/WCSurn:x-esri:specification:ServiceType:WMS urn:x-esri:specification:ServiceType:WCS enclosuretext/xml
Page 15 CSISS Center for Spatial Information Science and Systems CWIC OpenSearch Design - Error Handling
Page 16 CSISS Center for Spatial Information Science and Systems CWIC OpenSearch uses the HTTP status codes for client (4xx) and server (5xx) errors. –Client-side issues 400 Bad Request: The request has an invalid syntax (i.e. badly formatted geometry) 413 Request Entity Too Large: The request originates too many returnable hits –For server side errors 500 Internal Server Error: Default code for the server side for an execution error 501 Not Implemented: When requesting an unimplemented feature (e.g. relation operator not supported) 503 Service Unavailable: When the search service is temporarily not available (due to overload or other reasons) 504 Gateway Timeout: When the search engine is a broker or aggregator to other services that fail to produce a answer within a giving time frame CWIC OpenSearch Design – Error Handling
Page 17 CSISS Center for Spatial Information Science and Systems Zero-result handling –Zero-result is not an error! HTTP status code sets to 200 –Response shall contain a valid ATOM response without element –Specify human-readable message in element –Set the value of element to 0 CWIC OpenSearch Design – Error Handling
Page 18 CSISS Center for Spatial Information Science and Systems Zero-result sample response CWIC OpenSearch Design – Error Handling CWIC OpenSearch Response No results found for your specific dataset and query parameters T21:18:20Z CEOS WGISS Integrated Catalog (CWIC) - CWIC Contact - Web:
Page 19 CSISS Center for Spatial Information Science and Systems CWIC OpenSearch Implementation
Page 20 CSISS Center for Spatial Information Science and Systems Existing catalog analysis –Provide OpenSearch API, like ECHO and CCMEO Solution: Reuse native OpenSearch API, and convert the response to universal CWIC OpenSearch response –Provide CSW API, like GHRSST Solution: Convert CWIC OpenSearch request to CSW request, interact with remote CSW catalog, parse CSW response and convert it to universal CWIC OpenSearch response –Provide SOAP API, like USGS/LSI Solution: Convert CWIC OpenSearch request to SOAP request, interact with SOAP API, parse SOAP response and convert it to universal CWIC OpenSearch response –Provide HTTP GET, like INPE Solution: Issue GET request, retrieve XML response, parse the XML and convert to universal CWIC OpenSearch response CWIC OpenSearch Implementation – Scenario
Page 21 CSISS Center for Spatial Information Science and Systems Supported catalogs –INPE –USGS/LSI –GHRSST Ongoing integrated catalogs –ECHO –CCMEO Demo –CWIC-Start CWIC OpenSearch Implementation
Page 22 CSISS Center for Spatial Information Science and Systems Discussion