Datasource consent fields #202

Merged
claudio.atzori merged 3 commits from datasource_pdf_consent into beta 2022-03-28 09:21:15 +02:00
4 changed files with 24 additions and 0 deletions

View File

@ -309,6 +309,9 @@ public class MigrateDbEntitiesApplication extends AbstractMigrationApplication i
ds.setThematic(rs.getBoolean("thematic")); ds.setThematic(rs.getBoolean("thematic"));
ds.setKnowledgegraph(rs.getBoolean("knowledgegraph")); ds.setKnowledgegraph(rs.getBoolean("knowledgegraph"));
ds.setContentpolicies(prepareListOfQualifiers(rs.getArray("contentpolicies"))); 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); return Arrays.asList(ds);
} catch (final Exception e) { } catch (final Exception e) {

View File

@ -89,6 +89,9 @@ SELECT
d.issn AS issnPrinted, d.issn AS issnPrinted,
d.eissn AS issnOnline, d.eissn AS issnOnline,
d.lissn AS issnLinking, d.lissn AS issnLinking,
d.consenttermsofuse AS consenttermsofuse,
d.fulltextdownload AS fulltextdownload,
d.consenttermsofusedate AS consenttermsofusedate,
de.jurisdiction||'@@@eosc:jurisdictions' AS jurisdiction, de.jurisdiction||'@@@eosc:jurisdictions' AS jurisdiction,
de.thematic AS thematic, de.thematic AS thematic,
de.knowledge_graph AS knowledgegraph, de.knowledge_graph AS knowledgegraph,

View File

@ -100,6 +100,9 @@ public class MigrateDbEntitiesApplicationTest {
assertEquals("Journal article", ds.getContentpolicies().get(0).getClassid()); assertEquals("Journal article", ds.getContentpolicies().get(0).getClassid());
assertEquals("eosc:contentpolicies", ds.getContentpolicies().get(0).getSchemeid()); assertEquals("eosc:contentpolicies", ds.getContentpolicies().get(0).getSchemeid());
assertEquals(true, ds.getConsenttermsofuse());
assertEquals(true, ds.getFulltextdownload());
assertEquals("2022-03-11", ds.getConsenttermsofusedate());
} }
@Test @Test

View File

@ -268,5 +268,20 @@
"value": [ "value": [
"Journal article@@@eosc:contentpolicies" "Journal article@@@eosc:contentpolicies"
] ]
},
{
"field": "consenttermsofuse",
"type": "boolean",
"value": true
},
{
"field": "fulltextdownload",
"type": "boolean",
"value": true
},
{
"field": "consenttermsofusedate",
"type": "date",
"value": "2022-03-11"
} }
] ]