Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 2.57 KB

04_extension-csv.adoc

File metadata and controls

89 lines (66 loc) · 2.57 KB

Extensions: CSV Data Encoding and Response

Copyright 2016 UCAR and OPeNDAP,Inc.

Abstract

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 [1], 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, requests for DAP4 CSV encoded data can be constrained to a subset by using a standard DAP4 Constraint Expression [DAP4 CE].

1. 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.

2. 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

.dap.csv

text/csv

DAP4 CSV (UTF-8) Data encoding with generic media type

3. DAP4 CSV Encoding