From 84d54643cf55d86d42cea236569c84a1b2c339bc Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Dec 2023 09:57:00 +0100 Subject: [PATCH 1/2] [cleaning] allow enriched orcids to pass the cleaning, rule out non-orcid author pids --- .../dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java index e6ae37908..8700ea527 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java @@ -689,6 +689,7 @@ public class GraphCleaningFunctions extends CleaningFunctions { .filter(Objects::nonNull) .filter(p -> Objects.nonNull(p.getQualifier())) .filter(p -> StringUtils.isNotBlank(p.getValue())) + .filter(p -> StringUtils.contains(StringUtils.lowerCase(p.getQualifier().getClassid()), ORCID)) .map(p -> { // hack to distinguish orcid from orcid_pending String pidProvenance = getProvenance(p.getDataInfo()); @@ -698,7 +699,8 @@ public class GraphCleaningFunctions extends CleaningFunctions { .toLowerCase() .contains(ModelConstants.ORCID)) { if (pidProvenance - .equals(ModelConstants.SYSIMPORT_CROSSWALK_ENTITYREGISTRY)) { + .equals(ModelConstants.SYSIMPORT_CROSSWALK_ENTITYREGISTRY) || + pidProvenance.equals("ORCID_ENRICHMENT")) { p.getQualifier().setClassid(ModelConstants.ORCID); } else { p.getQualifier().setClassid(ModelConstants.ORCID_PENDING); From 98cce5bfb22c5d761fbf7044834959efdec4e31e Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Tue, 12 Dec 2023 09:59:05 +0100 Subject: [PATCH 2/2] code formatting --- .../dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java index 8700ea527..0124e96fc 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java @@ -689,7 +689,9 @@ public class GraphCleaningFunctions extends CleaningFunctions { .filter(Objects::nonNull) .filter(p -> Objects.nonNull(p.getQualifier())) .filter(p -> StringUtils.isNotBlank(p.getValue())) - .filter(p -> StringUtils.contains(StringUtils.lowerCase(p.getQualifier().getClassid()), ORCID)) + .filter( + p -> StringUtils + .contains(StringUtils.lowerCase(p.getQualifier().getClassid()), ORCID)) .map(p -> { // hack to distinguish orcid from orcid_pending String pidProvenance = getProvenance(p.getDataInfo());