A small example to demonstrate EMF and SmartEMF (XMI) persistence via a demo project.
Find a file
2024-10-15 11:54:13 +02:00
example.model.tests Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
example.model.utils Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
example.model.utils.smartemf Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
examplemetamodel Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
.gitignore Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
LICENSE Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00
README.md Adds the initial MWE projects and documentation 2024-10-15 11:54:13 +02:00

EMF Persistence Example

This example shows how to persist and load EMF models as XMI files with the standard EMF resource implementation and with the SmartEMF resource implementation.

SmartEMF is a custom implementation conforming to the EMF interfaces developed by the eMoflon::IBeX team.

Structure

Name Type Purpose
examplemetamodel EMF metamodeling project Contains the Ecore and the Genmodel files to generate code from.
example.model.tests Java project with JUnit tests Contains JUnit tests for testing the EMF/SmartEMF implementation.
example.model.utils EMF persistence utils Writing and reading XMI files with the standard EMF implementation.
example.model.utils.smartemf SmartEMF persistence utils Writing and reading XMI files with the SmartEMF implementation.

How to build and run

Requirements:

  • You need an up-to-date Eclipse Modeling IDE. Ideally, you use the eMoflon::IBeX Eclipse application because it has all necessary SmartEMF and EMF features pre-installed.
  • Java 21 JDK installed and ready to use.

Steps:

  • Checkout this repository and import all projects in Eclipse.
  • Build all projects.
  • Right click on the project example.model.tests -> Run As -> JUnit test

License

This project is licensed under the Eclipse Public License - v1.0 - see the LICENSE file for more details.