Skip to main content

Metamodel Concepts

A metamodel is described as a set of ontologies, which can contain ElementClasses and References.

An Ontology groups the concepts of your metamodel and can be referenced by other metamodel. elements is the classic metamodel which contains ElementClasses such as Component, DataElement, TaskElement etc.

ElementClass

An ElementClass is used to design what the elements you will be modelling will look like. The ElementClass can declare Attributes, properties with simple data types. Between ElementClasses you can have References, which always have an owner and a target.

To make it more concrete, let's start with an example Ontology to model data charts. To model this we need an ElementClass with an Attribute. We also need to define a DataType to be able to represent Text values.

Example of a DataChart ElementClass

Each ElementClass is also assigned a role. This role will define the behaviour of the element in the model.

RoleDescriptionExpandableExample
elementBasic Element that can be expanded.xDataElement
nodePart of another Element.Field
dataData that will provided as a DataResource. Usually static Data, such as types.LinkFieldType
moduleAn Element that groups other Elements into a reusable Module.xComponent
programAn Element that acts as the root of the expansion.xApplication
Program-Module

These roles are used to create a separate Metamodel.

References

A Reference is used to define a relationship between 2 ElementClasses. In our example we could introduce a link from DataChart to a new ElementClass DataChartType.

Example of a Reference

A Reference has an associationType, which describes some properties of the relationship:

AssociationTypeDescriptionOppositeExample
associationRegular one-directional referencenot supportedTaskElement::targetElement (references DataElement)
compositionDefines the target as part of a whole (the owner)optionalComponent::dataElements
aggregationThe target exists on its own, but can be aggregated into the ownernot supportedApplication::components
extensionDefines the owner as an extension of the target. Used to extend another Ontologynot possibleAny extension to elements, such as MessageProcessor::component to attach it to Component

Composition

A composition Reference allows you to define a hierarchy of elements. We can also add an OppositeReference to name the reverse link.

Example of a Composition


example of a DataChart model
<dataChart>
<title>Starship Data Chart</title>
<filters>
<dataChartFilter name="filterByType"/>
<dataChartFilter name="filterByLocation"/>
</filters>
</dataChart>

Extension

To extend another Ontology, we need to link our new ElementClasses to one of the ElementClasses of the other Ontology. This can be done by defining a Reference with associationType extension.

Example of an extension Reference