Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Sirius/Tutorials/DomainModelTutorial"

Line 1: Line 1:
Overview
+
'''Bold text'''=Overview=
 
+
  
 
This tutorial explains how to create your first EMF Metamodel.
 
This tutorial explains how to create your first EMF Metamodel.
This tutorial can be seen as the start of Sirius tutorial before Starter Tutorial,  
+
This tutorial can be seen as the start of Sirius [[Sirius/Tutorials/4MinTutorial | Starter Tutorial]] before Starter Tutorial,  
 
We will create the basic family Metamodel
 
We will create the basic family Metamodel
  
To be continued...
+
=Create my first metamodel=
 +
Our metamod will have 4 concepts. These concepts will be the basics concepts about family.
 +
The first concept is '''Family'''. A family has a '''name''' type of '''Estring'''.
 +
A family contains '''members''' type of '''Person'''. A person has a '''name''' type of '''EString'''.
 +
A person has 2 '''parents''' and many or no '''children'''.
 +
Two concepts herited from '''Person''' are '''Man''' and '''Woman'''.
 +
A person should have 1 '''father''' type of '''Man''' or/and 1 '''mother''' type of '''Woman''' or neither father nor mother.
 +
To sum up, our metamodel have 4 concepts
 +
* '''Family'''
 +
* '''Person'''
 +
* '''Man'''
 +
* '''Woman'''
 +
and 6 relations
 +
* '''members''' from '''Family''' to '''Person'''
 +
* '''children''' from '''Person''' to '''Person''', with cardinality '''0..*'''
 +
* '''parents''' from '''Person''' to '''Person''' with cardinality '''0..2'''
 +
* '''father''' from '''Person''' to '''Man''' with cardinality '''0..1'''
 +
* '''mother''' from '''Person''' to '''Woman''' with cardinality '''0..1'''
 +
* an ''extend'' from '''Person''' for '''Man''' and '''Woman'''

Revision as of 11:48, 1 August 2016

Bold text=Overview=

This tutorial explains how to create your first EMF Metamodel. This tutorial can be seen as the start of Sirius Starter Tutorial before Starter Tutorial, We will create the basic family Metamodel

Create my first metamodel

Our metamod will have 4 concepts. These concepts will be the basics concepts about family. The first concept is Family. A family has a name type of Estring. A family contains members type of Person. A person has a name type of EString. A person has 2 parents and many or no children. Two concepts herited from Person are Man and Woman. A person should have 1 father type of Man or/and 1 mother type of Woman or neither father nor mother. To sum up, our metamodel have 4 concepts

  • Family
  • Person
  • Man
  • Woman

and 6 relations

  • members from Family to Person
  • children from Person to Person, with cardinality 0..*
  • parents from Person to Person with cardinality 0..2
  • father from Person to Man with cardinality 0..1
  • mother from Person to Woman with cardinality 0..1
  • an extend from Person for Man and Woman

Back to the top