Adds title to dataset export document.
This commit is contained in:
parent
0d73fb2a8b
commit
aadc212002
|
@ -16,6 +16,7 @@ import eu.eudat.logic.services.ApiContext;
|
|||
import eu.eudat.logic.services.forms.VisibilityRuleService;
|
||||
import eu.eudat.logic.services.operations.DatabaseRepository;
|
||||
import eu.eudat.logic.utilities.documents.helpers.FileEnvelope;
|
||||
import eu.eudat.logic.utilities.documents.types.ParagraphStyle;
|
||||
import eu.eudat.logic.utilities.documents.word.WordBuilder;
|
||||
import eu.eudat.logic.utilities.documents.xml.ExportXmlBuilder;
|
||||
import eu.eudat.models.HintedModelFactory;
|
||||
|
@ -39,6 +40,7 @@ import org.springframework.web.client.RestTemplate;
|
|||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import java.io.*;
|
||||
import java.math.BigInteger;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
@ -194,6 +196,7 @@ public class DatasetManager {
|
|||
InputStream is = new URL(Paths.get(fileUrl).toUri().toURL().toString()).openStream();
|
||||
XWPFDocument document = new XWPFDocument(is);
|
||||
eu.eudat.data.entities.Dataset datasetEntity = databaseRepository.getDatasetDao().find(UUID.fromString(id), HintedModelFactory.getHint(DatasetWizardModel.class));
|
||||
wordBuilder.addParagraphContent(datasetEntity.getLabel(), document, ParagraphStyle.TITLE, BigInteger.ZERO);
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
if (datasetEntity.getProperties() != null) {
|
||||
JSONObject jobject = new JSONObject(datasetEntity.getProperties());
|
||||
|
|
Loading…
Reference in New Issue