h2020.docx & WordBuilder.java: Updated h2020.docx DMP template and added export of DMP description.
(cherry picked from commit 28c1c9b71d
)
This commit is contained in:
parent
7185b5d117
commit
13e62fd409
|
@ -941,10 +941,14 @@ public class WordBuilder {
|
|||
} else if(datasetEntity != null && text.contains("{ARGOS.DATASET.TITLE}")) {
|
||||
text = text.replace("{ARGOS.DATASET.TITLE}", datasetEntity.getLabel());
|
||||
r.setText(text, 0);
|
||||
} else if(datasetEntity != null && text.contains("{ARGOS.DATASET.DESCRIPTION}")) {
|
||||
} else if((dmpEntity != null && text.contains("{ARGOS.DMP.DESCRIPTION}")) || (datasetEntity != null && text.contains("{ARGOS.DATASET.DESCRIPTION}"))) {
|
||||
descrParPos = parPos;
|
||||
descrPar = p;
|
||||
text = text.replace("{ARGOS.DATASET.DESCRIPTION}", "");
|
||||
if(dmpEntity != null) {
|
||||
text = text.replace("{ARGOS.DMP.DESCRIPTION}", "");
|
||||
} else {
|
||||
text = text.replace("{ARGOS.DATASET.DESCRIPTION}", "");
|
||||
}
|
||||
r.setText(text, 0);
|
||||
} else if(text.equals("{ARGOS.DMP.RESEARCHERS}")) {
|
||||
String researchersNames = "";
|
||||
|
@ -974,7 +978,14 @@ public class WordBuilder {
|
|||
}
|
||||
parPos++;
|
||||
}
|
||||
if(descrParPos != -1 && datasetEntity.getDescription() != null) {
|
||||
if(descrParPos != -1 && dmpEntity!=null && dmpEntity.getDescription() != null) {
|
||||
XmlCursor cursor = descrPar.getCTP().newCursor();
|
||||
cursor.toNextSibling();
|
||||
Document htmlDoc = Jsoup.parse(((String)dmpEntity.getDescription()).replaceAll("\n", "<br>"));
|
||||
HtmlToWorldBuilder htmlToWorldBuilder = new HtmlToWorldBuilder(descrPar, 0, cursor);
|
||||
NodeTraversor.traverse(htmlToWorldBuilder, htmlDoc);
|
||||
}
|
||||
if(descrParPos != -1 && datasetEntity != null && datasetEntity.getDescription() != null) {
|
||||
XmlCursor cursor = descrPar.getCTP().newCursor();
|
||||
cursor.toNextSibling();
|
||||
Document htmlDoc = Jsoup.parse(((String)datasetEntity.getDescription()).replaceAll("\n", "<br>"));
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue