From 68bd58d6a46c3ffc1c4ddafcb5b25bf065edde31 Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Fri, 10 Jun 2022 17:29:11 +0200 Subject: [PATCH] tests for ROHub --- .../dnetlib/dhp/oa/graph/raw/MappersTest.java | 14 +++ .../dnetlib/dhp/oa/graph/clean/synonyms.txt | 1 + .../eu/dnetlib/dhp/oa/graph/clean/terms.txt | 1 + .../eu/dnetlib/dhp/oa/graph/raw/rohub.xml | 103 ++++++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml 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 bdb73abf5d..7bc2c6e7cf 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 @@ -835,6 +835,20 @@ class MappersTest { assertEquals("EUR", p.getProcessingchargecurrency().getValue()); } + @Test + void testROHub() throws IOException, DocumentException { + final String xml = IOUtils.toString(Objects.requireNonNull(getClass().getResourceAsStream("rohub.xml"))); + final List list = new OdfToOafMapper(vocs, false, true).processMdRecord(xml); + System.out.println("***************"); + System.out.println(new ObjectMapper().writeValueAsString(list)); + System.out.println("***************"); +// final Dataset p = (Dataset) 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())); + } + private void assertValidId(final String id) { // System.out.println(id); diff --git a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt index 09bd58aeb5..39ed0cef18 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt +++ b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/synonyms.txt @@ -497,6 +497,7 @@ dnet:publication_resource @=@ 0044 @=@ Graduate diploma dnet:publication_resource @=@ 0044 @=@ Undergraduate diploma dnet:publication_resource @=@ 0000 @=@ UNKNOWN dnet:publication_resource @=@ 0042 @=@ EGI Virtual Appliance +dnet:publication_resource @=@ 0048 @=@ RO-crate dnet:languages @=@ abk @=@ ab dnet:languages @=@ aar @=@ aa dnet:languages @=@ afr @=@ af diff --git a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/terms.txt b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/terms.txt index bb1e5fbf98..59311d5a73 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/terms.txt +++ b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/clean/terms.txt @@ -164,6 +164,7 @@ dnet:publication_resource @=@ dnet:publication_resource @=@ 0030 @=@ Sound dnet:publication_resource @=@ dnet:publication_resource @=@ 0044 @=@ Thesis dnet:publication_resource @=@ dnet:publication_resource @=@ 0000 @=@ Unknown dnet:publication_resource @=@ dnet:publication_resource @=@ 0042 @=@ Virtual Appliance +dnet:publication_resource @=@ dnet:publication_resource @=@ 0048 @=@ Research Object ec:funding_typologies @=@ ec:funding_typologies @=@ ec:frameworkprogram @=@ frameworkprogram ec:funding_typologies @=@ ec:funding_typologies @=@ ec:program @=@ program ec:funding_typologies @=@ ec:funding_typologies @=@ ec:specificprogram @=@ specificprogram 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 new file mode 100644 index 0000000000..ca3ebe6c2c --- /dev/null +++ b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/rohub.xml @@ -0,0 +1,103 @@ + + +
+ eosca5322f5f::4dd1aaf93ae136b65dc9ee4e6f76eac9 + 53aa90bf-c593-4e6d-923f-d4711ac4b0e1 + 2022-05-25T15:35:48.262Z + eosca5322f5f + 53aa90bf-c593-4e6d-923f-d4711ac4b0e1 + 2022-05-25T15:35:38Z + rohub_data + ro-crate_data + 2022-05-25T15:36:11.094Z +
+ + + https://w3id.org/ro-id/53aa90bf-c593-4e6d-923f-d4711ac4b0e1 + + http://api.rohub.org/api/ros/53aa90bf-c593-4e6d-923f-d4711ac4b0e1/ + + + + https://github.com/NordicESMhub/RELIANCE/blob/main/content/science/notebooks/air_quality_lockdown.ipynb + + https://github.com/NordicESMhub/RELIANCE/blob/main/content/science/notebooks/air_quality_lockdown.ipynb + + https://nordicesmhub.github.io/RELIANCE/science/notebooks/air_quality_lockdown.html + + https://nordicesmhub.github.io/RELIANCE/science/notebooks/air_quality_lockdown.html + + + + + Anne Fouilloux + + + + + 2021-12-19T21:18:33Z + + + The COVID-19 pandemic has led to significant reductions in economic activity, especially during lockdowns. Several studies has shown that the concentration of nitrogen dioxyde and particulate matter levels have reduced during lockdown events. Reductions in transportation sector emissions are most likely largely responsible for the NO2 anomalies. In this study, we analyze the impact of lockdown events on the air quality using data from Copernicus Atmosphere Monitoring Service over Europe and at selected locations. + + + + European Commission + 10.13039/501100000781 + 101017502 + Research Lifecycle Management for Earth Science Communities and Copernicus Users + + + MIT License + University of Oslo + 2021 + RO-crate + + open access + + + 11.971 MB + + + Applied sciences + Meteorology + EOSC::RO-crate + + + Impact of the Covid-19 Lockdown on Air quality over Europe + + + https://w3id.org/ro-id/53aa90bf-c593-4e6d-923f-d4711ac4b0e1 + 0048 + + OPEN + https://opensource.org/licenses/MIT + und + + + + + + + https%3A%2F%2Fapi.rohub.org%2Fapi%2Foai2d%2F + 53aa90bf-c593-4e6d-923f-d4711ac4b0e1 + 2022-05-25T15:35:38Z + + + + + false + false + 0.9 + + + + +
\ No newline at end of file