<<

NAME

C4::OAI::Repository - Handles OAI-PMH requests for a Koha database.

SYNOPSIS

  use C4::OAI::Repository;

  my $repository = C4::OAI::Repository->new();

DESCRIPTION

This object extend HTTP::OAI::Repository object. It accepts OAI-PMH HTTP requests and returns result.

This OAI-PMH server can operate in a simple mode and extended one.

In simple mode, repository configuration comes entirely from Koha system preferences (OAI-PMH:archiveID and OAI-PMH:MaxCount) and the server returns records in marcxml or dublin core format. Dublin core records are created from koha marcxml records tranformed with XSLT. Used XSL file is located in koha-tmpl/intranet-tmpl/prog/en/xslt directory and choosed based on marcflavour, respecively MARC21slim2OAIDC.xsl for MARC21 and MARC21slim2OAIDC.xsl for UNIMARC.

In extende mode, it's possible to parameter other format than marcxml or Dublin Core. A new syspref OAI-PMH:ConfFile specify a YAML configuration file which list available metadata formats and XSL file used to create them from marcxml records. If this syspref isn't set, Koha OAI server works in simple mode. A configuration file koha-oai.conf can look like that:

  ---
  format:
    vs:
      metadataPrefix: vs
      metadataNamespace: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs
      schema: http://veryspecial.tamil.fr/vs/format-pivot/1.1/vs.xsd
      xsl_file: /usr/local/koha/xslt/vs.xsl
    marcxml:
      metadataPrefix: marxml
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    oai_dc:
      metadataPrefix: oai_dc
      metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/
      schema: http://www.openarchives.org/OAI/2.0/oai_dc.xsd
      xsl_file: /usr/local/koha/koha-tmpl/intranet-tmpl/xslt/UNIMARCslim2OAIDC.xsl

<<