DiSSCo / disscover

Search, discover and act upon data within the DiSSCo digital infrastructure.
https://dev.dissco.tech
Apache License 2.0
1 stars 0 forks source link

Annotation improvements #78

Closed TomDijkema closed 9 months ago

TomDijkema commented 9 months ago

PR should improve the overall Annotation logic. Most of the refinements are related to constructing the correct target property paths. This is a difficult process because of the different levels class and field annotations work on. These changes make sure to interconnect the two, making annotations on an existing field, will now use the parent class of that field to determine the formatted path using a new utility function. The most important part of this function is to add the index when necessary, like for example when you are annotating the country field of a location, the user must choose an existing location class, which is nested inside an occurrence class. Choosing a specific instance will grab the parent classes, check the indexes, and make sure they are represented in the path, resulting with for example: occurrences[0].location.country.

The code that makes up the annotation process has become big and a bit messy, it might be good to clean this up some time in the future. At least the functionality should work.

sonarcloud[bot] commented 9 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
20.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud