keeps / roda-in

Tool to create Submission Information Packages (SIP)
http://rodain.roda-community.org
GNU Lesser General Public License v3.0
23 stars 11 forks source link

E-ARK specific sip - tag missing #327

Closed mezeijozsef closed 5 years ago

mezeijozsef commented 6 years ago

According to E-ARK specification MIMETYPE tag should be in metadata.xml file, but it is not if I place a .siard file is inside the SIP.

mezeijozsef commented 6 years ago

correction:

should be in METS.xml file,

hsilva-keep commented 6 years ago

@mezeijozsef First of all thank you for your feedback.

Now answering to you: RODA-in and underneath library RODA Commons IP tries its best to defined the mimetype of the files being encoded in the package. It does that using Java code, for simplicity & performance matters, which is not perfect as you have discovered (by not setting .siard file mimetype; in my case, it sets it to 'application/zip' ; for future reference, here's the direct pointer to the code handling that logic: https://github.com/keeps/commons-ip/blob/1_x/src/main/java/org/roda_project/commons_ip/utils/METSUtils.java#L151).

As an improvement, we will test mimetype detected by Java code and, if none has been detected, we'll set it to 'application/octet-stream' at least to comply with E-ARK Common Specification for Information Packages.