next up previous contents
Next: Reading the Values of Up: Client Library Functions Previous: Rewriting the Open and   Contents

Getting Information about Variables

Most APIs for self-describing data sets include functions which return information about the variables that comprise a data set. These functions return information about the type and shape of variables in a form that can be used by a program as well as ancillary information about the variables that is more often than not intended for use by humans. Each of these functions must be rewritten so that to the extent possible, information present in the DAS and DDS is used to satisfy them.

Figure [*] shows a simple structure chart for this type of operation. While many `self-describing' APIs may have 20-30 or more of these functions, the basic structure of the re-implemented code is the same for each one. If the data set is local, use the original implementation, otherwise use the locally storedq state information (DAS and DDS) to answer the function.

However, rewriting these functions can be the most labor intensive part of re-implementing a given API. This is typically the largest group of functions in the API and the information stored in the DAS and DDS must often be `massaged' before it fulfills the specifications of the API. Thus the rewritten functions must not only get the necessary information from the DAS and DDS objects, but they must also transform the types of the objects used to return that information to the user program into the data types the program expects.

The DODS Client and Server Toolkit contains C++ classes which both define the DAS and DDS objects and provide member functions which simplify this process.

Figure: Simple Structure Chart for the Metadata Access Functions in a DODS Client Library
\begin{figure}\centerline{\psfig{figure=client-metaread.ps}}\end{figure}


next up previous contents
Next: Reading the Values of Up: Client Library Functions Previous: Rewriting the Open and   Contents
James Gallagher 2004-04-21