Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Islandora Find & Replace
We can use the Islandora Find & Replace module to add, replace, or remove text from objects' MODS records and other datastreams.
In several of our collections, the rightsstatements.org URI in the MODS element was missing its trailing slash, preventing the URI from properly resolving.
We used Find & Replace to insert this trailing slash across these collections, and then regenerated the Dublin Core datastream using Islandora Batch Derivative Trigger.
Go to the Islandora menu, then Islandora Utility Modules > Find & Replace.
Select the Content Model of the objects you're dealing with (probably Islandora Large Image Content Model).
You can limit the search to a specific Collection if you wish.
Datastream ID should be MODS.
Make sure your Search text is specific enough that you don't get unexpected hits.
Similarly, be careful with your replacement text.
Click Find objects.
You'll get a page of search results showing the title of each object. You'll probably want to select all; then click Replace String.
You'll see a progress bar and eventually a message that the replace is complete.
View the MODS datastreams for a few objects to confirm the replace worked as expected.
Now that the MODS datastream has been updated, you'll want to regenerate the Dublin Core datastream.
For each collection in question, navigate to the collection, click Manage > Collection, then Regenerate child DC metadata on the left sidebar. Then click Regenerate DC metadata for all collection objects.
Again, check to make sure this worked as expected by viewing a sample of object DC datastreams.