Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on incomplete <mets:file> #25

Open
rsteph-de opened this issue Sep 1, 2022 · 0 comments
Open

Exception on incomplete <mets:file> #25

rsteph-de opened this issue Sep 1, 2022 · 0 comments
Labels

Comments

@rsteph-de
Copy link
Member

rsteph-de commented Sep 1, 2022

Is the MIMETYPE attribute realy mandatory for <mets:file>

java.lang.IllegalArgumentException: MIMETYPE or ID of a mets:file must not be null
	at org.mycore.mets.model.Mets.createFileSec(Mets.java:420)
	at org.mycore.mets.model.Mets.<init>(Mets.java:140)
	at org.mycore.mets.iiif.MCRMetsMods2IIIFConverter.<init>(MCRMetsMods2IIIFConverter.java:89)

from org.mycore.mets.model.Mets:

 for (Element aFile : filesXP.evaluate(aFileGroup)) {
                String id = aFile.getAttributeValue("ID");
                String mimeType = aFile.getAttributeValue("MIMETYPE");
                if (id == null || mimeType == null) {
                    throw new IllegalArgumentException("MIMETYPE or ID of a mets:file must not be null");
                }
  }
@rsteph-de rsteph-de added the bug label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant