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

Issue 439 #440

Merged
merged 3 commits into from
Oct 2, 2017
Merged

Issue 439 #440

merged 3 commits into from
Oct 2, 2017

Conversation

mjordan
Copy link
Collaborator

@mjordan mjordan commented Sep 28, 2017

Github issue: (#439)

What does this Pull Request do?

Adds a MODS metadata parser for OAI-PMH toolchains.

What's new?

Adds class src/metadataparsers/mods/OaiToMods.php. During development I found another issue which are not directly related to this new class but that I would like to include in this PR since it will affect the ability to test the new class:

  • a bug in the OaipmhIslandoraObj.php filegetter that caused MIK to fail when the OAI endpoint contained an eplicit port number

How should this be tested?

A smoketest is required since there are no PHPUnit tests for this change.

Reproducing the problems

  • Using the .ini file attached below, configure an OAI-PMH job that harvests from a collection on a Vagrant (e.g., host is http://localhost:8000).
  • MIK will fail. Two specific things to look for in mik.log:
    • Your MIK log will contain HTTP "Name or service unknown" errors, since localhost8000 is not valid hostname. This failure happens when MIK attempts to download the OBJ.
    • The metadata logged in mik.log will be MODS, despite the .ini configuration setting [METADATA_PARSER] class = dc\OaiToDc

Confirming the fix

  • Check out the issue-439 branch.
  • run composer dump-autoload
  • Delete the MIK output and temp directories populated during replicating the problem.
  • Rerun MIK using the same configuration file as above, after swapping the [METADATA_PARSER]class to use mods\OaiToMods.
  • Your MIK log should be clean, and the XML files in the output directory should be MODS.

Additional Notes

The wiki entries of the OAI-PMH toolchains will need to be updated to indicate how MODS can be harvested.

Interested parties

@MarcusBarnes. @bondjimbond used the OAI toolchain frequently and may want to smoketest.

issue-439.ini.txt

@MarcusBarnes
Copy link
Owner

Smoketest ran as expected. Reminder that we'll have to update the wiki entries of the OAI-PMH toolchains to indicate how MODS can be harvested.

@mjordan
Copy link
Collaborator Author

mjordan commented Oct 3, 2017

@MarcusBarnes I've updated all but the OJS OAI toolchain to include the new MODS functionality. OJS doesn't support MODS.

Mind if I link the "Toolchain: OAI PMH for Islandora repositories" from the wiki table of contents? @flummingbird noted in #432 that it isn't linked, and now that we have a real application for it, it might as well be.

@MarcusBarnes
Copy link
Owner

Please link as appropriate. Thanks!

@MarcusBarnes MarcusBarnes deleted the issue-439 branch October 3, 2017 13:32
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.

2 participants