sbmlteam / libCombine

a C++ library for working with the COMBINE Archive format
BSD 2-Clause "Simplified" License
8 stars 5 forks source link

Setting description/metadata on entries not working #20

Closed matthiaskoenig closed 7 years ago

matthiaskoenig commented 7 years ago

Somehow setting descriptions on entries is not working. See the added example in https://github.com/sbmlteam/libCombine/pull/19 Which gives the following output:

********************************************************************************
Create archive
********************************************************************************
Archive created: testdata/out.omex
********************************************************************************
Print archive: testdata/out.omex
********************************************************************************
  metadata for '.':
     Created : 2017-09-15T16:44:25Z
     Modified : 2017-09-15T16:44:25Z
     # Creators: 1
       Frank Bergmann
Num Entries: 1
 0: location: ./models/model.xml format: http://identifiers.org/combine.specifications/sbml
  no metadata for './models/model.xml'

I am trying to set the description on

"./models/model.xml"

But somehow no metadata is set. Setting metadata works on '.', but somehow not on other locations.

fbergmann commented 7 years ago

The problem is that the second description was considered empty, since it had no creator set. This when the archive was created it was discarded. Since I'm now allowing to read those, as was needed to read the JWS metadata from issue #22, this will now work as well.

Note that i changed the path back to save the file in the current directory, as saving it to a nonexisting subdirectory will fail.