AIS Using NcML: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
This and the [[Aggregation Using NcML]] page go hand-in-hand. The essential idea is to use NcML as a syntax to describe both aggregations of data sets (e.g., HDF4 files) and ancillary information that should be added to a data set. The motivation for using NcML is to not invent a new syntax and instead build on an accepted one, maybe adding new features where we need them. | This and the [[Aggregation Using NcML]] page go hand-in-hand. The essential idea is to use NcML as a syntax to describe both aggregations of data sets (e.g., HDF4 files) and ancillary information that should be added to a data set. The motivation for using NcML is to not invent a new syntax and instead build on an accepted one, maybe adding new features where we need them. | ||
== Straw | == Straw man Design == | ||
We will build a new handler, similar to the HTML Form interface or ASCII Data handlers that uses DDS/DAS/DDX and/or DataDDS/DataDDX objects from other handlers along with information in NcML files, to return a new response. This handler will combine information in a NcML file with information in another DAP object to return a new, modified, DAP object. | We will build a new handler, similar to the HTML Form interface or ASCII Data handlers that uses DDS/DAS/DDX and/or DataDDS/DataDDX objects from other handlers along with information in NcML files, to return a new response. This handler will combine information in a NcML file with information in another DAP object to return a new, modified, DAP object. | ||
Line 25: | Line 25: | ||
# It will then apply the changes in the ''new_data.ncml'' file | # It will then apply the changes in the ''new_data.ncml'' file | ||
## first parse the ''variable'' element and find the named variable in the DAS initially returned by the BES | ## first parse the ''variable'' element and find the named variable in the DAS initially returned by the BES | ||
## See that the | ## See that the attribute color is to be added (or overwritten, using NcML's rules for applying this stuff) | ||
# Return the resulting DAS | # Return the resulting DAS | ||
Revision as of 23:35, 27 January 2009
Introduction
This and the Aggregation Using NcML page go hand-in-hand. The essential idea is to use NcML as a syntax to describe both aggregations of data sets (e.g., HDF4 files) and ancillary information that should be added to a data set. The motivation for using NcML is to not invent a new syntax and instead build on an accepted one, maybe adding new features where we need them.
Straw man Design
We will build a new handler, similar to the HTML Form interface or ASCII Data handlers that uses DDS/DAS/DDX and/or DataDDS/DataDDX objects from other handlers along with information in NcML files, to return a new response. This handler will combine information in a NcML file with information in another DAP object to return a new, modified, DAP object.
Simple example: Suppose you wanted to add the string attribute "color" with value "red" to a variable "temperature" in some data set. In NcML, this would look like:
<netcdf xmlns:nc="..." location="file:/.../data.nc"> <variable name="red"> <attribute name="color" type="string" value="red"/> </variable> </netcdf>
And lets say this is stored in new_data.ncml
When the BES is asked to return the DAS for /.../new_data.ncml:
- The NcML handler would open this file, parse it and see that the it contains new information for the data file file:/.../data.nc.
- It will use the BES to get the DAS for file:/.../data.nc
- It will then apply the changes in the new_data.ncml file
- first parse the variable element and find the named variable in the DAS initially returned by the BES
- See that the attribute color is to be added (or overwritten, using NcML's rules for applying this stuff)
- Return the resulting DAS
This means that the the NcML file effectively defines a new data set. The data.nc data set is still available as before.
We will scrap the existing AIS code in libdap - it's just too far from anything we want.
Use Cases
Definitions
- Data set
- Anything that can be referenced by a DAP URL and will return the DAP responses when requested.
- NcML
- Syntax for ancillary data (attributes and variables) and aggregations used by the TDS