File tree Expand file tree Collapse file tree
server/src/main/kotlin/org/ivdnt/galahad/export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import org.ivdnt.galahad.jobs.Job
1212import org.ivdnt.galahad.taggers.Tagger
1313import org.ivdnt.galahad.util.FileMapper
1414import org.ivdnt.galahad.util.createZipFile
15+ import org.ivdnt.galahad.util.withoutFormatExt
1516import java.io.OutputStream
1617
1718class CorpusExport private constructor(
@@ -55,7 +56,10 @@ class CorpusExport private constructor(
5556 */
5657 fun export (out : OutputStream ) {
5758 val docs = corpus.documents.readAll().filter { DocumentExport .create(this , it).layer != Layer .EMPTY }
58- val seq: Sequence <FileMapper > = docs.asSequence().map { doc -> doc.name to { out -> formatMapper(doc, out ) } }
59+ val seq: Sequence <FileMapper > = docs.asSequence().map { doc ->
60+ val fileName = doc.uploadedFile.withoutFormatExt + " ." + format.extension
61+ fileName to { out -> formatMapper(doc,out ) }
62+ }
5963 val seqCmdi: Sequence <FileMapper > = docs.asSequence().map { doc ->
6064 " metadata/CMDI-${doc.uploadedFile} .xml" to { out ->
6165 DocumentExport .create(
You can’t perform that action at this time.
0 commit comments