Jjodel Definition Language
The Jjodel Definition Language provides a textual notation for defining metamodels, viewpoints, and expressions. While Jjodel’s graphical editors are the primary interface for most users, the definition language offers a compact, code-oriented alternative that is especially useful for advanced users, automation, and version control.
Expression Languages
Section titled “Expression Languages”Jjodel includes three specialized languages:
JjEL — Jjodel Expression Language
Section titled “JjEL — Jjodel Expression Language”JjEL is used for navigating models, accessing properties, and defining computed values. It appears in viewpoint templates, validation constraints, and the Console.
// Navigate from an object to its metaclassself.instanceOf.name
// Access an attributeself.name
// Collection operationsPerson.allInstances.filter(p => p.age > 18)Person.allInstances.map(p => p.name)JjTL — Jjodel Transformation Language
Section titled “JjTL — Jjodel Transformation Language”JjTL is Jjodel’s model-to-model transformation language. It defines mappings between source and target metamodels, enabling systematic model transformations.
JjTL serves a dual purpose: it is both a user-facing language for defining transformations and the core intermediate representation for future interoperability with other transformation languages (ATL, ETL).
JjScript
Section titled “JjScript”JjScript provides a scripting interface for programmatic manipulation of metamodels and models. It extends JavaScript with Jjodel-specific APIs for creating, modifying, and querying model elements.
JSX for Model Navigation
Section titled “JSX for Model Navigation”Jjodel uses JSX-like expressions in viewpoint templates to define dynamic content. These expressions are evaluated at render time and can access the current model element, its properties, and its relationships.
// A simple template for rendering a class<rect> <text>{self.name}</text> {self.attributes.map(a => <text>{a.name}: {a.type}</text> )}</rect>