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

MODS validation on import #7

Open
bryjbrown opened this issue Jan 25, 2018 · 6 comments
Open

MODS validation on import #7

bryjbrown opened this issue Jan 25, 2018 · 6 comments

Comments

@bryjbrown
Copy link
Contributor

Lots of people are going to want to use this module specifically for batch metadata cleanup. Checking for well-formedness & validity on MODS datastream replacements would really save a lot of people from shooting themselves in the foot.

The best time to do this would be after they upload the file and the module unzips it into a tmp directory, then you could show which files have validity errors on the next screen and not allow them to proceed. I think this means checking somewhere in here:
https://github.com/ulsdevteam/islandora_datastreams_io/blob/master/includes/utilities.inc#L19-L34

I will take a crack at making a PR that implements these checks, but any advice that could be given about doing this would be appreciated! 👍

@wgilling
Copy link
Contributor

Bryan, I love your idea. I was just working on a couple new functions for this module last week. I will email you directly so that we can have a phone call to talk about your idea - and where to put any code.

@wgilling wgilling reopened this Jan 25, 2018
@bryjbrown
Copy link
Contributor Author

So... the copy of the module with all my annotation in it was living in a VM that I destroyed by accident. Instead, I'm just going to link to lines in my copy of the module so they dont break if you add new code upstream.

MODS validation could be hooked in here:
https://github.com/fsulib/islandora_datastreams_io/blob/master/includes/import.form.inc#L202-L211

MODS validation results could be built into what users see on the review screen here:
https://github.com/fsulib/islandora_datastreams_io/blob/master/includes/import.form.inc#L215-L220

I know there were more places where I thought code may need to be written (likely around the suppression of a "Finish" button if there were any invalid MODS records) but its not jumping out to me now. I'll take a fresh look in the morning and see if it speaks to me.

@wgilling
Copy link
Contributor

Thank you Bryan -- this will help.

Who hasn't destroyed a VM that had something on it they needed later?

@bryjbrown
Copy link
Contributor Author

One more thing thats come out of a meeting today with our local Florida Islandora community... when we build the validation check, it may be best to put the ACTUAL validation code inside of a hook, that way if an institution has a special flavor of MODS they want to validate against, or extra requirements (for instance, required elements), they can code this up into an extra module that implements said hook and they can do WHATEVER validation they want inside.

@bondjimbond
Copy link

Did this ever get anywhere? It would be a highly useful feature..

@wgilling
Copy link
Contributor

@bondjimbond I will try to get to this in a month or two - unless somebody else wants to claim dibs on coding it sooner.

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

No branches or pull requests

3 participants