The Data Model (Introduction)

4. Attributes
Finally, Attributes are another type of metadata. These values can be appended to Components, Fields, or Groups. Some Attributes are required for the proper functioning of these objects. For example, we discussed "connections" and the different types that are defined in DX. A "connections" component must have an Attribute called "element type" that declares the type of connection to be used ("lines", "quads", etc.). There are several of these mandatory Attributes in DX; sometimes you must declare them when you format your data, and sometimes they magically appear, appended to objects by DX as it modifies objects during the execution of a program (for example, RubberSheet adds a 'RubberSheet scale' attribute).

In addition, the user can specify arbitrary new Attributes and append them to his or her object declarations. So, you may wish to record some metadata of your own, like "Time of Experiment," "Researcher Name," etc., and attach this to the Field object. It's easy to do and DX provides modules that allow you to fetch these user-specified Attributes back for use in Captions, for example. Or, these Attributes may simply stay "inside" the data file in case anyone ever needs to verify the source of a particular data set. DX will pass them along without removing or modifying them or complaining about "unknown Attribute". (But you will get an error if you leave out a required Attribute.)

Here's a schematic that shows the overall relationship of the various DX Objects we've just discussed.

 

DX Object Diagram

Note that Groups, Fields, and Components can each have Attributes. The Attributes apply to the object to which they are attached. Fields are made up of some number of Components. Groups can contain either Fields or other Groups (or both). Groups do not directly contain Components.