Skip to main content

Element Roles

Each ElementClass has a role, which defines how the elements are used. These roles decide how the Elements are imported, whether they can be expanded and other behaviour.

Program

Programs are the roots of expandable Metamodels. They represent the codebase we wish to model and expand.

Programs:

  • Have no parents.
  • Can be found in the model directory.
  • Should always have one or more identifiers.
  • Are expandable.

See Program Models on how to use program ElementClasses

Module

Modules are reusable models, which can be used by Programs.

Modules:

  • Have no parents.
  • Can be found in the model directory.
  • Should always have one or more identifiers.
  • Are linked to Programs by an aggregation reference
  • Are expandable.

See Module Models on how to use module ElementClasses

Element

Elements are parts of the model that can be expanded.

Elements:

  • Should have a module, program or element parent, either through composition or extension.
  • Can be found in the model directory.
  • Should have an identifier if it is the target of a Reference.
  • Are expandable.

Nodes

Nodes are parts of the model that have no function other than adding more information to the model.

Nodes:

  • Should probably have a parent to include it in the model somewhere.
  • Can have an identifier.
  • Are not expandable.

Data

Data ElementClasses represent the data in DataResources.

Data ElementClasses:

  • Have no parents.
  • Can be found in DataResource files.
  • Should always have one or more identifiers.
  • Can be referenced by association references.
  • Are not expandable.

Config

Config ElementClasses are Data ElementClasses, but with the added functionality that they can be configured in a settings directory. A settings directory exists next to the model. This can be a way for application developers to define data that would otherwise require a DataResource in an ExpansionResource.

Config ElementClasses:

  • Have no parents.
  • Can be found in settings directories or DataResource files.
  • Should always have one or more identifiers.
  • Can be referenced by association references.
  • Are not expandable.

Taxonomy

Taxonomy ElementClasses are Data ElementClasses that can be referenced even though they are not defined anywhere. If there is no definition, the element will be stubbed.

Variant

Variants provide a way to define multiple versions of a program to then select 1 of the versions during expansion.

Variants:

  • Should be the child of a Program through composition.
  • Can be found in the model directory.
  • Should always have one or more identifiers.
  • Are not expandable.

Export

Export ElementClasses are not regular parts of the model. They are designed to be exported during expansion or other processes. As a result, they get writer support, which is normally only available for Modules and Programs.