TOP

Library uml13/meta.xml

Holds the metamodel, specific tasks and types of UML 1.3

Provides macros that allow creating simple UML 1.3. models through simple Ant scripts.
  Usage:

   ... instantiate an extent ...
   <uml13.root.package name="..." extent="....">
     <uml13.package name="...">
        <uml13.tag>
        <uml13.class name="...">
          <uml13.tag>
          <uml13.field name="...">
            <uml13.tag>
   </uml13.root.package>

   <mdr.write.xmi extent="..." file="..."/>
  
Usage:

<typedef resource="uml13/meta.xml"/>

Imports:

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

Tasks and Macros Description
uml13.class Create a class with the name provided within the outer package as an owner. Used within <package>.
uml13.comment Create an attribute with the name provided, within the outer class as an owner. Used within <class>
uml13.compare.models Identify the differences between two models and execute change-corresponding tasks. The models are referred as
  • old model is considered as the previous version of the model
  • new model is considered as the new/later version of the model
This macro provides UML 1.3 specific comparison euristics for identification of the model elements and discovering the changed among them. It instantiates the repository, loads the files, finds the differences, delegates them to the change-corresponing tasks and destroys the repository. This way, it is the common base for any comparison of UML 1.3 models, while still allowing the customization:
  • Before the comparison starts, the init tasks are called.
  • For each changed element, the changed tasks are executed, where it can refer:
    • <new>.element property holds the element form the new model;
    • <old>.element property holds the element form the old model;
    • attribute.names property the list of names of element's attributes detected as changed;
    • association.names property the list of names of element's associations detected as changed.
      The current value of the association in the first model can be retrieved using task;
    • for each association name from association.names property two additional properties are defined:
      • <association name>.added contains all elements from the new model that were added, when upgrading from old to the new model, i.e. they have no correspondents as associated in the old model
      • <association name>.deleted contains all elements from the new model that were deleted, when upgrading from old to the new model, i.e. they have no correspondents as associated in the new model
  • For each added to the model element the added tasks are executed.
  • For each deleted from the model element the deleted tasks are executed.
  • At the end the done tasks are executed.
Based on <compare.models> task, using a nested <detect.changes> element. Consider their details in deleted and added elements.
uml13.copy.uml14 Copy a UML 1.3 model as a UML 1.4 model
uml13.data.type Create a class with the name provided within the outer package as an owner. Used within <package>
uml13.destroy Destroy a model or metamodel extent
uml13.diff.models Print the differences between two models referred as
  • old model is considered as the previous version of the model
  • new model is considered as the new/later version of the model
This macro instantiates the repository, loads the files (as of uml13.compare.models), finds and prints the differences and destroys the repository. This way, it simplifies the models comparison, just to the usage:
      <project>
        <typedef resource="uml13/meta.xml"/>

        <uml13.compare.models old="old file" new="new file"/>
      </project>
    
Based on <compare.models> task, using a nested detect.changes element.
uml13.field Create an attribute with the name provided, within the outer class as an owner. Used within <class>
uml13.instantiate Read the UML 1.3 model into an extent with the name provided, using the metamodel extent.
Pre-condition:
<uml13.load.metamodel metamodel.extent="@{metamodel.extent}"/>
uml13.load.metamodel Load the UML 1.3 metamodel in an extent with the name provided.
Pre-condition:
ModelAnt is initialized - see <mdr/> task
uml13.package Create a package with the name provided within the outer package as an owner (if any). Used within <package>.
uml13.print Print an UML 1.3 model element in a context that allows identifying it.
uml13.root.package Create an outer-most package with the name provided
uml13.tag Create tagged value bound to its owner. Used within <package>, <class>, <field>

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