From b66f930466f7552f5b98fd40a58315c24bb355b0 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 24 Sep 2020 15:16:56 +0200 Subject: [PATCH] Added optionl1 and optional2 information to the files red from the db. Optional1 contains the topic code and optional2 contains the topic description --- .../dhp/actionmanager/project/ReadProjectsFromDB.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/project/ReadProjectsFromDB.java b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/project/ReadProjectsFromDB.java index 2d541d2f9..e6e2c95c7 100644 --- a/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/project/ReadProjectsFromDB.java +++ b/dhp-workflows/dhp-aggregation/src/main/java/eu/dnetlib/dhp/actionmanager/project/ReadProjectsFromDB.java @@ -33,7 +33,7 @@ public class ReadProjectsFromDB implements Closeable { private final BufferedWriter writer; private final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final static String query = "SELECT code " + + private final static String query = "SELECT code , optional1, optional2" + "from projects where id like 'corda__h2020%' "; public static void main(final String[] args) throws Exception { @@ -72,7 +72,8 @@ public class ReadProjectsFromDB implements Closeable { try { ProjectSubset p = new ProjectSubset(); p.setCode(rs.getString("code")); - + p.setTopiccode(rs.getString("optional1")); + p.setTopicdescription(rs.getString("optional2")); return Arrays.asList(p); } catch (final Exception e) {