keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

validator - file extension error #431

Open Laurira opened 4 years ago

Laurira commented 4 years ago

DBPTK thinks that I do not have .siard extension and gives [ERROR]. G_4.1-5: [ERROR] : The ZIP archive must have the file extension .siard Construction of the SIARD archive file [FAILED]

Doesn't it consider uppercase .SIARD extension?

image

hmiguim commented 4 years ago

We follow the SIARD specification that states:

G_4.1-5 The ZIP archive has the file extension “.siard”.

As it is, right now, we do the check for lowercase exclusive. We can extend the check to ignore the case.

PhillipTommerholt commented 4 years ago

This depends on the interpretation of the specification: image

Here it is in lower case - but does this imply that it must be in lower case? I am not 100% sure but if I have to pick one then I would say it must be in lower case. (This uncertainty should be a input to the specification itself.)

We have the same problem in Denmark where we have camelcase name requriements. For example our validator checks whether 'contextDocumentationIndex.xml' exist in a given folder. If there is a file called 'ContextDocumentationIndex.xml' then our validator throws an error and states that the file 'contextDocumentationIndex.xml' does not exist. This causes a support burden from our side, where users report that our validator is wrong. The best solution would be to:

1) Read and transform all files in this folder to upper case in a list

2) does 'CONTEXTDOCUMENTATIONINDEX.XML' exist in the list? 2a) if no, throw the error that the file does not exist and move on 2b) if yes, go to check 3

3) does 'contextDocumentationIndex.xml' exist in the folder? 3a) if no, throw the error that the file does not have the right upper/lower case naming and move on 3b) if yes, everything is splendid: move on