-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement mapping between elements, namespaces and files #602
Merged
atextor
merged 18 commits into
eclipse-esmf:main
from
bci-oss:579-implement-mapping-elements-namespaces-files
Jul 9, 2024
Merged
Implement mapping between elements, namespaces and files #602
atextor
merged 18 commits into
eclipse-esmf:main
from
bci-oss:579-implement-mapping-elements-namespaces-files
Jul 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has far-reaching consequences on model loading, model resolving and the APIs that consume loaded models, including model validation.
Since the AspectModelLoader automatically migrates meta model versions - which is necessary to correctly instantiate model elements - running tests for multiple meta model versions does not bring any benefits. This in turn means that test aspect models are not required for all meta model versions but only the current/latest version.
This is is necessary because the number of files in the PR is too large for the reviewdog API
8392a8e
to
30308d3
Compare
Yauhenikapl
approved these changes
Jul 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
core/esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/metamodel/AspectModel.java
Outdated
Show resolved
Hide resolved
.../esmf-aspect-meta-model-interface/src/main/java/org/eclipse/esmf/metamodel/ModelElement.java
Show resolved
Hide resolved
...t-meta-model-java/src/main/java/org/eclipse/esmf/aspectmodel/resolver/ResolutionSupport.java
Outdated
Show resolved
Hide resolved
Yauhenikapl
approved these changes
Jul 8, 2024
Release v2.9.0 addresses this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR provides a clean implementation of the model that distinguishes between
model elements, namespaces and single aspect model files as described in
ADR-0007.
This has many implications on the code base:
AspectModelFile
interface and the new core abstraction,AspectModel
, which combines knowledge about model elements, namespaces theelements are contained in and files they were defined in. The
AspectModel
retains information about the underlying RDF graph of the model.
VersionedModel
class which contains only a merged RDFgraph but no information about the underlying source files can not work
anymore and is removed. Similarly, the
AspectContext
file which encapsulatesa
VersionedModel
with a singleAspect
can not work and is also removed.and simplified. The
AspectModelResolver
is removed as it is not needed as astandalone mechanism any more. Loading (and resolving) an Aspect Model is now
only done using
new AspectModelLoader().load(...)
; theAspectModelLoader
constructor can also be augmented with custom
ResolutionStrategy
s.changed, all tests are subsequently also adjusted.
functionality does not differ from the "prettyprint" command.
AspectModelLoader automatically migrates files to the latest meta model
version (which is necessary to instantiate the model elements). This means
that test aspect model files are not needed for every meta model version.
there is no need for the following separate modules:
esmf-aspect-meta-model-types
,esmf-aspect-meta-model-version-migrator
andesmf-aspect-model-resolver
; thosemodules are therefore removed. Only the
esmf-aspect-meta-model-interface
module is needed as a runtime dependency for generated Java Code, and only
the
esmf-aspect-meta-model-java
module is needed for loading Aspect Models.Fixes #579.
Type of change
Please delete options that are not relevant.
Checklist:
Additional notes:
Add any other notes or comments here.