Create your first metamodel
In this section, you’ll learn how to create a metamodel and its corresponding model in Jjodel. To this end, we will define a metamodel for Entity-Relationship Diagrams (ERD)
Create a New Metamodel
The first step is to create a metamodel that defines the core building blocks of your language.
1. Open the Main Menu:
- – Navigate to the upper-left corner of the dashboard and click on the ‘Main Menu’ icon.
- – Select ‘New Metamodel’ from the dropdown options.
-
2. Name Your Metamodel:
- – In the dialog box that appears, provide a name for your metamodel (e.g.,
ERD_Notation
) and confirm.
3. Define Classes, Attributes, and Relationships:
- – Give focus to the Metamodel Editor (right-hand side with respect to the property tab).
- – Use the tools on the left panel to add classes, attributes, and relationships to your metamodel.
Define Core Classes:
-
- – Create classes
Entity
,Attribute
, andRelationship
in the Metamodel Editor.
- – Create classes
Add Attributes:
-
-
- – Add
name
as an attribute toEntity
,Attribute
, andRelationship
: however, because it is common to the three classes:- – create a class
namedElement
- – declare it as Abstract in the Properties Tab
- – let the three classes extend
namedElement
by selecting ‘Extend’ in the contextual menu once each class is selected
- – create a class
- – For
Attribute
, addtype
- – For
Relationship
, addcardinality
- – Add
-
Add Enumerators for type
and cardinality
-
- – Create an enumerator
Type
withinteger
,string
, andboolean
as literals - – Create an enumerator
Cardinality
withone2one
,one2many
, andmany2many
as literals
- – Create an enumerator
Change the type for type in Attribute and cardinality in Entity
-
- – Select the attribute type in Attribute
- – Select Type in the corresponding
-
Create a Metamodel for a Simple UML Class Diagram
This video provides a step-by-step guide to creating a simple UML class diagram metamodel. Viewers will learn how to define core elements such as classes, attributes, and relationships, building a foundational structure for UML modeling. With clear explanations and hands-on examples, the tutorial simplifies metamodeling concepts, making it accessible for both beginners and those looking to reinforce their skills