You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The derived array contains the id of all derived nodes based on this node.
derived and annotations are not interchangeable: annotations are part of the original model, i.e. they are the same for every request. The contents of derived depend on the requested derived languages, thus they might be different for each request.
Pro:
Efficient
Con:
Needs serialization format change
All derivations need to be known to repository
All derivations need to be available when original model is requested, if not:
We might wait until all processors are done calculating the derivations
The second request for the same node might contain more derivations than the first request (because e.g. the sophisticated typesystem by now finished calculating the inferred type)
Option D: Separate field in serialization
We add a field derivedFor to the node serialization format.
enikao
changed the title
How do we relate a node from the original model to the derived model?
How do we relate a node from the base model to the derived model?
Jan 19, 2024
Assume we requested an original model and both derived models for validation and typesystem via bulk API (#173, #25).
We want nodes from all three models, and relate the original model nodes to the derived ones. How to do this?
NOTE: "base node" is the node in the original model that we want the derivations for.
Option A: Request derived nodes per base node
A special API receives one node id, and all requested derived languages.
It returns all derived nodes for the one input node.
Pro:
Con:
Option B: Derived nodes must implement interface with back-reference
Each derived node must implement
IDerived
.IDerived.original
refers to the corresponding original node.Pro:
Con:
Option C: Separate list in serialization
We add a field
derived
to the node serialization format (#37).Each node then looks like this:
The
derived
array contains the id of all derived nodes based on this node.derived
andannotations
are not interchangeable:annotations
are part of the original model, i.e. they are the same for every request. The contents ofderived
depend on the requested derived languages, thus they might be different for each request.Pro:
Con:
Option D: Separate field in serialization
We add a field
derivedFor
to the node serialization format.Each node then looks like this:
Pro:
Con:
Option E: Additional mapping in serialization
We add a mapping of derived nodes to serialization format, but outside the actual nodes.
The details what to map and in which direction might change.
Pro:
Con:
Option F: Separate M3 concept
In M3, add a new specialization of
Classifier
namedDerivedConcept
(next toConcept
,Annotation
,Interface
).Pro:
Con:
Option G: Annotation on derived nodes
Have an annotation on each derived node that refers to the base node.
Pro:
JavaClass
fromEntity
)Con:
Option H: Annotation on base node
Have an annotation on base node that refers to derivations.
Pro:
Con:
Option I: Node nature
Introduce new field
nature
in serialization for each node.Possible values:
"original"
{ "derivationKey": "validation", "base": "baseNodeId" }
Pro:
Con:
The text was updated successfully, but these errors were encountered: