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 config importer #5313

Merged
merged 17 commits into from
Oct 6, 2022
Merged

Conversation

solth
Copy link
Member

@solth solth commented Aug 21, 2022

This adds an catalog configuration importer that transforms opac configurations from existing kitodo_opac.xml files into new ImportConfiguration objects. Also creates corresponding MappingFile objects where needed.

Fixes #5224
Fixes #5262

Edit: this PR should be merged after #5293!

@solth solth mentioned this pull request Aug 22, 2022
@solth solth marked this pull request as ready for review August 23, 2022 13:42
@solth solth force-pushed the import-config-importer branch 3 times, most recently from ae5fc3d to 7b33e1e Compare August 29, 2022 10:53
Copy link
Collaborator

@markusweigelt markusweigelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just went through the code with these changes. Now follows the test in Kitodo.Production.

Kitodo-API/src/main/java/org/kitodo/config/OPACConfig.java Outdated Show resolved Hide resolved
// Find mapping file object by filename
for (MappingFile currentFile : allMappingFiles) {
if (currentFile.getFile().equals(filename)) {
mappingFile = currentFile;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be reduced when name of item variable is directly so designated.

@markusweigelt
Copy link
Collaborator

Import works well except for the description which is not imported. Otherwise, the imported catalogs seem to have all the search fields and settings as in the XML.

In general, I think it would be great to have a general documentation with a hint to migrate the XML or to extend or adapt the existing one.

In perspective the documentation should be updated in a PR. But for that we first need a useful and complete user documentation. :-/

Copy link
Collaborator

@markusweigelt markusweigelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation thx! :)

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

Successfully merging this pull request may close these issues.

Remove catalog configurations from "kitodo_opac.xml" Importer for kitodo_opac.xml
2 participants