From e723513fac5a06475f6dae7af134442872ed5b2d Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Fri, 21 May 2021 13:20:43 +0200 Subject: [PATCH] added merge forh2020topiccode and h2020topicdescription. Removed merge for funded amount. --- .../java/eu/dnetlib/dhp/schema/oaf/Project.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java index 4be4d5d..8d77cf9 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java @@ -1,6 +1,8 @@ package eu.dnetlib.dhp.schema.oaf; +import org.apache.commons.lang3.StringUtils; + import java.io.Serializable; import java.util.List; @@ -346,10 +348,15 @@ public class Project extends OafEntity implements Serializable { : contactemail; summary = p.getSummary() != null && compareTrust(this, e) < 0 ? p.getSummary() : summary; currency = p.getCurrency() != null && compareTrust(this, e) < 0 ? p.getCurrency() : currency; - totalcost = p.getTotalcost() != null && compareTrust(this, e) < 0 ? p.getTotalcost() : totalcost; - fundedamount = p.getFundedamount() != null && compareTrust(this, e) < 0 - ? p.getFundedamount() - : fundedamount; +// totalcost = p.getTotalcost() != null && compareTrust(this, e) < 0 ? p.getTotalcost() : totalcost; +// fundedamount = p.getFundedamount() != null && compareTrust(this, e) < 0 +// ? p.getFundedamount() +// : fundedamount; + + if (p.getH2020topiccode() != null && StringUtils.isEmpty(h2020topiccode)){ + h2020topiccode = p.getH2020topiccode(); + h2020topicdescription = p.getH2020topicdescription(); + } h2020classification = mergeLists(h2020classification, p.getH2020classification());