From 49e42e9cba3917726232fcd262b1bdca37d573cd Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 28 Jul 2022 17:30:44 +0300 Subject: [PATCH] h2020_dataset.docx & WordBuilder.java & DataManagementPlanManager.java & DatasetManager.java: Updated footer of Dataset template to set title of DMP and Dataset. --- .../managers/DataManagementPlanManager.java | 2 +- .../eudat/logic/managers/DatasetManager.java | 2 +- .../utilities/documents/word/WordBuilder.java | 6 +++++- .../resources/documents/h2020_dataset.docx | Bin 20313 -> 20315 bytes 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java index e3ad07e0e..f492e2a9d 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java @@ -1368,7 +1368,7 @@ public class DataManagementPlanManager { document.removeBodyElement(powered_pos + 1); } - wordBuilder.fillFooter(dmpEntity, document, false); + wordBuilder.fillFooter(dmpEntity, null, document, false); String fileName = "DMP_" + dmpEntity.getGrant().getLabel(); if (versioned) { diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java index 145439921..20dd25807 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java @@ -407,7 +407,7 @@ public class DatasetManager { throw new UnauthorisedException(); wordBuilder.fillFirstPage(dmpEntity, datasetEntity, document); - wordBuilder.fillFooter(dmpEntity, document, true); + wordBuilder.fillFooter(dmpEntity, datasetEntity, document, true); int powered_pos = wordBuilder.findPosOfPoweredBy(document); XWPFParagraph powered_par = null; diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/utilities/documents/word/WordBuilder.java b/dmp-backend/web/src/main/java/eu/eudat/logic/utilities/documents/word/WordBuilder.java index bc92b70e1..0d34203a3 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/utilities/documents/word/WordBuilder.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/utilities/documents/word/WordBuilder.java @@ -770,7 +770,7 @@ public class WordBuilder { } } - public void fillFooter(DMP dmpEntity, XWPFDocument document, boolean isDataset) { + public void fillFooter(DMP dmpEntity, Dataset datasetEntity, XWPFDocument document, boolean isDataset) { document.getFooterList().forEach(xwpfFooter -> { List runs = xwpfFooter.getParagraphs().get(0).getRuns(); if(runs != null){ @@ -781,6 +781,10 @@ public class WordBuilder { text = text.replace("{ARGOS.DMP.TITLE}", dmpEntity.getLabel()); r.setText(text, 0); } + if(text.contains("{ARGOS.DATASET.TITLE}") && datasetEntity != null){ + text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel()); + r.setText(text, 0); + } if(text.contains("{ARGOS.DMP.LICENSE}")){ try{ Map license = ((Map) mapper.readValue(dmpEntity.getExtraProperties(), Map.class).get("license")); diff --git a/dmp-backend/web/src/main/resources/documents/h2020_dataset.docx b/dmp-backend/web/src/main/resources/documents/h2020_dataset.docx index 1270a2895c87afa878a63381d0dbdd71ccec822e..4963e3c18449df7981886f8ea392fecc25523d39 100644 GIT binary patch delta 3578 zcmZu!2T)Vp5)KIoT|y_603s!!igc-wp3tN#H6Tp`h|)xjqC~nvAfWUjh=53wCLk(; zNN>`c6j2~Fl`0SNzxhYsygPGe_uji__q%&`XTLL&K{b{^#bkyCQL_VRX=wr3M*C$< za4OJ|BuZ2LqDXPz=&`H-gP15EDmbWb|6@S{pTd7Kc_#~fy~zfu{25u{xl9u)zm+*#y|h^jQ{b#~J!MV3FyN}-6!yiMTfoFlevVmi zE@A11;&KCkU&cK)@4>fdqlJC>@!KL&Ry7 z7{~a;UWGDw!Z+Mf=lDuKtBEdMzVc9CWO^iuh=;JPCq4qc6A6nKY<)qK!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