A perl DataProvider based on HTTP::OAI::DataProvider and Dancer, the cool perl web framework
XSLT Perl Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
environments
lib
public
t
test
views
xslt
CHANGES
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
README.pod
config.sqlite.example.yml

README.pod

NAME

Salsa_OAI - Simple OAI data provider

VERSION

version 0.004

SYNOPSIS

This is a small webapp which acts as a OAI data provider based on HTTP::OAI::DataProvider and Tim Brody's HTTP::OAI. It is simply since it

* does not support all OAI features (see below) * it should be easy to maintain * easy to configure * easy to install

For a list of OAI features, see HTTP::OAI::DataProvider

FUNCTIONS

config_check ();

Run checks if Dancer's configuration make sense, e.g. if chunking enabled, it should also have the relevant information (e.g. chunk_dir). This check should run during initial start up and throw intelligble errors if it fails, so we can fix them right there and then and do not have to test all possibilities to discover them.

$provider=init_provider();

Initialize the data provider with settings either from Dancer's config if classic configuration information or from callbacks.

welcome()

Gets called from Dancer's routes to display html pages on Salsa_OAI

Debug "Message";

Use Dancer's debug function if available or else write to STDOUT. Register this callback during init_provider.

Warning "Message";

Use Dancer's warning function if available or pass message to perl's warn.

my $library = salsa_setLibrary();

Reads the setLibrary from dancer's config file and returns it in form of a HTTP::OAI::ListSet object( which can, of course, include one or more HTTP::OAI::Set objects ) .

Background: setNames
and setDescriptions are not stored with OAI headers,
but instead in the setLibrary
. HTTP::OAI::DataProvider::SetLibrary associates setSpecs with setNames
and setDescriptions
.

my xslt_fn=salsa_locateXSL($prefix);

locateXSL callback expects a metadataFormat prefix and will return the full path to the xsl which is responsible for this transformation. On failure: returns nothing.

SEE ALSO

AUTHOR

Maurice Mengel <mauricemengel@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Maurice Mengel.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.