preloader
Manual
Core Modeling Constructs

The JjMM establishes core constructs such as Entity, Attribute, Relationship, and Constraint to define the structure of metamodels. These abstract representations enable metamodel designers to create domain-specific types (e.g., classes, components, roles) with customizable properties and constraints. The core constructs of JjMM are the following

  • DModel
  • DPackage
  • DClass
  • DAttribute
  • DReference
  • DObject
  • DValue

In addition, the primitive types EType corresponds to the Ecore datatypes, i.e., EString, EBoolean, EInt, ELong, EFloat, EDouble, EByte, EChar and EShort.

 

Jjodel is based on the Ecore meta-metamodel. Ecore is the core modeling framework of the Eclipse Modeling Framework (EMF), providing the foundation for defining structured data models and supporting various modeling paradigms. Its elements enable users to create metamodels, which define the abstract syntax for domain-specific languages or data structures. Below are the most important components of Ecore:

 

EPackage

It represents a namespace that groups related EClass elements and their features. The main characteristics are

  • – Supports hierarchical organization of metamodels.
  • – Includes unique namespace URIs for identification.
EClass

It represents a class in the metamodel, analogous to classes in object-oriented programming. The main features are

  • – Attributes: Contains EAttributes to define the properties of the class.
  • – References: Holds EReferences to express relationships between classes.
  • – Inheritance: Supports single inheritance via the eSuperTypes property.
  • – Abstract: An EClass can be marked as abstract, indicating that it cannot be instantiated.
EAttribute

It defines the properties (or fields) of an EClass. The main features are

  • – Associated with an EDataType to specify the type of the attribute (e.g., integer, string).
  • – Can have default values.
  • – Supports multiplicity constraints, such as 0..1 (optional) or 1..* (mandatory collection).
EReference

It represents relationships (or associations) between EClass instances. The main features are

  • – Containment: Indicates whether the referenced object is a part of the container object (compositional relationships).
  • – Opposite References: Supports bidirectional references by specifying an eOpposite link.
  • – Multiplicity: Defines cardinality, such as one-to-one, one-to-many, or many-to-many relationships.
EDataType

It represents primitive data types or custom types in the metamodel. For instance: 

  • – Built-in types: EString, EInt, EBoolean.
  • – Custom types: User-defined data types for specific use cases.
  • – Key Use Case: Used to define the type of an EAttribute.
 EEnum

It represents enumerations, which define a fixed set of literal values. Enumerators can be used as EDataTypes for attributes or other modeling elements.

 

EOperation

It represents methods or functions associated with an EClass. The characteristics are

  • – Supports parameters (defined as EParameters).
  • – Specifies a return type using an EDataType or an EClass.
Resource and Persistence

Ecore supports serialization and persistence of models using XMI (XML Metadata Interchange). Models and instances of metamodels can be stored, shared, and reloaded across tools. 

EObject

The base class of all model elements in EMF. Every class and feature in an Ecore-based model inherits from EObject. Provides essential runtime services like notification, reflection, and containment handling.

Leave a Reply

Your email address will not be published. Required fields are marked *