Commit 2a6b61a8 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

424: Search result download not functional (OPENED)

Task-Url: #424
parent 01d93121
Pipeline #23422 passed with stage
in 29 seconds
...@@ -17,4 +17,5 @@ public class PathsConfigProperties { ...@@ -17,4 +17,5 @@ public class PathsConfigProperties {
private String downloads; private String downloads;
private String parseErrors; private String parseErrors;
private String mappingLogs; private String mappingLogs;
private String temporary;
} }
\ No newline at end of file
...@@ -76,6 +76,9 @@ public class MainConfig extends MainConfigProperties { ...@@ -76,6 +76,9 @@ public class MainConfig extends MainConfigProperties {
if (paths.getDownloads()==null) { if (paths.getDownloads()==null) {
paths.setDownloads(this.setupPath(paths.getData(), "downloads")); paths.setDownloads(this.setupPath(paths.getData(), "downloads"));
} }
if (paths.getTemporary()==null) {
paths.setTemporary(this.setupPath(paths.getData(), "temp"));
}
if (images==null) { if (images==null) {
......
package eu.dariah.de.search.config; package eu.dariah.de.search.config;
import java.io.File; import java.io.File;
import java.nio.file.Paths;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -33,6 +34,7 @@ import de.unibamberg.minf.gtf.extensions.vocabulary.commands.VocabularyCommandsD ...@@ -33,6 +34,7 @@ import de.unibamberg.minf.gtf.extensions.vocabulary.commands.VocabularyCommandsD
import de.unibamberg.minf.gtf.extensions.wiki.commands.WikiCommandsDispatcher; import de.unibamberg.minf.gtf.extensions.wiki.commands.WikiCommandsDispatcher;
import de.unibamberg.minf.gtf.transformation.processing.GlobalCommandDispatcher; import de.unibamberg.minf.gtf.transformation.processing.GlobalCommandDispatcher;
import de.unibamberg.minf.gtf.vocabulary.VocabularyEngine; import de.unibamberg.minf.gtf.vocabulary.VocabularyEngine;
import de.unibamberg.minf.processing.output.xml.XmlOutputService;
import eu.dariah.de.search.config.nested.FileConfigProperties; import eu.dariah.de.search.config.nested.FileConfigProperties;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -43,6 +45,7 @@ import lombok.EqualsAndHashCode; ...@@ -43,6 +45,7 @@ import lombok.EqualsAndHashCode;
@ConfigurationProperties(prefix = "processing") @ConfigurationProperties(prefix = "processing")
public class ProcessingConfig extends ProcessingConfigProperties { public class ProcessingConfig extends ProcessingConfigProperties {
@Autowired private MainConfigProperties mainConfig; @Autowired private MainConfigProperties mainConfig;
@Autowired private ApiConfigProperties apiConfig;
@PostConstruct @PostConstruct
public void completeConfiguration() { public void completeConfiguration() {
...@@ -168,4 +171,12 @@ public class ProcessingConfig extends ProcessingConfigProperties { ...@@ -168,4 +171,12 @@ public class ProcessingConfig extends ProcessingConfigProperties {
return new RestTemplate(); return new RestTemplate();
} }
@Bean
@Scope("prototype")
public XmlOutputService xmlOutputService() {
XmlOutputService xmlOutputService = new XmlOutputService();
xmlOutputService.setOutputBaseDirectory(mainConfig.getPaths().getTemporary());
xmlOutputService.setExtensionNamespacePattern(Paths.get(apiConfig.getDme().getBaseUrl(), "schema/%s").toString());
return xmlOutputService;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment