DAP4 Extension: CSV Data Encoding and Response: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[OPULS_Development| << Back to OPULS Development]]
[[OPULS_Development| << Back to OPULS Development]]


This document specifies the DAP4 CSV data encoding and its use with the DAP4 protocol.
This document specifies the DAP4 CSV data encoding, how DAP4 servers can advertise support for the DAP4 CSV encoding, and how DAP4 clients can request DAP4 CSV encoded data responses.


The DAP4 CSV data encoding represents DAP4 data
The DAP4 CSV data encoding represents DAP4 data as structured Comma-Separated Values (CSV) in UTF-8 text. Though based on the ''text/csv'' media type described in <nowiki>RFC 4180</nowiki><sup><nowiki>[</nowiki>[[#RFC_4180|RFC 4180]]<nowiki>]</nowiki></sup>, the DAP4 CSV is more complex so that it can fully represent the more complex data structures of the DAP4 data model. Some structure beyond simple CSV is necessary to capture the DAP4 data structures.


requests can constrain the data to be returned using a standard DAP4 Constraint Expression [DAP4 CE]
As with requests for data in the DAP4 binary data encoding described in Volume 1 of the DAP4 specification <sup><nowiki>[</nowiki>[[#DAP4_Vol1|DAP4 Vol1]]<nowiki>]</nowiki></sup>, requests for DAP4 CSV encoded data can be constrained to a subset by using a standard DAP4 Constraint Expression [DAP4 CE]
 
This DAP4 Extension describes the DAP4 CSV data encoding, the details needed so that a DAP4 server can advertise their support for the DAP4 CSV encoding, and how DAP4 clients can request DAP4 CSV encoded data responses. Though based on the ''text/csv'' media type described in <nowiki>RFC 4180</nowiki><sup><nowiki>[</nowiki>[[#RFC_4180|RFC 4180]]<nowiki>]</nowiki></sup>, the DAP4 CSV is more complex so that it can represent the more complex data structures of the DAP4 data model.


== DAP4 Extension Details ==
== DAP4 Extension Details ==


Servers list supported DAP4 extensions in Dataset Service Response [DSR] ''extension'' elements. An ''extension'' element contains a name, role URI, and description.
The Role URI for the DAP4 CSV Data Encoding and Response extension is


The Role URI for the DAP4 CSV Data Encoding is
'''<nowiki>http://services.opendap.org/dap4/extension/text-csv-data</nowiki>'''


'''<nowiki>http://services.opendap.org/dap4/extension/text-csv-data</nowiki>'''
DAP4 servers MUST include this role URI in a Dataset Service Response [DSR] ''extension'' element to indicate that the DAP4 CSV Data Encoding and Response extension is supported for the dataset (?represented by that DSR?). DAP4 clients MAY check for DSR '''extension''' elements with this role URI to determine if the DAP4 CSV Data Encoding and Response extension is supported.


To advertise that a particular dataset supports the DAP4 CSV Data Encoding and Response encoding (i.e., data can be requested for that subset in the DAP4 CSV data encoding) support for the DAP4 CSV Data Encoding extension , a DAP4 server MUST include an ''extension'' element in a DSR
Dataset Service Response [DSR] ''extension'' elements must also contain a name and a description. The following are recommended text for the name and description:


A DAP4 server wishing to advertise support for the DAP4 CSV Data Encoding MUST list the following Role URI


Name: DAP4 CSV Data Encoding
;Name
: DAP4 CSV Data Encoding and Response


Role URI:
;Description
: This extension provides an encoding for representing DAP4 data as structured Comma-Separated Values (CSV) in UTF-8 text.


== Requesting DAP4 CSV Encoded Data Response ==


Description:
== Requesting DAP4 CSV Encoded Data Response ==
<blockquote>
<blockquote>
{| class="wikitable" style="font-size: 95%;" width="90%"
{| class="wikitable" style="font-size: 95%;" width="90%"

Latest revision as of 16:23, 22 April 2014

<< Back to OPULS Development

This document specifies the DAP4 CSV data encoding, how DAP4 servers can advertise support for the DAP4 CSV encoding, and how DAP4 clients can request DAP4 CSV encoded data responses.

The DAP4 CSV data encoding represents DAP4 data as structured Comma-Separated Values (CSV) in UTF-8 text. Though based on the text/csv media type described in RFC 4180[RFC 4180], the DAP4 CSV is more complex so that it can fully represent the more complex data structures of the DAP4 data model. Some structure beyond simple CSV is necessary to capture the DAP4 data structures.

As with requests for data in the DAP4 binary data encoding described in Volume 1 of the DAP4 specification [DAP4 Vol1], requests for DAP4 CSV encoded data can be constrained to a subset by using a standard DAP4 Constraint Expression [DAP4 CE]

DAP4 Extension Details

The Role URI for the DAP4 CSV Data Encoding and Response extension is

http://services.opendap.org/dap4/extension/text-csv-data

DAP4 servers MUST include this role URI in a Dataset Service Response [DSR] extension element to indicate that the DAP4 CSV Data Encoding and Response extension is supported for the dataset (?represented by that DSR?). DAP4 clients MAY check for DSR extension elements with this role URI to determine if the DAP4 CSV Data Encoding and Response extension is supported.

Dataset Service Response [DSR] extension elements must also contain a name and a description. The following are recommended text for the name and description:


Name
DAP4 CSV Data Encoding and Response
Description
This extension provides an encoding for representing DAP4 data as structured Comma-Separated Values (CSV) in UTF-8 text.

Requesting DAP4 CSV Encoded Data Response

URL Suffix Media Type URL Example
".dap" or ".dap.csv"
application/vnd.opendap.dap4.data+csv
DAP4 CSV encoding
http://server/path/dataset.nc.dap

http://server/path/dataset.nc.dap.csv

".dap.csv"
text/csv
DAP4 CSV (UTF-8) Data encoding with generic media type
http://server/path/dataset.nc.dap.csv

DAP4 CSV Encoding

Normative References

[RFC 4180] Common Format and MIME Type for Comma-Separated Values (CSV) Files

[DAP4 Vol1] DAP4 Volume 1: Data Model, Persistent Representations, and Constraints.

[DAP4 Extensions] [DAP4:_Specification_Volume_1#Extensions|DAP4 Volume 1, Section 9.3 Extensions]