[BipFinderInstanceLevel] change pom to align to the dhp-schema release 2.10.24 and refactoring

This commit is contained in:
Miriam Baglioni 2022-01-12 18:06:26 +01:00
parent 4d517ed9ec
commit a75fb8c47a
2 changed files with 48 additions and 25 deletions

View File

@ -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<Result> tmp = getResultJavaRDD();
List<StructuredProperty> 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()));
}

View File

@ -797,7 +797,7 @@
<mockito-core.version>3.3.3</mockito-core.version>
<mongodb.driver.version>3.4.2</mongodb.driver.version>
<vtd.version>[2.12,3.0)</vtd.version>
<dhp-schemas.version>[2.9.25-SNAPSHOT]</dhp-schemas.version>
<dhp-schemas.version>[2.10.24]</dhp-schemas.version>
<dnet-actionmanager-api.version>[4.0.3]</dnet-actionmanager-api.version>
<dnet-actionmanager-common.version>[6.0.5]</dnet-actionmanager-common.version>
<dnet-openaire-broker-common.version>[3.1.6]</dnet-openaire-broker-common.version>