Restrict certain elements in OAI-PMH?

89 views
Skip to first unread message

Brandon Weigel

unread,
Nov 15, 2017, 10:48:44 AM11/15/17
to islandora
We have a site that has a large collection of digitized images, but has an unusual issue that we'd like to be able to address. They want to keep their donors in their metadata records, but suppress them from public view. 

This is easy enough to do in search and metadata display -- just don't include donors in the output. But since we want this content to be harvestable, we would like to be able to suppress any names with the roleTerm "donor" in our OAI feed.

I don't think this is possible to do out of the box. So my question to you all is:

1. Would this be relatively uncomplicated to accomplish?

2. Are there other Islandora users that desire this functionality?

Mark Jordan

unread,
Nov 15, 2017, 1:50:03 PM11/15/17
to isla...@googlegroups.com
Hi Brandon,

In the case you are describing, are the OAI requests for DC or MODS? If for MODS, applying an XSLT transform might do the trick, but if DC, then the MODS roleTerm info has already been stripped from the MODS to generate the DC. In other words, if serving up DC records, the OAI provider has no knowledge of the MODS (and therefore any roleTerm information) that the DC was originally generated from. Does that make sense or am I misunderstanding the problem?

Mark
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/7c3279ea-9d48-455a-857e-d65ceb2524de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Harrington

unread,
Nov 15, 2017, 2:26:51 PM11/15/17
to isla...@googlegroups.com

Hi Brandon,

 

Mark’s absolutely right that once the MODS has been transformed to DC, you lose the roleTerm and can’t filter.  Fortunately, in the OAI management interface, you can have the OAI provider use the MODS datastream and a custom XSLT to create the OAI_DC.  That means that you’ll have yet another XSLT to keep track of in the long term, but should solve your problem.  This feature has come in handy for us when we’ve run into aggregators with very specific metadata requirements that might not fit the default MODS->DC mapping.

 

I hope this helps,

 

Brian  

Brandon Weigel

unread,
Nov 15, 2017, 3:08:00 PM11/15/17
to islandora
Thanks, Brian and Mark. That's all good to know. I think a lot of OAI harvesting is DC, so a custom XSLT would probably do the trick in that case.

For MODS harvesting, is it any trickier? In admin/islandora/tools/islandora-oai/handler, would adding a custom mods-to-mods XSLT work if I selected it under "File to use for transforming mods"?

Mark Jordan

unread,
Nov 15, 2017, 3:29:58 PM11/15/17
to isla...@googlegroups.com

----- On Nov 15, 2017, at 12:08 PM, Brandon Weigel <jeanpau...@gmail.com> wrote:
Thanks, Brian and Mark. That's all good to know. I think a lot of OAI harvesting is DC, so a custom XSLT would probably do the trick in that case.
For MODS harvesting, is it any trickier? In admin/islandora/tools/islandora-oai/handler, would adding a custom mods-to-mods XSLT work if I selected it under "File to use for transforming mods"?

Should be same idea, but in that case your transform would just need to remove the offending nodes.

Gonna hijack the thread here for a minute. The problem with using XSLTs as they are currently implemented is that they are all or nothing. All OAI requests get the same response. Given the protocol's limitations and consumers' varying requirements, it would be useful to be able to reply to specific OAI requests with specific responses, or at least specific XML records. Jordan Dukart once suggested that a drupal_alter() on the outgoing XML would be useful. That's a great idea. I'll think about this a bit and then open a JIRA ticket where interested parties can discuss further.

Mark

Mark Jordan

unread,
Nov 15, 2017, 7:18:13 PM11/15/17
to isla...@googlegroups.com

----- On Nov 15, 2017, at 12:29 PM, Mark Jordan <mjo...@sfu.ca> wrote:

Given the protocol's limitations and consumers' varying requirements, it would be useful to be able to reply to specific OAI requests with specific responses, or at least specific XML records. Jordan Dukart once suggested that a drupal_alter() on the outgoing XML would be useful. That's a great idea. I'll think about this a bit and then open a JIRA ticket where interested parties can discuss further.
Discussion and additional use cases welcome.

Mark

dp...@metro.org

unread,
Nov 16, 2017, 1:36:09 PM11/16/17
to islandora
Brandon, Brian, and Mark, OAI allows you to create your own handler, which is always a good alternative especially if your use cases are not standard/more complex and those are quite easy to implement. We have this one which you can use as an example https://github.com/mnylc/islandora_esdn_oai

So maybe that last need/rule-based transformation need could be addressed by implementing a more complex "Pro" handler but keeping our old simple one around for existing smaller institutions?

Which reminds me (hijacking the hijacked thread) this here https://github.com/mnylc/islandora_oai/commit/600514c3b1f67606b732eb323f746d4dff39f462
is missing from the main module. Our OAI is not 100% compliant without that delete records option. I never knew how/where to put that...

Best

Diego Pino

Mark Jordan

unread,
Nov 16, 2017, 1:44:45 PM11/16/17
to isla...@googlegroups.com
Hi Diego,

I'm aware of the ability to create custom handlers (and did so over at https://github.com/mjordan/islandora_oai_download_link), but doesn't a site have to have one, and only one, handler configured at a time? The use case the drupal_alter() covers is that specific consumers should be able to receive specific output. That logic would need to be handled in an implementation of the drupal_alter(), of course, but even that could be wrapped in a GUI.

But, I also like your idea of a Pro handler. You could integrate Rules, Context, etc. which would be cool.

Mark
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.

Derek Merleaux

unread,
Mar 30, 2021, 12:18:01 PM3/30/21
to islandora
reviving this thread bc I'm trying to answer the question Mark posed above " doesn't a site have to have one, and only one, [OAI] handler configured at a time?"
I'm looking at a scenario with a repository that needs all but one namespace in a public OAI and the other namespace in another OAI feed that can be IP restricted (it's used for internal feeds). I had thought two handlers would do the trick, but now am realizing it depends on whether that is allowed.
Any help much appreciated!
Derek

Reply all
Reply to author
Forward
0 new messages