This branch implements enrichment on Result specializing in the method mergefrom().
During the merge, when one of the two records has the provenance "enrich" instead of duplicating an instance, we try to enrich only the missing attribute.
This branch implements enrichment on Result specializing in the method **mergefrom()**.
During the merge, when one of the two records has the provenance "enrich" instead of duplicating an instance, we try to enrich only the missing attribute.
Consider reusing it, or if its behaviour doesn't exactly match the you you need, consider to adjust it.
A very similar function already exists in this module:
https://code-repo.d4science.org/D-Net/dhp-schemas/src/branch/master/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java#L50
Consider reusing it, or if its behaviour doesn't exactly match the you you need, consider to adjust it.
sandro.labruzzo marked this conversation as resolved
This branch implements enrichment on Result specializing in the method mergefrom().
During the merge, when one of the two records has the provenance "enrich" instead of duplicating an instance, we try to enrich only the missing attribute.
@ -245,0 +544,4 @@
* @param pid the pid
* @return the string
*/
private static String normalizePid(final StructuredProperty pid) {
A very similar function already exists in this module:
https://code-repo.d4science.org/D-Net/dhp-schemas/src/branch/master/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/CleaningFunctions.java#L50
Consider reusing it, or if its behaviour doesn't exactly match the you you need, consider to adjust it.
Let's try reuse already existing utilities. See comment below.
fa4cd3963b
into master 2 years agoReviewers
fa4cd3963b
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.