From a75fb8c47ae0cd44398823a20ea2a24e1985d2ab Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 12 Jan 2022 18:06:26 +0100 Subject: [PATCH] [BipFinderInstanceLevel] change pom to align to the dhp-schema release 2.10.24 and refactoring --- .../createunresolvedentities/ProduceTest.java | 71 ++++++++++++------- pom.xml | 2 +- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/createunresolvedentities/ProduceTest.java b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/createunresolvedentities/ProduceTest.java index 8c20475ff..ce44f0036 100644 --- a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/createunresolvedentities/ProduceTest.java +++ b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/createunresolvedentities/ProduceTest.java @@ -245,26 +245,47 @@ public class ProduceTest { .get(0) .getValue()); - Assertions.assertEquals("10.3390/s18072310", - tmp.filter(row -> row.getId().equals(doi)).collect() - .get(0) - .getInstance().get(0) - .getPid().get(0) - .getValue().toLowerCase()); + Assertions + .assertEquals( + "10.3390/s18072310", + tmp + .filter(row -> row.getId().equals(doi)) + .collect() + .get(0) + .getInstance() + .get(0) + .getPid() + .get(0) + .getValue() + .toLowerCase()); - Assertions.assertEquals("doi", - tmp.filter(row -> row.getId().equals(doi)).collect() - .get(0) - .getInstance().get(0) - .getPid().get(0) - .getQualifier().getClassid()); + Assertions + .assertEquals( + "doi", + tmp + .filter(row -> row.getId().equals(doi)) + .collect() + .get(0) + .getInstance() + .get(0) + .getPid() + .get(0) + .getQualifier() + .getClassid()); - Assertions.assertEquals("Digital Object Identifier", - tmp.filter(row -> row.getId().equals(doi)).collect() - .get(0) - .getInstance().get(0) - .getPid().get(0) - .getQualifier().getClassname()); + Assertions + .assertEquals( + "Digital Object Identifier", + tmp + .filter(row -> row.getId().equals(doi)) + .collect() + .get(0) + .getInstance() + .get(0) + .getPid() + .get(0) + .getQualifier() + .getClassname()); } @@ -274,15 +295,17 @@ public class ProduceTest { JavaRDD tmp = getResultJavaRDD(); List mes = tmp - .filter(row -> row.getInstance() != null && row.getInstance().size() > 0) - .flatMap(row -> row.getInstance().iterator()) - .flatMap(i -> i.getPid().iterator()) - .collect(); + .filter(row -> row.getInstance() != null && row.getInstance().size() > 0) + .flatMap(row -> row.getInstance().iterator()) + .flatMap(i -> i.getPid().iterator()) + .collect(); Assertions.assertEquals(86, mes.size()); - tmp.filter(row -> row.getInstance() != null && row.getInstance().size() > 0) - .foreach(e -> Assertions.assertEquals("sysimport:enrich", e.getDataInfo().getProvenanceaction().getClassid())); + tmp + .filter(row -> row.getInstance() != null && row.getInstance().size() > 0) + .foreach( + e -> Assertions.assertEquals("sysimport:enrich", e.getDataInfo().getProvenanceaction().getClassid())); } diff --git a/pom.xml b/pom.xml index a27f89f9f..7a026e668 100644 --- a/pom.xml +++ b/pom.xml @@ -797,7 +797,7 @@ 3.3.3 3.4.2 [2.12,3.0) - [2.9.25-SNAPSHOT] + [2.10.24] [4.0.3] [6.0.5] [3.1.6]