TOP

Library net/mdatools/modelant/core/antlib.xml

Tasks, types and macros of ModelAnt CORE
Usage:

<typedef resource="net/mdatools/modelant/core/antlib.xml"/>

Imports:

<typedef resource="net/mdatools/modelant/util/antlib.xml"/>
<typedef resource="net/mdatools/modelant/repository/antlib.xml"/>
Tasks and Macros Description
compare.models Identify structural differences between two models loaded in separate extents in the current repository. They are treated as different versions of a common model, so one of them is referred as old, whereas the other is referred as new.

A model elements from the "new" model is treated as equal to a model element from the "old" model, if:

  • both they have equal (primitive) values of the attributes, listed for their class in the nested <map> element
  • AND they refer equal objects through associations, listed for their class in the nested <map> element
Model elements, for which there are have no criteria (attributes or associations) specified for their class in the nested <map> element, are treated as NOT EQUAL.
copy.to.metamodel Copy a model, represented in one metamodel, as the same model in another metamodel, according to explicitly provided rules for metamodel mapping rules. For example, if appropriate metamodel mapping rules are provided, it will copy a model from UML 1.3 to UML 1.4.
print Print the model element it is invoked for.
print.restricted Print the model element it is invoked for, considering only the attributes and associations described in the nested criteria. These should be only "meaningful" parts of a model element, that allow identifying it.
ref.assoc.add Associate the model element it is called for, to another model element in an association to many.
ref.assoc.clear Dissociate the model element it is called for from all model elements, in an association to many.
ref.assoc.remove Dissociate the model element it is called for from a specific other model element, in an association to many.
ref.assoc.set This task assigns an attribute's value or associates a object in a *-to-ONE association (or set an attribute).
ref.create Instantiate a model element of a metamodel.
ref.create.same Instantiate a the model class, which is the class of a specific model element.
ref.create.struct Instantiate a model Structure.
ref.destroy Destroy the model element it is called for. It must be a REF Object or REF Package.
ref.get Retrieve an object by its MOF ID or as an associated object or an attribute's value.
ref.get.enum Retrieve an enumerated literal of a (meta)type provided
ref.set This task assigns an attribute's value or associates a object in a *-to-ONE association (or set an attribute).
ref.verify Verify the model element it is called for against the validation rules form the metamodel. Any violations are reported in the task log.
wrap Use a registered wrapper factory and build a wrapper around the model element or a collection of such. The wrapper class augments the modeled element with custom methods, that could be used through "method" task.
wrap.factory.register Register a factory of model element wrappers, adding more features to the model. See the "wrap" task. The factory is loaded through the classpath[ref] provided, whereas the root class/interface is searched through the system class loader.
wrap.factory.unregister Unregister a factory of model element wrappers. See the "wrap" task.
wrap.method Wrap a model element and invoke the specified method on the wrapper. Store the method's result in a specified property.

Conditions Description
isinstanceof Check if a model element is of a meta-model class.
wrap.condition Wrap the model element this is invoked for and invoke the specified boolean method on the wrapper, integrating it with the regular ANT conditions.

Documentation generated by ant.doc Ant macro from ModelAnt by MDA Tools