From 624f5f3f2127bc1caf7849514940b2c052ed1c1f Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Mon, 18 Dec 2023 15:28:19 +0100 Subject: [PATCH] [Transformative Agreement] added check to verify the APC were paid byu the IReL funder --- .../CreateActionSetSparkJob.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/transformativeagreement/CreateActionSetSparkJob.java b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/transformativeagreement/CreateActionSetSparkJob.java index fe77344f5a..cab3f24e4f 100644 --- a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/transformativeagreement/CreateActionSetSparkJob.java +++ b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/transformativeagreement/CreateActionSetSparkJob.java @@ -102,20 +102,21 @@ public class CreateActionSetSparkJob implements Serializable { List relationList = new ArrayList<>(); - String paper; + if(value.getAgreement().startsWith("IReL")) { + String paper; - paper = "50|doi_________::" - + IdentifierFactory - .md5(PidCleaner.normalizePidValue(PidType.doi.toString(), value.getDoi())); + paper = "50|doi_________::" + + IdentifierFactory + .md5(PidCleaner.normalizePidValue(PidType.doi.toString(), value.getDoi())); - relationList - .add( - getRelation( - paper, - IREL_PROJECT, ModelConstants.IS_PRODUCED_BY)); - - relationList.add(getRelation(IREL_PROJECT, paper, ModelConstants.PRODUCES)); + relationList + .add( + getRelation( + paper, + IREL_PROJECT, ModelConstants.IS_PRODUCED_BY)); + relationList.add(getRelation(IREL_PROJECT, paper, ModelConstants.PRODUCES)); + } return relationList; }