EPrints Technical Mailing List Archive

Message: #02187


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Setting OAI output plugins in EPrints 3.3


Thanks for the tip!

Adding this line to my export plugin made it appear in the OAI interface:
$self->{metadataPrefix} = "nl_didl";

We use different mappings for different repositories however.

I can reproduce the old behavior by adding the following to plugins.pl:
$c->{plugins}->{"Export::DARE_OAI_DIDL"}->{params}->{metadataPrefix} =
"nl_didl";
$c->{plugins}->{"Export::OAI_UKETD_DC"}->{params}->{metadataPrefix} = undef;
...

Dennis

On Mon, Sep 2, 2013 at 2:00 PM, John Salter <J.Salter@leeds.ac.uk> wrote:
> Hi Dennis,
> I'm looking into a similar issue having migrated from 3.1 to 3.3.10.
>
> If you look in the ~/cgi/oai2 code, (if I'm reading it right), the OAI2 script only looks for advertised plugins (see snippet below). I'm not sure if this is a sensible default.
> I think I'd like some export formats to appear in the drop-down list for users (the 'advertised' ones), and some to be available for OAI.
> How it used to work was better (IMO) - so perhaps there should be an option for either listing a set of repository-configured export formats, or, if that isn't configured, use the current code?
>
> Does that make any sense?
>
> Cheers,
> John
>
> sub ListMetadataFormats
> {
>         my( $repo, $response, $args ) = @_;
>
>         my $eprint = $args->{identifier};
>
>         my @plugins = sort {
>                 $a->param( "metadataPrefix" ) cmp $b->param( "metadataPrefix" )
>         } $repo->get_plugins(
>                 metadataPrefix => "*",
>                 is_advertised => 1,
>         );
> ...
> }
>
> -----Original Message-----
> From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Dennis - UT
> Sent: 02 September 2013 08:23
> To: EPrints.org Technical List
> Subject: [EP-tech] Setting OAI output plugins in EPrints 3.3
>
> Hi,
>
> I'm upgrading from EPrints 3.2.9 to 3.3.12.
>
> I noticed that it ignores my output plugin settings from oai.pl:
> $oai->{v2}->{output_plugins} = {
>     "nl_didl" => "DARE_OAI_DIDL",
> ...
>
> I looked in the defaultcfg and noticed that this setting was dropped there.
>
> How then can I configure the OAI output plugins in EPrints 3.3?
>
> Thanks!
>
> Dennis
> University of Twente
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/