added mapping for datasource consent fields to integrate them in the graph

This commit is contained in:
Claudio Atzori 2022-03-11 09:32:42 +01:00
parent 9f3036c847
commit f25407bbe2
5 changed files with 25 additions and 1 deletions

View File

@ -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) {

View File

@ -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,

View File

@ -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

View File

@ -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"
}
]

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.10.29]</dhp-schemas.version>
<dhp-schemas.version>[2.10.30-SNAPSHOT]</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>