From 49360770d71d8930838240866a1cbc3ea06b465d Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Wed, 28 Sep 2022 14:16:39 +0200 Subject: [PATCH] map w3id as instance url --- .../dhp/oa/graph/raw/OdfToOafMapper.java | 3 ++ .../dnetlib/dhp/oa/graph/raw/MappersTest.java | 17 +++++++---- .../eu/dnetlib/dhp/oa/graph/raw/rohub.xml | 30 ++++++++----------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java index a25bcd47e..39c77bd37 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/OdfToOafMapper.java @@ -177,6 +177,9 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper { for (final Object o : doc.selectNodes("//*[local-name()='identifier' and ./@identifierType='landingPage']")) { url.add(trimAndDecodeUrl(((Node) o).getText().trim())); } + for (final Object o : doc.selectNodes("//*[local-name()='identifier' and ./@identifierType='w3id']")) { + url.add(trimAndDecodeUrl(((Node) o).getText().trim())); + } Set validUrl = validateUrl(url); diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java index 7552d1789..f0eadbd0d 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MappersTest.java @@ -936,11 +936,18 @@ class MappersTest { System.out.println("***************"); System.out.println(new ObjectMapper().writeValueAsString(list)); System.out.println("***************"); -// final OtherResearchProduct p = (OtherResearchProduct) list.get(0); -// assertValidId(p.getId()); -// assertValidId(p.getCollectedfrom().get(0).getKey()); -// System.out.println(p.getTitle().get(0).getValue()); -// assertTrue(StringUtils.isNotBlank(p.getTitle().get(0).getValue())); + assertEquals(5, list.size()); + final OtherResearchProduct p = (OtherResearchProduct) list.get(0); + assertValidId(p.getId()); + assertTrue(p.getId().startsWith("50|w3id")); + assertValidId(p.getCollectedfrom().get(0).getKey()); + assertTrue(StringUtils.isNotBlank(p.getTitle().get(0).getValue())); + assertEquals(1, p.getInstance().size()); + assertEquals("https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca", p.getPid().get(0).getValue()); + Instance inst = p.getInstance().get(0); + assertEquals("https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca", inst.getPid().get(0).getValue()); + assertEquals("https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca", inst.getUrl().get(0)); + } @Test diff --git a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml index c85b55786..e1e30c3de 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml +++ b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml @@ -21,15 +21,13 @@ - https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca - + https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca + + https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca + - - https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca/resources/24fae96f-f986-46e1-bfd0-a21ca20ff0ce - - - https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca/resources/6d3427a8-352e-49f4-9796-f618c44dc16d - + https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca/resources/24fae96f-f986-46e1-bfd0-a21ca20ff0ce + https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca/resources/6d3427a8-352e-49f4-9796-f618c44dc16d RO-crate @@ -43,21 +41,17 @@ PoznaƄ Supercomputing and Networking Center - - - Generation Service - + + Generation Service - - CNR-ISMAR - + CNR-ISMAR - 2018-06-20T11:21:46Z + 2018-06-20T11:21:46Z The use of biological effects tools offer enormous potential to meet the challenges outlined by the European Union Marine Strategy Framework Directive (MSFD) whereby Member States are required to develop a robust set of tools for defining 11 qualitative descriptors of Good Environmental Status (GES), such as demonstrating that "Concentrations of contaminants are at levels not giving rise to pollution effects" (GES Descriptor 8). This paper discusses the combined approach of monitoring chemical contaminant levels, along side biological effect measurements relating to the effect of pollutants, for undertaking assessments of GES across European marine regions. We outline the minimum standards that biological effects tools should meet if they are to be used for defining GES in relation to Descriptor 8 and describe the current international initiatives underway to develop assessment criteria for these biological effects techniques. Crown Copyright (C) 2010 Published by Elsevier Ltd. All rights reserved. @@ -74,9 +68,9 @@ EOSC::RO-crate - https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca + https://w3id.org/ro-id/0ab171a7-45c5-4194-82d4-850955504bca other research product - + 2018-06-20 OPEN