Skip to main content

Decoupling 'elements' from the Metamodel stack

· 4 min read
Jorren Hendriks
Jorren Hendriks
R&D Engineer

With nsx-metamodels:2026.5.0 the contents of the prime-core ontologies have been re-arranged. A large part of what used to live in the elements ontology has moved into expansionControl and into a new ontology called values.

This is a model-level reorganisation. Applications are not affected. Metamodels and expansion resources that reference the moved elements do need an update when prime-core is upgraded in the project.

What changed​

Historically, elements was the catch-all ontology of prime-core. It contained the functional model of an application (Application, Component, DataElement, Field, ...), but also the building blocks of the framework itself (Option, Technology, Library, ...) and the entire valueType model. Because of that, expansionControl depended on elements, and anything that wanted to use options or technologies had to import the full application model with it.

That dependency has now been inverted. The three ontologies are:

  • expansionControl everything related to the core framework. It no longer depends on elements.
  • values the valueType related model. It depends on expansionControl.
  • elements the functional application model. It now depends on expansionControl and values.
Before: expansionControl depending on elements. After: elements depending on both expansionControl and values (new)

This is a step towards the goal described in the metamodels progress update: making everything less dependent on elements, so that elements can eventually become a standalone building block on top of the core instead of being part of it.

Moved to expansionControl​

ConcernType, Dependency, DependencyScope, ElementType, Metadata, MetadataKey, ModuleManifest, ModulePackaging, Option, OptionType, OptionTypeValueConstraint, Technology, TechnologyStack, LayerDependency, LayerImplementation, LayerImplementationTag, LayerSource, LayerType, Library, SourceType.

Moved to values​

ValueType, ValueTypeRestriction, NativeType, NativeTypeUsage, DerivedNativeType, DerivedNativeTypeTag, DerivedNativeTypeUsage, SimpleValueType, CustomRestriction, CustomRestrictionValidator, Digits, Future, NotNull, NumberBounds, Past, StringLength, StringPattern.

Model versions​

The modelVersion of each ontology was updated to reflect the change. These schemas have now also been published to schemas.normalizedsystems.org.

OntologymodelVersionXSD namespace
expansionControl2026.0.0https://schemas.normalizedsystems.org/xsd/expansionControl/2026/0/0
elements2026.0.0https://schemas.normalizedsystems.org/xsd/elements/2026/0/0
values2026.0.0https://schemas.normalizedsystems.org/xsd/values/2026/0/0

Applications are unaffected​

These changes have no impact on your applications or other expansions. You will need to upgrade the prime-mr-plugin to receive support for the relocated elements.

  • Coordinates are unchanged While some elements have changed ontologies, their runtime representation remains unchanged. No changes to package or classnames.
  • Same artifact Everything remains available within the prime-core artifact for now.
  • XML namespaces While namespaces have changed these will be automatically updated when changes are written to the model. This does not impact model-loading.

Breaking changes for metamodels and expanders​

Two things will need a migration, but only when you update the prime-core dependency within your project.

1. Test imports​

Spec methods in prime-test-support were relocated. No need for additional dependencies, but all (static) imports of moved specs will need an update:

MyExpanderTest.java
import static elements.spec.ElementsSpecs.option;
import static expansionControl.spec.ExpansionControlSpecs.option;

import static elements.spec.ElementsSpecs.simpleValueType;
import static values.spec.ValuesSpecs.simpleValueType;

The rule is the same as the lists above: anything that moved to expansionControl is now on expansionControl.spec.ExpansionControlSpecs, anything that moved to values is now on values.spec.ValuesSpecs, and everything else stays on elements.spec.ElementsSpecs.

Watch out for wildcard imports. A test using import static elements.spec.ElementsSpecs.*; will not fail to compile when an element moves out of elements, it will simply stop resolving the method, so you still need to add the second wildcard import for the ontology it moved to. The compiler will help you find all locations that break.

2. Model references​

Metamodels that reference a moved element must update the ontology prefix in their model files. The element name itself does not change:

MyClass_type.xml
  <associationType>association</associationType>
<owner>myOntology::MyClass</owner>
<target>elements::ValueType</target>
<target>values::ValueType</target>

The same applies to <superClass>, <dataType>, <group> and <expandableElement> entries.

If your ontology referenced these elements through elements only, it now has to declare the ontology it actually uses:

myOntology.xml
  <ontologyDependencies>
<ontology>elements</ontology>
<ontology>values</ontology>
</ontologyDependencies>

An ontology that only used the moved elements (options, technologies, layers, valueTypes) can now drop its dependency on elements entirely. That is the whole point of the split: a metamodel that needs options and value types no longer drags the full application model along.

Upgrading​

  1. Upgrade to nsx-metamodels:2026.5.0.
  2. Re-expand your metamodel.
  3. Fix the elements:: prefixes reported as unresolved references, using the lists above.
  4. Fix the static imports in your tests.
  5. Review your ontologyDependencies: add values or expansionControl where needed, and remove elements where it is no longer used.