Access to Model Data

The API allows API clients to manipulate models. An API client locates models in persistence storage by using the Model Directory Collection, Model Directory, and the Model Directory Unit components. By using its properties, the Model Directory Unit provides the information necessary to register the unit with the pool of available persistence units by using the Persistence Units collection. The API client can then specify access attributes such as read-only or ignore locks. A new model can be created and registered with a persistence unit collection. erwin DM can add or remove models from the pool as a response to user interface actions.

A persistence unit maintains a set of properties to control visibility in the application user interface, access attributes, and so on. A persistence unit organizes data as a group of linked model sets. The model sets are arranged in a tree-like hierarchy with a single model set at the top. The top model set in the persistence unit contains the bulk of the modeling data. The API uses the abbreviation EMX to identify the top model set. The EMX model set owns a secondary model set abbreviated as EM2, that contains user options and user interface settings.

API clients access the model data by constructing a session and connecting it to a model set using the Session component. A model set contains several levels of data. It contains the data the application manipulates, such as entity instances, attribute instances, or relationship instances.

The model set also contains metadata, which is a description of the objects and properties that may occur within the application's data. In erwin DM, metadata includes object and property classes, object aggregations, and property associations. The metadata defines each object class that may occur within a model, for example, an entity class, an attribute class, or a relationship class. Object aggregations identify an ownership relationship between classes of objects. For example, a model owns entities, entities own attributes, and so on. The property associations define property usage by object classes. For instance, the metadata includes property associations for every object class that has the Name property.

Clients specify the necessary level of model data at the same time as connecting a session to a model set. When a new model is created it acquires a set of default objects, such as model object, main subject area, and stored display. The initial API implementation supports the following levels:

Name

Description

Supported Actions

SCD_SL_ M0

Model Level

Access model data, create and delete objects (including the entire model), and set property values.

SCD_SL_ M1

Metamodel Level

Access object and property definitions, along with other metadata. Create and delete user-defined properties and user-defined object definitions.

Levels are identified by long integer values. Values have symbolic definitions.