Sequenced Collections

Meta Data Services Programming

Meta Data Services Programming

Sequenced Collections

Some information models require the tool or application be able to set the sequence of items in a collection. This requirement occurs when the sequence itself is significant in some way.

A collection that supports the sequencing of its items is referred to as a sequenced collection. Relationships contained within such a collection are sequenced relationships. The Repository Type Information Model (RTIM) supports the definition of collection types for sequenced collections.

For example, consider a report generator tool that displays tables of data where the data is displayed in rows and columns. Each table is represented by an object that conforms to the Table class. The columns of the table are represented by objects that conform to the Column class. Each table has a collection of columns that are included in it (the relationship that relates a Table object to a Column object is the includes relationship). The following figure illustrates this example.

To determine the order in which the columns will appear when the table is displayed or printed, the report generator tool relies on the sequence of the column items. For the Student table, the report is displayed with the Student ID column leftmost, the Last Name column next, and the First Name column on the right-hand side.

To define a sequenced collection, set the COLLECTION_SEQUENCED flag on a collection definition object.

See Also

CollectionDefFlags Enumeration

Defining Relationships and Collections

Understanding Collections

Understanding Relationship Roles