Prev Up Next Index
Go backward to 1.1 The DAS and DDS Objects
Go up to 1.1 The DAS and DDS Objects
Go forward to 1.1.2 The DDS Object

1.1.1 The DAS Object

The DAS contains attribute information that is generally not used by software when processing the variables; this object is specifically designed to hold all the information in a data set that has no where else to go. Each variable can have an unlimited number of attributes. There are also `global' attributes that apply to the dataset as a whole. Each attribute is a set of three elements: the attribute name, type and value. The supported types for an attribute are: Byte, Int32, Float64, String and URL, and vectors of these types. These types have the same range of values as the corresponding types in the data access protocol.

A variable's attributes can be any qualities that are not part of the DDS. Thus, the type and shape of a variable are not attributes; they are characteristics of the variable and are part of the DDS (see Section 1.1.2). However, users may store any other information as attributes3, including paragraphs of text, vectors of integers and floating point values, and so on. There are some standard attributes required by the DODS standard. The system could work without these attributes, but they are required anyway to make other aspects of the systems work better.

Many APIs support the concept of information in the data set that is not structured, and provide function calls to access that information. The DAS object provides a place for all that information. The data server can interrogate the data set and build the DAS and the client-library can use the DAS object to satisfy many of the API calls requesting information about the variables in a data set.

Figure 1.1.1 is a diagram of the DAS object. The DAS consists of the following components:  

 

A DAS Object

The DAS printer (DAS::print()) is used to create a textual representation of the C++object. The object is transmitted from server to client using this representation. The scanner and parser (DAS::parse()) reads the printed representation and creates a C++object to match this specification. This object method can be used to read the text version from a disk or from a network connection, depending on the input stream identified for it.  

The third part of the DAS, the attribute table list, points to a series of attribute tables. An attribute table is a list of name-type-value triples used to describe a data variable. Each attribute describes some aspect of the data variable. The example list in figure 1.1.1 shows what a table might look like for one of the data variables in figure 1.1.1. (The types have been left out of the diagrams for clarity.)

 

An Attribute Table

The DAS object contains member functions to add or retrieve AttrTable objects as well as individual attributes based on a variable name. In addition, the AttrTable object may be traversed using a Pix4.  

The value of an attribute can itself be another attribute table. So, for example, an aggregate variable that contains other variables, such as a Structure, might have an attribute table for each of its member variables. In figure 1.1.1, you can see illustrated the attributes of an aggregate data variable. The first three attributes apply to the collection of data (it was taken with a CTD instrument, from the good ship R/V Endeavour, and so on), while the next three attributes reveal attributes of the constituent data variables. Each of the values of these attributes is itself an attribute table, containing attribute data about that data type.

 

A Nested Attribute Table

DODS attribute tables are modelled with the AttrTable class. Each AttrTable object contains a doubly-linked list of attribute triples, of a structure named entry. Each entry object contains a Name, Type and vector of values. AttrTable provides methods for reading, writing, and modifying the attribute table.

The DODS definition of dataset attributes contains a "Global" attribute. This has nothing to do with the data structure of the DAS object, but with its use in DODS. Global attributes apply to all the variables in the dataset. They can also be thought of as being attributes of the dataset itself.


Tom Sgouros, July 2, 2004

Prev Up Next