Example-Zoo

You can get the files of the examples described here when you install EMorF and then select File>New>Examples>EMorF Examples.

Class diagram to database
Description

In this example a bidirectional transformation between a simple class diagram and a database model is defined. The class diagram may contain one package containing classes with references and attributes and primitive data types. A database model may contain one schema containing tables with columns.

Rules
There are three transformation rules defined for this example:
  • A package is mapped to a schema. The name of the package and the schema shall be equal.
  • A class in a package is mapped to a table. The name of the class and the table shall be equal. This rule is shown in the following image.
  • A attribute of a class is mapped to a column. The name of the attribute and the class shall be equal.
bidirectional class2table-rule
Library modifications
Description

In this example some simple modifications on the library model of the EMF Examples were defined with EMorF.

Rules
There are two simple modification rules defined for this example:
  • A book with a user-defined title is created in the library and assigned to the author with the user-defined name.
  • A book, which is not lend and where the amount of copies is 0,is deleted from the library.
  • The last name of an employee is changed from "Wagner" to "Hesse".
library modification rule library modification rule
© 2012 Solunar GmbH. All Rights Reserved. | Imprint