korpling / pepper

A highly extensible plattform for conversion and manipulation of linguistic data between an unbound set of formats. Pepper can be used stand-alone as a command line interface, or be integrated as an API into other software products.
http://corpus-tools.org/pepper
Other
23 stars 3 forks source link

SaltXMLExporter does not persist document annotations #115

Closed sdruskat closed 6 years ago

sdruskat commented 6 years ago

This bug will affect any data that is not contained in SDocumentGraphs, i.e., annotations or meta annotations on corpora and documents.

The reason for this is that once the generic document metadata is added to PepperExporterImpl#sElementId2ResourceTable the table is not updated again via #exportCorpusStructure (source):

// create export URI
URI saltProjectURI = URI
     .createFileURI(this.getCorpusDesc().getCorpusPath().toFileString() + "/" + SaltUtil.FILE_SALT_PROJECT);
SaltUtil.saveSaltProject(saltProject, saltProjectURI);
super.start();

Cf. super.start().

Moving the call to super.start() to a position before the SaltProject is saved alleviates this issue as the identifier-resource table has then already been updated.