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

Catalog configurations without mappingFiles parameter are not converted #5382

Closed
solth opened this issue Oct 10, 2022 · 0 comments · Fixed by #5388
Closed

Catalog configurations without mappingFiles parameter are not converted #5382

solth opened this issue Oct 10, 2022 · 0 comments · Fixed by #5388
Assignees
Labels

Comments

@solth
Copy link
Member

solth commented Oct 10, 2022

Describe the bug
#5293 removed metadata format specific implementations of the SchemaConverterInterface. That left XMLSchemaConverter.java as the only schema converter currently available. The class contains a check for "supported source metadata formats". That check was originally meant to enable catalog configurations in kitodo_opac.xml for specific metadata formats like MODS or MARCXML without explicitly configuring special mapping files. These configurations would instead use default mapping files for those formats when no mappingFiles element was found in a catalog configuration in kitodo_opac.xml.

#5038 replaced the configurations in kitodo_opac.xml with the new ImportConfiguration class. Mapping files with specific metadata input and output formats are now mandatory with this class, so the case described above cannot occur anymore. The check for supported metadata formats is already done when saving the import configuration itself and falsely prevents catalog configurations without mappingFiles element in kitodo_opac.xml to be converted to new ImportConfiguration instances with the error message Missing mandatory XML element "mappingFiles"

Instead, the check for the mappingFiles element during the conversion of kitodo_opac.xml entries to new ImportConfiguration instances should add default mapping files instead of leading to an conversion error.

To Reproduce
Steps to reproduce the behavior:

  1. Convert a kitodo_opac.xml configuration file that contains a catalog configuration without mappingFiles element
  2. The conversion will fail with the error message Mandatory configuration "mappingFiles" is missing

Expected behavior
The conversion should add default mapping files to catalog configurations in kitodo_opac.xml that do not contain a mappingFiles element instead of

Release
3.4.4-SNAPSHOT (Commit b65bd96)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant