Skip to content

Exception on incomplete <mets:file> #25

@rsteph-de

Description

@rsteph-de

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");
                }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions