Skip to content

Jjodel Object Model (JjOM)

The Jjodel Object Model (JjOM) is the structured runtime framework at the heart of Jjodel. It represents all modeling components — models, metamodels, and viewpoints — in a unified, accessible structure.

JjOM is built on a small set of foundational constructs:

A logical container for grouping related classes. Packages can be nested to create hierarchical namespaces.

Key properties:

  • name: String — the package name
  • packages: Array<DPackage> — nested sub-packages
  • objects: Array<DObject> — contained elements

The fundamental building block of metamodels. A DClass defines an element type with its properties and relationships.

Key properties:

  • name: String — the class name (unique within its package)
  • isAbstract: Boolean — if true, the class cannot be directly instantiated
  • isInterface: Boolean — marks the class as an interface
  • isRootable: Boolean — if true, instances can be root elements in a model
  • isSingleton: Boolean — restricts to a single instance per model
  • isFinal: Boolean — prevents subclassing
  • isPrimitive: Boolean — marks the class as a primitive type
  • isMetamodel: Boolean — indicates this class belongs to the metamodel level
  • extends: Array<DClass> — parent classes (inheritance)
  • extendedBy: Array<DClass> — known subclasses
  • attributes: Array<DAttribute> — owned attributes
  • references: Array<DReference> — owned references
  • operations: Array<DOperation> — owned operations
  • features: Array<Feature> — combined list of all structural features
  • instances: Array<DObject> — all instances of this class
  • allInstances: Array<DObject> — all instances including subclass instances

A typed property belonging to a class.

Key properties:

  • name: String — the attribute name
  • type — the data type (String, Integer, Boolean, Float, or enum)

A relationship between two classes.

Key properties:

  • name: String — the reference name
  • target: DClass — the target class
  • containment: Boolean — whether this is a containment (composition) reference
  • multiplicity — lower and upper bounds

A behavioral feature belonging to a class.

A runtime instance of a DClass. DObjects hold actual attribute values and reference targets.

Key properties:

  • id: Pointer — unique identifier (note: IDs generated by DObject.new() are temporary)
  • className: String — the name of the instantiated class
  • instanceOf: DClass — the metamodel class this object conforms to
  • parent: * — the containing element (if any)

The JjOM is fully navigable at runtime through JjEL expressions and the Console. You can traverse the entire model graph starting from any element:

// From a class, get all its instances
Person.allInstances
// From an instance, navigate to its class
myPerson.instanceOf.name // → "Person"
// From a class, get its features
Person.features // → [name, age, address, ...]
// Traverse containment
myPackage.objects // → all contained elements

In Jjodel’s internal architecture, the LModel proxy provides a convenient API for accessing and manipulating the JjOM. LModel finds elements by name and writes attribute values using the $attr.value pattern. This is primarily relevant for internal development and advanced customization.