From 3418ce50ac9b28fed4fa949919e6c8208738cdcf Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 8 Aug 2022 12:48:47 +0200 Subject: [PATCH] cleaning of subjects: perform the cleaning when the given value is equivalent to one of the terms in the vocabulary --- .../dnetlib/dhp/schema/oaf/utils/OafMapperUtils.java | 3 ++- .../eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java | 2 +- .../dhp/oa/graph/clean/GraphCleaningFunctionsTest.java | 2 +- .../eu/dnetlib/dhp/oa/graph/clean/result.json | 10 +++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/OafMapperUtils.java b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/OafMapperUtils.java index d58b354abd..6ba7d70f18 100644 --- a/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/OafMapperUtils.java +++ b/dhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/OafMapperUtils.java @@ -11,6 +11,7 @@ import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; +import eu.dnetlib.dhp.schema.common.ModelConstants; import org.apache.commons.lang3.StringUtils; import eu.dnetlib.dhp.schema.common.AccessRightComparator; @@ -141,7 +142,7 @@ public class OafMapperUtils { } public static Qualifier unknown(final String schemeid, final String schemename) { - return qualifier("UNKNOWN", "Unknown", schemeid, schemename); + return qualifier(UNKNOWN, "Unknown", schemeid, schemename); } public static AccessRight accessRight( diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java index c650400afc..147e266999 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java @@ -46,7 +46,7 @@ public class CleaningRuleMap extends HashMap, SerializableConsumer