OAI server fixes
authorFrédéric Demians <f.demians@tamil.fr>
Wed, 17 Feb 2010 14:05:47 +0000 (15:05 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 18 Feb 2010 14:45:26 +0000 (09:45 -0500)
- Add preference OAI-PMH:ConfFile. I just add it in web-services.pref
  and not in DB. It's enough. It's not an end-user preference. Without
  this pref, OAI server operates as previously. And preferences editor
  allow to add a new value to the DB if necessary.
- Fix response to ListMetadataFormats which was empty in extended mode.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web-services.pref
opac/oai.pl

index 7c5685b..39e4bb2 100644 (file)
@@ -16,4 +16,9 @@ Web Services:
             - Only return
             - pref: "OAI-PMH:MaxCount"
               class: integer
-            - records at a time in response to a <code>ListRecords</code> or <code>ListIdentifiers</code> query.
+            - records at a time in response to a ListRecords or ListIdentifiers query.
+        -
+            - YAML OAI Koha server configuration file:
+            - pref: "OAI-PMH:ConfFile"
+              class: file
+            - . If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode. In extended mode, it's possible to parameter other formats than marcxml or Dublin Core. OAI-PMH:ConfFile specify a YAML configuration file which list available metadata formats and XSL file used to create them from marcxml records.
index 02ffdf6..b434980 100755 (executable)
@@ -156,7 +156,7 @@ sub new {
     my $self = $class->SUPER::new();
 
     if ( $repository->{ conf } ) {
-        foreach my $name ( @{ $self->{ koha_metadata_formats } } ) {
+        foreach my $name ( @{ $repository->{ koha_metadata_format } } ) {
             my $format = $repository->{ conf }->{ format }->{ $name };
             $self->metadataFormat( HTTP::OAI::MetadataFormat->new(
                 metadataPrefix    => $format->{metadataPrefix},