DAP4 Dataset Services Response: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
Line 40: Line 40:
'''Note:''' If a client understands how to modify/augment the dataset resource URL (  as described in the [[DAP4_Web_Services_v3#Web_Services | DAP4 Web Services Specification]] ) such that it becomes a DAP response URL then it need never obtain the Dataset Services response.
'''Note:''' If a client understands how to modify/augment the dataset resource URL (  as described in the [[DAP4_Web_Services_v3#Web_Services | DAP4 Web Services Specification]] ) such that it becomes a DAP response URL then it need never obtain the Dataset Services response.


=== Using Atom 1.0 ===
=== Proposed encoding for the services response  ===  


The proposed encoding for this information is to use [http://en.wikipedia.org/wiki/Atom_(standard) Atom 1.0]. The advantages of this encoding are several and the detractions are close to nil. Atom 1.0 provides the DAP with a widely-used standard for representing information that is very general in nature (that data are accessible using a set of web services, each of which provides a sightly different kind of response and can be accessed using a different URL). Furthermore, we can use this same response in other responses a server might like to provide such as a ''data cast'' provides to subscribers or an OpenSearch result. Using Atom is important in those contexts because a response that it not specific to DAP is a requirement. At the same time, because the Atom specification does not impose needless or complex additional requirements, the cost of using it is low. In fact the only information in Atom 1.0 that is not listed above is a the name and email of an ''author'' for the ''entry''. While this might be rationalization, including that information could help a number of users who send email to support lists asking about dataset ''X'' simply because they don't know where/who else to ask.
c.f. [[DAP4_Web_Services v3| DAP4 Web Services]]


Using Atom, A DAP4 web service is described by:
A DAP4 web service is described by:
* An 'entry' that serves to group a set of ''link'' elements that reference different services to a common set of information about the dataset. For the dataset, that information is:
* Attribute '''title''' whose value is a simple human readable string called  
** A simple human readable name called ''title''.
* An attribute called '''role''' whose value is a unique to the service type, resource role ID (a URI) that serves as a way to clearly identify what each service does. This is intended to allow people and software to unambiguously identify specific services, irrespective of their human readable title. The idea is that that the role attribute tells you what is going to happen when you dereference the URL held in the '''link''' element.
** An ''id'' that uniquely identifies the ''entry''.
* One or more '''link''' elements containing:
** The last modified time for the dataset (''updated'').
** An attribute called '''href''' whose value is a URL that when dereferenced will return the service response in the media type described by the value of the '''type''' attribute.
** A person responsible for the dataset (''author'').
** An attribute called '''type''' whose value is the media-type for the representation returned by that URL held in the '''href''' attribute.
** An optional ''content'' element. (well, it's conditionally optional - see the [http://tools.ietf.org/html/rfc4287 Atom spec])
** An optional attribute called '''description''' whose value is a human readable string that provides a brief description of the '''link''' elements semantics.
* For each service, a ''link'' element is used where the four attributes ''title'', '' rel'', ''type'', ''href'' are used as follows:
* An optional Description element that contains (if present):
** ''title'' - A human-readable description of the service
** An optional attribute called '''href'' that contains a URL that points to a human readable document describing the service.  
** ''rel'' - See the [http://tools.ietf.org/html/rfc4287 Atom spec]
** The text content of the element MUST be a human readable description of the service.
** ''type'' - A MIME-type that identifies the response as specific to OPeNDAP such as ''application/vnd.opendap.org.dap4.xdp+xml''
** ''href'' - The full URL used to get the response


For the Atom-based response, we propose to use MIME types as Ethan suggested (application/vnd.opendap.org.dap4.data etc.)  when describing services in the Dataset Services Response, and then, when the server provides those responses over HTTP it sets the content header to the [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]].  
A service is accessed by dereferencing one of the access URLs held in the '''href''' attribute of a '''link''' elements, which is typically constructed by adding some type of suffix to the dataset's referent (aka base) URL. The way in which the query string (aka constraint expression) is used is defined by each service, and there is no requirement for inter-service query string API conformity.


For example, in the Dataset Services response we might describe the Dataset Metadata service like this:
A more extensive discussion of the various services that might appear in a DatasetServices document can be found on the [[DAP4 Web Services v3]] page.
<font size="2">
<source lang="xml" >
...
    <link title="DAP4 Dataset Metadata XML Document."
          rel="related"
          type="application/vnd.opendap.org.dap4.xdp+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp"/>
...
</source>
</font>


And when a DAP4 server responds to a client asking for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp the server would set the HTTP headers so that the Content-Type would be the  [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]] (in this case ''text/xml'') . The server could put the more expressive type tag in the ''Content-Description'' header:
==== Example Response ====
<font size="2">
<source lang="txt" >
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Content-Type: test/xml
Content-Description: application/vnd.opendap.org.dap4.xdp+xml; url=http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp
Content-Encoding: gzip
X-DAP: 4.0
</source>
</font>
 
For normative information on Atom, see [http://tools.ietf.org/html/rfc5023 RFC 5023] and [http://tools.ietf.org/html/rfc4287 RFC 4287].
 
==== Example: Validated Atom Document with one atom:entry for a dataset, and an atom:link for each service ====


<font size="2">
<font size="2">
Line 92: Line 65:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<?xml-stylesheet type="text/xsl" href="/opendap/xsl/serviceDescription.xsl"?>
<DatasetServices xmlns="http://xml.opendap.org/ns/DAP/4.0/dataset-services#"
    xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
   
    <Service title="DAP4 Dataset Services Response" role="http://services.opendap.org/dap4/dataset-services">
        <link description="Normative form of the DSR"
              type="application/vnd.opendap.org.dataset-services+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
        <link description="HTML representation of the DSR" 
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html">
        <link description="Normative DSR with generic Content-Type"
              type="text/xml"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xml">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Services_Description_Service">An index of the Services available for this data resource.</Description>
    </Service>


    <title>DatasetServices: ECMWF_ERA-40_subset.ncml</title>


     <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</id>
     <Service title="DAP4 Dataset Metadata Response"  role="http://services.opendap.org/dap4/dataset-metadata">
        <link description="Normative form of the DMR"
              type="application/vnd.org.opendap.dap4.dataset-metadata+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr">
        <link description="Data Request Form"
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.html">
        <link description="Normative DMR with generic Content-Type"
              type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.xml">
        <link description="RDF representation of DMR"
              type="application/rdf+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rdf">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Service_-_The_metadata">The DAP4 metadata content for this data resource..</Description>
    </Service>


    <updated>2003-12-13T18:30:02-05:00</updated>
   
    <author>
        <name>Nathan Potter</name>
        <email>johndoe@devnull.com</email>
    </author>
    <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
        <div xmlns="http://www.w3.org/1999/xhtml">DAP Dataset Services for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
    </content>


     <link title="Dataset Services Description"
     <Service title="DAP4 Data Response" role="http://services.opendap.org/dap4/data">
          rel="self"
        <link type="application/vnd.org.opendap.dap4.data" 
          type="application/atom+xml"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap" >
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml"/>
        <link type="text/plain" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.ascii" >
        <link type="text/xml"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.xml" >
        <link type="application/x-netcdf"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.nc" >
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Data_Service">DAP4 Data object for this data resource.</Description>
    </Service>
      
      
    <link title="DAP4 Dataset Metadata XML Document."
          rel="related"
          type="application/vnd.opendap.org.dap4.dmr+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr"/>
      
      
     <link title="DAP4 Data object."
     <Service title="ISO-19115 Metadata Service" role="http://services.opendap.org/dap4/iso-19115">
          rel="enclosure"
        <link description="Dataset metadata as ISO-19115"
          type="application/vnd.opendap.org.dap4.data"  
              type="text/xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap"/>
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.iso">
        <link description="ISO-19115 score"
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rubric">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_ISO_Conformance_Score_Service">ISO-19115 Metadata Representation of the DMR.</Description>
    </Service>
 
 
 
    <Service title="DAP2 Data" role="http://services.opendap.org/dap2/dods">
        <link type="application/octet-stream"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dods">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Data_Service">DAP2 Data Object.</Description>
    </Service>
 
    <Service title="DDX" role="http://services.opendap.org/dap2/ddx">
        <link type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ddx">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDX_Service">OPeNDAP Data Description and Attribute XML Document.</Description>
    </Service>
 
    <Service title="DDS" role="http://services.opendap.org/dap2/dds">
        <link type="text/plain"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dds">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDS_Service">OPeNDAP Data Description Structure.</Description>
    </Service>
 
    <Service title="DAS" role="http://services.opendap.org/dap2/das" >
        <link type="text/plain"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.das">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DAS_Service">OPeNDAP Dataset Attribute Structure.</Description>
    </Service>
 
 
    <Service title="INFO" role="http://services.opendap.org/dap2/info">
        <link type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.info">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Info_Service">OPeNDAP Dataset Information Page.</Description>
    </Service>
 
    <Service title="Server Version" role="http://services.opendap.org/dap4/version">
        <link type="text/xml"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ver">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Server_Version_Service">An XML document containing information about the software version of the server..</Description>
    </Service>


    <link title="OPeNDAP HTML Data Request Form for data sub-setting and access."
          rel="related"
          type="text/html"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html" />


     <link title="DAP2 Data Object."
     <Service title="File Access" role="http://services.opendap.org/dap4/file">
          rel="enclosure"
        <link type="text/xml ## This value depends on the file being accessed."
          type="application/vnd.opendap.org.dap2.data"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.file">
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dods"/>
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Native_File_Access_Service">Access to dataset file.</Description>
         
     </Service>
    <link title="DAP4 Data response in ASCII form."
          rel="enclosure"
          type="text/plain"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.asc"/>
         
    <link title="NetCDF-3 file-out response."
          rel="enclosure"
          type="application/x-netcdf"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.nc"/>
         
    <link title="XML Data Response"
          rel="enclosure"
          type="application/vnd.opendap.org.dap4.data+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdap"/>
         
    <link title="DAP2 DDX document"
          rel="related"
          type="application/vnd.opendap.org.dap2.ddx+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ddx"/>
         
    <link title="DAP2 DDS document"
          rel="related"
          type="application/vnd.opendap.org.dap2.dds"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dds"/>
         
    <link title="DAP2 DAS document"
          rel="related"
          type="application/vnd.opendap.org.dap2.dds"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.das"/>
         
    <link title="RDF representation of the Dataset Metadata response."
          rel="related"
          type="application/rdf+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.rdf"/>
         
    <link title="DAP2 Dataset Information Page"
          rel="related"
          type="text/html"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.info"/>
         
    <link title="Server Version Document"
          rel="related"
          type="text/xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ver"/>
         
    <link title="ISO 19115 Metadata Representation of the Dataset (DDX) response."
          rel="related"
          type="text/xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.iso"/>
         
    <link title="ISO 19115 Metadata Representation conformance score for this dataset."
          rel="related"
          type="text/html"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.rubric"/>
         
     <link title="Dataset file access"
          rel="enclosure"
          type="text/xml" 
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.file"/>
         
</entry>
   


    <ServerSideFunctions>
        <Function name="geogrid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#geogrid">
            <Description>Allows a DAP Grid variable to be sub-sampled using georeferenced values.</Description>
        </Function>
        <Function name="grid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#grid">
            <Description>Allows a DAP Grid variable to be sub-sampled using the values of the coordinate axes.</Description>
        </Function>
        <Function name="linear_scale"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#linear_scale">
            <Description>Applies a linear scale transform to the named variable.</Description>
        </Function>
        <Function name="version"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#version">
            <Description>Returns version information for each server side function.</Description>
        </Function>
    </ServerSideFunctions>
</DatasetServices>
</source>
</source>
</font>
</font>


== Rationale for the solution ==
== Rationale for the solution ==
Line 209: Line 202:
[[File:ServiceDescriptionPrototype-01.png]]
[[File:ServiceDescriptionPrototype-01.png]]


===  Alternative encoding for the services response  ===
c.f. [[DAP4_Web_Services v3| DAP4 Web Services]]
Here is an alternative response, made using a syntax of our own devising before looking into using Atom 1.0. The similarity between the two documents first suggested that we might find little cost in using Atom.
A DAP4 web service is described by:
* A simple human readable name called 'title'.
* One or more access URLs and each with an associated media-type for the representation returned by that URL.
* A unique namespace-like id that is used to define an xlink:role attribute. This is intended to allow people and software to unambiguously identify specific services, irrespective of their human readable title. The idea is that that the xlink:role tells you what is going to happen when you go to xlink:href.
* An optional description.
A service is accessed by dereferencing its access URL, which is typically constructed by adding some type of suffix to  the dataset's referent (aka base) URL. The way in which the query string (aka constraint expression) is used is defined by each service, and there is no requirement for inter-service query string API conformity.
A more extensive discussion of the various services that might appear in a DatasetServices document can be found on the [[DAP4 Web Services v3]] page.
==== Example Response ====


<!--
<!--
Line 370: Line 346:
</font>
</font>
-->
-->
==== Example Response 2 ====
<font size="2">
<source lang="xml" >
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/opendap/xsl/serviceDescription.xsl"?>
<DatasetServices xmlns="http://xml.opendap.org/ns/DAP/4.0/dataset-services#"
    xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
   
    <Service title="DAP4 Dataset Services Response" role="http://services.opendap.org/dap4/dataset-services">
        <link description="Normative form of the DSR"
              type="application/vnd.opendap.org.dataset-services+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
        <link description="HTML representation of the DSR" 
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html">
        <link description="Normative DSR with generic Content-Type"
              type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xml">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Services_Description_Service">An index of the Services available for this data resource.</Description>
    </Service>


    <Service title="DAP4 Dataset Metadata Response"  role="http://services.opendap.org/dap4/dataset-metadata">
        <link description="Normative form of the DMR"
              type="application/vnd.org.opendap.dap4.dataset-metadata+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr">
        <link description="Data Request Form"
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.html">
        <link description="Normative DMR with generic Content-Type"
              type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.xml">
        <link description="RDF representation of DMR"
              type="application/rdf+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rdf">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Service_-_The_metadata">The DAP4 metadata content for this data resource..</Description>
    </Service>
    <Service title="DAP4 Data Response" role="http://services.opendap.org/dap4/data">
        <link type="application/vnd.org.opendap.dap4.data" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap" >
        <link type="text/plain" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.ascii" >
        <link type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.xml" >
        <link type="application/x-netcdf" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.nc" >
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Data_Service">DAP4 Data object for this data resource.</Description>
    </Service>
   
   
    <Service title="ISO-19115 Metadata Service" role="http://services.opendap.org/dap4/iso-19115">
        <link description="Dataset metadata as ISO-19115"
              type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.iso">
        <link description="ISO-19115 score"
              type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rubric">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_ISO_Conformance_Score_Service">ISO-19115 Metadata Representation of the DMR.</Description>
    </Service>
    <Service title="DAP2 Data" role="http://services.opendap.org/dap2/dods">
        <link type="application/octet-stream"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dods">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Data_Service">DAP2 Data Object.</Description>
    </Service>
    <Service title="DDX" role="http://services.opendap.org/dap2/ddx">
        <link type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ddx">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDX_Service">OPeNDAP Data Description and Attribute XML Document.</Description>
    </Service>
    <Service title="DDS" role="http://services.opendap.org/dap2/dds">
        <link type="text/plain"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dds">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDS_Service">OPeNDAP Data Description Structure.</Description>
    </Service>
    <Service title="DAS" role="http://services.opendap.org/dap2/das" >
        <link type="text/plain"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.das">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DAS_Service">OPeNDAP Dataset Attribute Structure.</Description>
    </Service>
    <Service title="INFO" role="http://services.opendap.org/dap2/info">
        <link type="text/html"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.info">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Info_Service">OPeNDAP Dataset Information Page.</Description>
    </Service>
    <Service title="Server Version" role="http://services.opendap.org/dap4/version">
        <link type="text/xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ver">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Server_Version_Service">An XML document containing information about the software version of the server..</Description>
    </Service>
    <Service title="File Access" role="http://services.opendap.org/dap4/file">
        <link type="text/xml ## This value depends on the file being accessed." 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.file">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Native_File_Access_Service">Access to dataset file.</Description>
    </Service>
    <ServerSideFunctions>
        <Function name="geogrid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#geogrid">
            <Description>Allows a DAP Grid variable to be sub-sampled using georeferenced values.</Description>
        </Function>
        <Function name="grid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#grid">
            <Description>Allows a DAP Grid variable to be sub-sampled using the values of the coordinate axes.</Description>
        </Function>
        <Function name="linear_scale"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#linear_scale">
            <Description>Applies a linear scale transform to the named variable.</Description>
        </Function>
        <Function name="version"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#version">
            <Description>Returns version information for each server side function.</Description>
        </Function>
    </ServerSideFunctions>
</DatasetServices>
</source>
</font>


== fini ==
== fini ==
Line 518: Line 363:




=== Question 1 ===
=== Using Atom 1.0 ===


Is it a reasonable thing to use MIME types as Ethan suggested (application/vnd.opendap.org.dap4.data etc.)  when describing services in the Dataset Services Response, and then, when the server provides those responses over HTTP it sets the content header to the [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]]?
The proposed encoding for this information is to use [http://en.wikipedia.org/wiki/Atom_(standard) Atom 1.0]. The advantages of this encoding are several and the detractions are close to nil. Atom 1.0 provides the DAP with a widely-used standard for representing information that is very general in nature (that data are accessible using a set of web services, each of which provides a sightly different kind of response and can be accessed using a different URL). Furthermore, we can use this same response in other responses a server might like to provide such as a ''data cast'' provides to subscribers or an OpenSearch result. Using Atom is important in those contexts because a response that it not specific to DAP is a requirement. At the same time, because the Atom specification does not impose needless or complex additional requirements, the cost of using it is low. In fact the only information in Atom 1.0 that is not listed above is a the name and email of an ''author'' for the ''entry''. While this might be rationalization, including that information could help a number of users who send email to support lists asking about dataset ''X'' simply because they don't know where/who else to ask.


For example in the Dataset Services response we might describe the Dataset Metadata service like this:
Using Atom, A DAP4 web service is described by:
* An 'entry' that serves to group a set of ''link'' elements that reference different services to a common set of information about the dataset. For the dataset, that information is:
** A simple human readable name called ''title''.
** An ''id'' that uniquely identifies the ''entry''.
** The last modified time for the dataset (''updated'').
** A person responsible for the dataset (''author'').
** An optional ''content'' element. (well, it's conditionally optional - see the [http://tools.ietf.org/html/rfc4287 Atom spec])
* For each service, a ''link'' element is used where the four attributes ''title'', '' rel'', ''type'', ''href'' are used as follows:
** ''title'' - A human-readable description of the service
** ''rel'' - See the [http://tools.ietf.org/html/rfc4287 Atom spec]
** ''type'' - A MIME-type that identifies the response as specific to OPeNDAP such as ''application/vnd.opendap.org.dap4.xdp+xml''
** ''href'' - The full URL used to get the response
 
For the Atom-based response, we propose to use MIME types as Ethan suggested (application/vnd.opendap.org.dap4.data etc.)  when describing services in the Dataset Services Response, and then, when the server provides those responses over HTTP it sets the content header to the [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]].
 
For example, in the Dataset Services response we might describe the Dataset Metadata service like this:
<font size="2">
<font size="2">
<source lang="xml" >
<source lang="xml" >
<Service title="Dataset">
...
    <link type="application/vnd.opendap.org.dap4.ddx+xml"  
    <link title="DAP4 Dataset Metadata XML Document."
           xlink:href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp"  
          rel="related"
          xlink:role="http://services.opendap.org/dap4/dataset#" />
          type="application/vnd.opendap.org.dap4.xdp+xml"  
</Service>
           href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp"/>
...
</source>
</source>
</font>
</font>


Yet, when a DAP4 server responds to a client asking for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp the server would set the HTTP headers so that the Content-Type would be the  [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]] (text/xml) and then we could put the more expressive type in Content-Description:
And when a DAP4 server responds to a client asking for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp the server would set the HTTP headers so that the Content-Type would be the  [[DAP4_Web_Services_v3#Media_Types | lowest common mime type]] (in this case ''text/xml'') . The server could put the more expressive type tag in the ''Content-Description'' header:
<font size="2">
<font size="2">
<source lang="txt" >
<source lang="txt" >
Line 540: Line 401:
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Content-Type: test/xml
Content-Type: test/xml
Content-Description: application/vnd.opendap.org.dap4.ddx+xml; url=http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp
Content-Description: application/vnd.opendap.org.dap4.xdp+xml; url=http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp
Content-Encoding: gzip
Content-Encoding: gzip
XDAP: 4.0
X-DAP: 4.0
</source>
</source>
</font>
</font>


What do people think about that? I think doing it this way allows us to communicate semantic information about service URL's in a way that works in our own documents and in things like Atom, while at the same time it allows the servers to produce responses that will be consumable by a broader range of clients. My fear here is that this will break (or maybe just irritate) sophisticated clients. Or maybe not... I don't know, that's why I am asking about this.
For normative information on Atom, see [http://tools.ietf.org/html/rfc5023 RFC 5023] and [http://tools.ietf.org/html/rfc4287 RFC 4287].
 
[[User:Ndp|ndp]] 13:22, 5 July 2012 (PDT)
 
==== Answers/Comments ====
 
= Atom - How might we express this response as an Atom 1.0 document. =
 
Here are two examples in which I attempted to take all of the semantics from the previous proprietary example and represent them in an Atom document.
 
Both of these documents validated using the [http://feed2.w3.org/ W3C Feed Validation Service].
 
All of the content components of each document are required with the exception of the atom:link/@title attribute, which is optional.
 
 
== Example: Validated Atom Document for a dataset, each service as an atom:entry ==


==== Example: Validated Atom Document with one atom:entry for a dataset, and an atom:link for each service ====


<font size="2">
<font size="2">
Line 568: Line 415:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<entry xmlns="http://www.w3.org/2005/Atom">
        <title>Example Feed</title>
        <subtitle>A subtitle.</subtitle>
        <link href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml" title="DatasetServices: ECMWF_ERA-40_subset.ncml" rel="self" />
        <id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
        <updated>2003-12-13T18:30:02Z</updated>
       
           


     <entry>
     <title>DatasetServices: ECMWF_ERA-40_subset.ncml</title>
        <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</id>
        <title>DAP Dataset Services Response.</title>
        <updated>2003-12-13T18:30:02Z</updated>
        <author>
            <name>Nathan Potter</name>
            <email>johndoe@devnull.com</email>
        </author>
       
        <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
            <div xmlns="http://www.w3.org/1999/xhtml">DAP4 Dataset Metadata Service for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
        </content>


        <link rel="self"
    <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</id>
              title="Dataset Services"
              type="application/atom+xml"
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml"/>
    </entry>


     <entry>
     <updated>2003-12-13T18:30:02-05:00</updated>
        <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp</id>
   
        <title>DAP4 Dataset Description and metadata Attributes XML Document.</title>
    <author>
        <updated>2003-12-13T18:30:02Z</updated>
        <name>Nathan Potter</name>
        <author>
        <email>johndoe@devnull.com</email>
            <name>Nathan Potter</name>
    </author>
            <email>johndoe@devnull.com</email>
    <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
        </author>
        <div xmlns="http://www.w3.org/1999/xhtml">DAP Dataset Services for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
       
    </content>
        <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
            <div xmlns="http://www.w3.org/1999/xhtml">DAP4 Dataset Metadata Service for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
        </content>


        <link rel="related"
    <link title="Dataset Services Description"
              title="Dataset Metadata"  
          rel="self"
              type="application/vnd.opendap.org.dap4.xdp+xml"  
          type="application/atom+xml"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdp"/>
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml"/>
     </entry>
      
 
     <link title="DAP4 Dataset Metadata XML Document."
     <entry>
          rel="related"
        <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap</id>
          type="application/vnd.opendap.org.dap4.dmr+xml"  
        <title>DAP4 Data object.</title>
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr"/>
        <updated>2003-12-13T18:30:02Z</updated>
        <author>
            <name>Nathan Potter</name>
            <email>johndoe@devnull.com</email>
        </author>
       
        <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
            <div xmlns="http://www.w3.org/1999/xhtml">DAP4 Data Service for http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
        </content>
       
        <link rel="enclosure"
              title="DAP4 Data"  
              type="application/vnd.opendap.org.dap4.data"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap"/>
    </entry>
 
    <entry>
      
      
        <id>http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html</id>
    <link title="DAP4 Data object."
        <title>OPeNDAP HTML Data Request Form for data sub-setting and access.</title>
          rel="enclosure"
        <updated>2003-12-13T18:30:02Z</updated>
          type="application/vnd.opendap.org.dap4.data"  
       
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap"/>
        <author>
            <name>Nathan Potter</name>
            <email>johndoe@devnull.com</email>
        </author>
       
        <content type="xhtml" xml:lang="en" xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
            <div xmlns="http://www.w3.org/1999/xhtml">HTML Data Request Form http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml</div>
        </content>
       


        <link rel="related"
    <link title="OPeNDAP HTML Data Request Form for data sub-setting and access."
              title="Data Request Form"  
          rel="related"
              type="text/xml"
          type="text/html"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html"/>
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html" />
             
    </entry>


        .
    <link title="DAP2 Data Object."
        .
          rel="enclosure"
        .
          type="application/vnd.opendap.org.dap2.data"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dods"/>
         
    <link title="DAP4 Data response in ASCII form."
          rel="enclosure"
          type="text/plain"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.asc"/>
         
    <link title="NetCDF-3 file-out response."
          rel="enclosure"
          type="application/x-netcdf"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.nc"/>
         
    <link title="XML Data Response"
          rel="enclosure"
          type="application/vnd.opendap.org.dap4.data+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xdap"/>
         
    <link title="DAP2 DDX document"
          rel="related"
          type="application/vnd.opendap.org.dap2.ddx+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ddx"/>
         
    <link title="DAP2 DDS document"
          rel="related"
          type="application/vnd.opendap.org.dap2.dds"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dds"/>
         
    <link title="DAP2 DAS document"
          rel="related"
          type="application/vnd.opendap.org.dap2.dds"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.das"/>
         
    <link title="RDF representation of the Dataset Metadata response."
          rel="related"
          type="application/rdf+xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.rdf"/>
         
    <link title="DAP2 Dataset Information Page"
          rel="related"
          type="text/html"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.info"/>
         
    <link title="Server Version Document"
          rel="related"
          type="text/xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ver"/>
         
    <link title="ISO 19115 Metadata Representation of the Dataset (DDX) response."
          rel="related"
          type="text/xml"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.iso"/>
         
    <link title="ISO 19115 Metadata Representation conformance score for this dataset."
          rel="related"
          type="text/html"
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.rubric"/>
         
    <link title="Dataset file access"
          rel="enclosure"
          type="text/xml" 
          href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.file"/>
         
</entry>
      
      
</feed>


</source>
</source>
</font>
</font>
-->
-->

Revision as of 19:57, 22 August 2012


<-- back to OPULS Development

Author: ndp

Background

DAP2, while successful within several arenas in the scientific community, failed to provide a complete description of the web interface that a server should support. This came about for two reasons: DAP2 was developed at a time when 'web services' was an idea in considerable flux and, secondly, the DAP2 specification was written to focus on a data model (mostly) that supported interoperability. The current DAP4 draft specification document, like the DAP2 specification, does not address how a web-based interface to DAP4 should be built. However, we are going to provide a specification that will describe how such an interface for DAP4 should be built and this document contains information that should be part of that specification.

Problem addressed

Currently DAP servers provide a number of dataset level responses (services). These include DAP services such as the DDS, DAS, and DDX, plus other services that have been added over time such as the RDF and ISO responses. There is currently no way for a user (or software agent) to discover which of these many services might be available for a particular dataset. While THREDDS catalogs do provide a mechanism for determining which services are associated with which datasets, they don't actually provide a mechanism for discovering the details of the various service URLs. A THREDDS catalog might identify a DAP service, but the URL that can be assembled from the THREDDS catalog for that service is limited to just the base dataset URL. Typically dereferencing this URL will provide one of two things - either the underlying data file (for example a netcdf file) or an HTTP 403 error if direct access to the underlying files has been disabled in the server configuration.

Example:

This URL points to a dataset on a DAP server:

http://test.opendap.org:8080/opendap/data/nc/fnoc1.nc

Dereferencing the link will not connect you to a DAP service or DAP response. It will (likely) return the underlying netcdf file. The only way to know that DAP services exist for this is by reading the URL path and recognizing that it is probably an instance of a DAP server based on the position of the 'opendap' string in the URL. In fact, there is no guarantee that dereferencing this URL will even yield the underlying file, as that behavior is a configuration option for the server. If that access is not allowed in the configuration, then dereferencing the URL will simply return an HTTP 403 (forbidden) error.

Proposed solution

We intend to provide a 'Services' or 'Capabilities' response for DAP4. Dereferencing an unadorned DAP4 dataset resource URL will return a document describing the DAP services available for the dataset. This will be a required response and the only valid response for an 'unadorned' dataset resource URL. We will refer to this response as the 'Dataset Services Response' or 'DSR' in the 'DAP4 Web Services' specification and the remainder of this document.

At minimum this document MUST provide, for each service available for the dataset:

  • A human readable title of that service (e.g., The DDX service for the dataset)
  • One or more links that can be dereferenced to get the various representations of the response for the dataset.
  • An unambiguous, unique to the service type, resource role ID that serves as a way to clearly identify what each service does.
  • A brief description of the service

The response should also include:

  • A link to a complete, human readable, description of the service.
  • A reference to an XSLT that a browser would use to render the description into HTML for a presentation view.
  • Descriptions and syntax of server side functions available for the dataset

Note: If a client understands how to modify/augment the dataset resource URL ( as described in the DAP4 Web Services Specification ) such that it becomes a DAP response URL then it need never obtain the Dataset Services response.

Proposed encoding for the services response

c.f. DAP4 Web Services

A DAP4 web service is described by:

  • Attribute title whose value is a simple human readable string called
  • An attribute called role whose value is a unique to the service type, resource role ID (a URI) that serves as a way to clearly identify what each service does. This is intended to allow people and software to unambiguously identify specific services, irrespective of their human readable title. The idea is that that the role attribute tells you what is going to happen when you dereference the URL held in the link element.
  • One or more link elements containing:
    • An attribute called href whose value is a URL that when dereferenced will return the service response in the media type described by the value of the type attribute.
    • An attribute called type whose value is the media-type for the representation returned by that URL held in the href attribute.
    • An optional attribute called description whose value is a human readable string that provides a brief description of the link elements semantics.
  • An optional Description element that contains (if present):
    • An optional attribute called 'href that contains a URL that points to a human readable document describing the service.
    • The text content of the element MUST be a human readable description of the service.

A service is accessed by dereferencing one of the access URLs held in the href attribute of a link elements, which is typically constructed by adding some type of suffix to the dataset's referent (aka base) URL. The way in which the query string (aka constraint expression) is used is defined by each service, and there is no requirement for inter-service query string API conformity.

A more extensive discussion of the various services that might appear in a DatasetServices document can be found on the DAP4 Web Services v3 page.

Example Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/opendap/xsl/serviceDescription.xsl"?>
<DatasetServices xmlns="http://xml.opendap.org/ns/DAP/4.0/dataset-services#"
    xml:base="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
    
    <Service title="DAP4 Dataset Services Response" role="http://services.opendap.org/dap4/dataset-services">
        <link description="Normative form of the DSR" 
              type="application/vnd.opendap.org.dataset-services+xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml">
        <link description="HTML representation of the DSR"  
              type="text/html" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.html">
        <link description="Normative DSR with generic Content-Type" 
              type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.xml">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Services_Description_Service">An index of the Services available for this data resource.</Description>
    </Service>


    <Service title="DAP4 Dataset Metadata Response"  role="http://services.opendap.org/dap4/dataset-metadata">
        <link description="Normative form of the DMR" 
              type="application/vnd.org.opendap.dap4.dataset-metadata+xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr">
        <link description="Data Request Form" 
              type="text/html" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.html">
        <link description="Normative DMR with generic Content-Type" 
              type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.xml">
        <link description="RDF representation of DMR" 
              type="application/rdf+xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rdf">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Dataset_Service_-_The_metadata">The DAP4 metadata content for this data resource..</Description>
    </Service>


    <Service title="DAP4 Data Response" role="http://services.opendap.org/dap4/data">
        <link type="application/vnd.org.opendap.dap4.data"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap" >
        <link type="text/plain"  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.ascii" >
        <link type="text/xml"   
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.xml" >
        <link type="application/x-netcdf"   
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dap.nc" >
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Data_Service">DAP4 Data object for this data resource.</Description>
    </Service>
    
    
    <Service title="ISO-19115 Metadata Service" role="http://services.opendap.org/dap4/iso-19115">
        <link description="Dataset metadata as ISO-19115" 
              type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.iso">
        <link description="ISO-19115 score" 
              type="text/html" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dmr.rubric">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_ISO_Conformance_Score_Service">ISO-19115 Metadata Representation of the DMR.</Description>
    </Service>



    <Service title="DAP2 Data" role="http://services.opendap.org/dap2/dods">
        <link type="application/octet-stream" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dods">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Data_Service">DAP2 Data Object.</Description>
    </Service>

    <Service title="DDX" role="http://services.opendap.org/dap2/ddx">
        <link type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ddx">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDX_Service">OPeNDAP Data Description and Attribute XML Document.</Description>
    </Service>

    <Service title="DDS" role="http://services.opendap.org/dap2/dds">
        <link type="text/plain" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.dds">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DDS_Service">OPeNDAP Data Description Structure.</Description>
    </Service>

    <Service title="DAS" role="http://services.opendap.org/dap2/das" >
        <link type="text/plain" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.das">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_DAS_Service">OPeNDAP Dataset Attribute Structure.</Description>
    </Service>


    <Service title="INFO" role="http://services.opendap.org/dap2/info">
        <link type="text/html" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.info">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP2:_Info_Service">OPeNDAP Dataset Information Page.</Description>
    </Service>

    <Service title="Server Version" role="http://services.opendap.org/dap4/version">
        <link type="text/xml" 
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.ver">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Server_Version_Service">An XML document containing information about the software version of the server..</Description>
    </Service>


    <Service title="File Access" role="http://services.opendap.org/dap4/file">
        <link type="text/xml ## This value depends on the file being accessed."  
              href="http://test.opendap.org:8090/opendap/hyrax/ECMWF_ERA-40_subset.ncml.file">
        <Description href="http://docs.opendap.org/index.php/DAP4_Web_Services#DAP4:_Native_File_Access_Service">Access to dataset file.</Description>
    </Service>

    <ServerSideFunctions>
        <Function name="geogrid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#geogrid">
            <Description>Allows a DAP Grid variable to be sub-sampled using georeferenced values.</Description>
        </Function>
        <Function name="grid"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#grid">
            <Description>Allows a DAP Grid variable to be sub-sampled using the values of the coordinate axes.</Description>
        </Function>
        <Function name="linear_scale"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#linear_scale">
            <Description>Applies a linear scale transform to the named variable.</Description>
        </Function>
        <Function name="version"
                  href="http://docs.opendap.org/index.php/Server_Side_Processing_Functions#version">
            <Description>Returns version information for each server side function.</Description>
        </Function>
    </ServerSideFunctions>
</DatasetServices>


Rationale for the solution

The solution provides DAP4 servers with an interface that allows for both server-driven and agent driven content negotiation as described in [section 12 of the HTTP 1.1 specification]. Providing the Dataset Services Response in XML allows many downstream applications to ingest the content and leaves open the option for server implementers to add XSLT references to the document so that clients like browsers can easily build a presentation view of the information. Using the Atom 1.0 appears to involve no additional overhead and will enable other uses for the response.

Discussion

It is possible to embed in the above a reference to a XSLT that will transform the above XML into HTML similar to the following (with the caveat that this image is actually of a similar, but not identical, XML response):

ServiceDescriptionPrototype-01.png



fini