Introduction to Building a Metamodel in Soley Studio

General definition

A metamodel is a “data model that specifies one or more other data models”, according to ISO 11179 (International Organization for Standardization, 2004).

Therefore, the metamodel is describing an (abstract) model of one or more (concrete) models. In the metamodel, you define which modeling elements are available, i.e. the objects available to build your model and their properties. Just think of building a house with toy blocks. In the metamodel, you might define that you have cubes and cylinders available and that these can have different dimensions and colors.

Metamodels for graph representations

In the metamodel of a graph representation, we separate two different types of classes: the node and edge classes. Both define the objects available for creating a graph. Nodes are used to represent data points and edges are used to represent relations. Both nodes and edges can have attributes, such as name, id, weight, … .

Terminology

Classes:

Node and edge classes are types of classes. This is similar to classes in common programming languages.
Inside of classes, there can also be subclasses of infinite levels, allowing for the inheritance of properties. Nodes are the objects used to model data points. Edges are the objects used to model connections or relations between nodes. There are two different types of edge classes. Directed edges are relations from one node to another, which only work in one way. Undirected edges show a mutual relation between two nodes.

Properties:

Node and edge classes may possess properties or attributes. These can be of different types, such as integer or string. The class of a node or edge element determines its set of attributes.

Inheritance:

Node and edge classes inherit their attributes to their child classes. Due to inheritance, all properties of an element type are transferred to its descendants (subclasses). These attributes only have to be defined once and become automatically available to all descendants.

Defining a metamodel in Soley Studio

Metamodel Solution Explorer Soley

In Soley Studio, you can find the Metamodel folder in the Solution Explorer (files in this folder have the extension “.gm”). In this folder, you will find the files Edges.gm and Nodes.gm. Open the files by double-clicking to edit them and to define your metamodel. Please read the following articles for details:

 Best Practice Tips

If you want to add more metamodel files instead of extending the existing ones make sure to add the path to the *.gm file in the MainMetamodel.gm, which you can find in the project folder.
Also remember to save these new files in the Metamodel folder.

Was this article helpful?

Related Articles