openEHR / archie

OpenEHR library implementing ADL 2, AOM 2, BMM, RM 1.0.4 and many tools
Apache License 2.0
52 stars 25 forks source link

Refactoring to separate out RM-specific code from generic. #589

Open wolandscat opened 6 months ago

wolandscat commented 6 months ago

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 where XXXX 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 to ArchieTypeNameResolver) on openEHR RM has been removed by giving it an extra constructor parameter.

The class JacksonUtil class (renamed to OpenehrRmJacksonUtil since it is RM-specific) has a small change to correspond with the above, i.e. injecting the OpenEhrRmInfoLookup.getInstance()singleton intoArchieTypeNameResolver`.

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!

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 90.07353% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 70.32%. Comparing base (c065910) to head (9b4d721).

Files Patch % Lines
...e/openehr/serialisation/xml/OpenEhrRmJAXBUtil.java 55.00% 8 Missing and 1 partial :warning:
...com/nedap/archie/rminfo/MetaModelsInitialiser.java 84.61% 5 Missing and 1 partial :warning:
...parser/treewalkers/PrimitivesConstraintParser.java 93.93% 0 Missing and 2 partials :warning:
...nedap/archie/rminfo/ReflectionModelInfoLookup.java 77.77% 0 Missing and 2 partials :warning:
...in/java/com/nedap/archie/aom/CPrimitiveObject.java 80.00% 1 Missing :warning:
...a/com/nedap/archie/definitions/AdlDefinitions.java 0.00% 1 Missing :warning:
...a/com/nedap/archie/rminfo/ArchieAOMInfoLookup.java 50.00% 1 Missing :warning:
...edap/archie/rminfo/OpenEhrModelNamingStrategy.java 83.33% 0 Missing and 1 partial :warning:
...openehr/rminfo/OpenEhrRmMetaModelsInitialiser.java 91.66% 1 Missing :warning:
...e/openehr/rminfo/OpenEhrRmUpdatedValueHandler.java 80.00% 1 Missing :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #589 +/- ## ============================================ - Coverage 71.80% 70.32% -1.48% - Complexity 6956 6995 +39 ============================================ Files 663 686 +23 Lines 22691 23299 +608 Branches 3676 3703 +27 ============================================ + Hits 16294 16386 +92 - Misses 4664 5167 +503 - Partials 1733 1746 +13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.