Modelio MDA API

The Modelio API is the API that Modelio is providing to the developers of modules.

Modelio API is structured into several services specific to a particular aspect of Module development. In practical terms, these services are not strictly independent. For example, you will need to use model services to access to some model elements required by model components services.

The Modelio API is currently delivered as a unique jar file (modelio.jar) that you must use in your development projects.

The Modelio API services are:

Accessing the Modelio API services

The unique access point to these services is provided by the Modelio singleton which acts as a ‘handle’ to the whole Modelio application. For each service, Modelio can provide an object that provides the concrete service API as a bunch of specific methods.

In the following code fragment, Modelio is used to apply an audit check to the root package of the model.

 1    // get the model services: the modeling session
 2    IModelingSession session = Modelio.getInstance().getModelingSession();
 4    // get the model root package
 5    IPackage root = session.getModel().getRoot();
 7    // get the audit service Modelio
 8    IAuditService audit = Modelio.getInstance().getAuditService();
10    // and now ask for an audit on the root package
11    audit.check(root);