From f25407bbe24016355e782b1d5d6e7ccb6e23be97 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Fri, 11 Mar 2022 09:32:42 +0100 Subject: [PATCH 1/2] added mapping for datasource consent fields to integrate them in the graph --- .../graph/raw/MigrateDbEntitiesApplication.java | 3 +++ .../dnetlib/dhp/oa/graph/sql/queryDatasources.sql | 3 +++ .../raw/MigrateDbEntitiesApplicationTest.java | 3 +++ .../oa/graph/raw/datasources_resultset_entry.json | 15 +++++++++++++++ pom.xml | 2 +- 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java index e453f79186..1f8c23ac36 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java +++ b/dhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplication.java @@ -309,6 +309,9 @@ public class MigrateDbEntitiesApplication extends AbstractMigrationApplication i ds.setThematic(rs.getBoolean("thematic")); ds.setKnowledgegraph(rs.getBoolean("knowledgegraph")); ds.setContentpolicies(prepareListOfQualifiers(rs.getArray("contentpolicies"))); + ds.setConsenttermsofuse(rs.getBoolean("consenttermsofuse")); + ds.setFulltextdownload(rs.getBoolean("fulltextdownload")); + ds.setConsenttermsofusedate(rs.getDate("consenttermsofusedate").toString()); return Arrays.asList(ds); } catch (final Exception e) { diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryDatasources.sql b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryDatasources.sql index 98092e8825..2623c65c4e 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryDatasources.sql +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryDatasources.sql @@ -89,6 +89,9 @@ SELECT d.issn AS issnPrinted, d.eissn AS issnOnline, d.lissn AS issnLinking, + d.consenttermsofuse AS consenttermsofuse, + d.fulltextdownload AS fulltextdownload, + d.consenttermsofusedate AS consenttermsofusedate, de.jurisdiction||'@@@eosc:jurisdictions' AS jurisdiction, de.thematic AS thematic, de.knowledge_graph AS knowledgegraph, diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplicationTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplicationTest.java index b65bd9fd80..05ae5be74a 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplicationTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/raw/MigrateDbEntitiesApplicationTest.java @@ -100,6 +100,9 @@ public class MigrateDbEntitiesApplicationTest { assertEquals("Journal article", ds.getContentpolicies().get(0).getClassid()); assertEquals("eosc:contentpolicies", ds.getContentpolicies().get(0).getSchemeid()); + assertEquals(true, ds.getConsenttermsofuse()); + assertEquals(true, ds.getFulltextdownload()); + assertEquals("2022-03-11", ds.getConsenttermsofusedate()); } @Test diff --git a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/datasources_resultset_entry.json b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/datasources_resultset_entry.json index 42b140306e..11b884cde2 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/datasources_resultset_entry.json +++ b/dhp-workflows/dhp-graph-mapper/src/test/resources/eu/dnetlib/dhp/oa/graph/raw/datasources_resultset_entry.json @@ -268,5 +268,20 @@ "value": [ "Journal article@@@eosc:contentpolicies" ] + }, + { + "field": "consenttermsofuse", + "type": "boolean", + "value": true + }, + { + "field": "fulltextdownload", + "type": "boolean", + "value": true + }, + { + "field": "consenttermsofusedate", + "type": "date", + "value": "2022-03-11" } ] diff --git a/pom.xml b/pom.xml index 603a4cf1e1..7a20a16525 100644 --- a/pom.xml +++ b/pom.xml @@ -797,7 +797,7 @@ 3.3.3 3.4.2 [2.12,3.0) - [2.10.29] + [2.10.30-SNAPSHOT] [4.0.3] [6.0.5] [3.1.6] From 3610f1749ab7896cc72f131236a3455635200c65 Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Mon, 28 Mar 2022 09:20:27 +0200 Subject: [PATCH 2/2] merged pom.xml from beta branch --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7a20a16525..45265d5baf 100644 --- a/pom.xml +++ b/pom.xml @@ -797,11 +797,11 @@ 3.3.3 3.4.2 [2.12,3.0) - [2.10.30-SNAPSHOT] + [2.10.31] [4.0.3] [6.0.5] [3.1.6] - [4.1.7] + [4.1.12] [2.6.1] 7.5.0 4.7.2