sbmlteam / libCombine

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

Is there an error log for OMEX meta files? How can errors be detected? #38

Open jonrkarr opened 3 years ago

jonrkarr commented 3 years ago

Attached is an OMEX archive with a malformed OMEX meta file (metadata.rdf).

How can errors in the OMEX meta file be found?

import libcombine
archive = libcombine.CombineArchive()
assert archive.initializeFromArchive('tests/fixtures/Ciliberto-J-Cell-Biol-2003-morphogenesis-checkpoint.omex')

md = archive.getMetadataForLocation('./BIOMD0000000297_url.xml')
creator = md.getCreator()
print(creator.getFamilyName())
fbergmann commented 3 years ago

There is only very limited support for the metadata element. It is expected to be precisely in the format as outlined in the archive specification. You can check by calling md.isEmpty(), which will likely be true, if the format is not of the assumed format. What you can do is to use the skipOmex flag in initializeFromArchive, which will stop all metadata processing.