A model is an instance of the interface
A model contains model elements.
Several methods are provided to retrieve these elements, and optionally to filter them, and to create new instances.
|Most commonly used APIs|
||Returns a list of all model elements attached to the model.|
||Returns a list of all model elements of the specified type attached to the model.
||Creates a new instance of a model element based on the specified type.|
// Gets all Actors defined in this model myActors = myModel.getInstances("Actor"); // Gets all Classifiers (Actors, UseCases, Classes, etc.) defined in this model myClassifiers = myModel.getInstances("Classifier", true); // Creates a new Actor instance and register it to the model myNewActor = myModel.create("Actor");