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.
Core Modeling Constructs
Section titled “Core Modeling Constructs”JjOM is built on a small set of foundational constructs:
DPackage
Section titled “DPackage”A logical container for grouping related classes. Packages can be nested to create hierarchical namespaces.
Key properties:
name: String— the package namepackages: Array<DPackage>— nested sub-packagesobjects: Array<DObject>— contained elements
DClass
Section titled “DClass”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— iftrue, the class cannot be directly instantiatedisInterface: Boolean— marks the class as an interfaceisRootable: Boolean— iftrue, instances can be root elements in a modelisSingleton: Boolean— restricts to a single instance per modelisFinal: Boolean— prevents subclassingisPrimitive: Boolean— marks the class as a primitive typeisMetamodel: Boolean— indicates this class belongs to the metamodel levelextends: Array<DClass>— parent classes (inheritance)extendedBy: Array<DClass>— known subclassesattributes: Array<DAttribute>— owned attributesreferences: Array<DReference>— owned referencesoperations: Array<DOperation>— owned operationsfeatures: Array<Feature>— combined list of all structural featuresinstances: Array<DObject>— all instances of this classallInstances: Array<DObject>— all instances including subclass instances
DAttribute
Section titled “DAttribute”A typed property belonging to a class.
Key properties:
name: String— the attribute nametype— the data type (String, Integer, Boolean, Float, or enum)
DReference
Section titled “DReference”A relationship between two classes.
Key properties:
name: String— the reference nametarget: DClass— the target classcontainment: Boolean— whether this is a containment (composition) referencemultiplicity— lower and upper bounds
DOperation
Section titled “DOperation”A behavioral feature belonging to a class.
DObject
Section titled “DObject”A runtime instance of a DClass. DObjects hold actual attribute values and reference targets.
Key properties:
id: Pointer— unique identifier (note: IDs generated byDObject.new()are temporary)className: String— the name of the instantiated classinstanceOf: DClass— the metamodel class this object conforms toparent: *— the containing element (if any)
Navigating the JjOM
Section titled “Navigating the JjOM”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 instancesPerson.allInstances
// From an instance, navigate to its classmyPerson.instanceOf.name // → "Person"
// From a class, get its featuresPerson.features // → [name, age, address, ...]
// Traverse containmentmyPackage.objects // → all contained elementsJjOM and the LModel Proxy
Section titled “JjOM and the LModel Proxy”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.