forked from nedap/archie
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Refactoring to separate out RM-specific code from generic. #589
Open
wolandscat
wants to merge
20
commits into
master
Choose a base branch
from
simplify_rm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
…ion lookup singleton.
Remove contents of referencemodels, but retain tests (forn now). Package moves to org.openehr to facilitate new RM addition to Archie. Some class renames for clarity. Revert change to OpenEhrRmInfoLookup.addTypes() OpenEhrRmMetaModelsInitialiser.getNativeRms() probably not safe for Android.
Use MetaModels during parsing of CPrimitiveObjects to get access to the correct ModelNamingStrategy. Currently conditional since ADLParser can be created with no MetaModels as well. In PrimitivesConstraintParser, if the ModelNamingStrategy object can be found, write in the correct RmTypeNames into CPrimitiveObjects (CTerminologyCode and so on). Rename ArchieModelNamingStrategy to OpenEhrModelNamingStrategy.
Move tests with static dependencies on openEHR RM classes from tools to openehr-rm. Move or copy other test resources to openehr-rm as needed. Create tools/src/testFixtures area for test helper classes shared across projects.
…ss CkmRepositoryBuilder in openehr-rm. Use this for any access to the CKM-mirror copy.
…ument so as to use the correct /resources area. TODO: there might be a better way to do this, but it seems the safest way to share /resources across projects given the Java model of class loading.
…now take a 'class' arg to ensure the corect /resources area is access (i.e. the caller's area, which could be in the same project or another).
…nd Assert. Not sure if this matters functionally - probably just an efficiency thing. TODO: check whether this change introduces any errors, or whether it can be reverted by some other simple change.
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.
This set of changes is renames and some class moves, to more systematically group openEHR RM specific classes, including xml/json/odin specific adaptations in the
openehr-rm
module.The design intent is to be able to add other RMs to Archie in a more straightforward way.
Quite a few renames of classes that were openEHR RM specific to names like
OpenehrRmXXXX
whereXXXX
was the original name. This makes it easier to know at a glance whether something is specific to one RM or not.The dependency of
OpenEHRTypeNaming
(renamed toArchieTypeNameResolver
) on openEHR RM has been removed by giving it an extra constructor parameter.The class
JacksonUtil
class (renamed toOpenehrRmJacksonUtil
since it is RM-specific) has a small change to correspond with the above, i.e. injecting the OpenEhrRmInfoLookup.getInstance()singleton into
ArchieTypeNameResolver`.Some
build.gradle
dependencies adjusted. No semantic changes.Changes all compile and tests run normally.
Further code improvements are possible so DON'T MERGE this yet!