Coder Social home page Coder Social logo

fcrepo4-oaiprovider's Introduction

Build Status

OAI Provider for Fedora 4

Implements Open Archives Protocol Version 2.0 using Fedora 4 as the backend.

Implementation details

The OAI Provider exposes an endpoint at /oai which accepts OAI conforming HTTP requests. A Fedora object containing the set information is created at /oai/setspec. For Set creation an endpoint at /oai/sets is exposed which accepts HTTP POST requests containing serialized Set information adhering to the OAI schema.

The provider depends on the fcrepo-dc-generator for creating a default oai_dc responses.

For advanced use-cases the provider depends on links to FedoraBinary instances and OAI Set objects to generate OAI responses. A graph linking a Fedora Object to it's OAI metadata should look like this:

                                             +----------+
                                             | MyObject | 
                                             +----------+
                                             /          \
                                            /            \
                                 hasOaiMarc21Record   isPartOfOaiSet
                                          /                \
                                         /                  \
                               +----------------+      +----------+
                               | MyMarc21Binary |      |   MySet  |
                               +----------------+      +----------+

Additional Metadata record types

The oaiprovider supports oai_dc out if the box, but users are able to add their own metadata format definitions to oai.xml.

Installation

Currently installation involves copying files by hand to an exploded fcrepo4 web application

The following dependencies have to be copied to Fedora 4's lib directory

#> wget -P /path/to/fcrepo/WEB-INF/lib http://central.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.2.7/jaxb-impl-2.2.7.jar
#> wget -P /path/to/fcrepo/WEB-INF/lib http://central.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.2.7/jaxb-core-2.2.7.jar

Build and copy the oai provider to the Fedora 4's lib directory

#> git clone https://github.com/fcrepo4-labs/fcrepo4-oaiprovider.git
#> cd fcrepo4-oaiprovider
#> mvn package
#> cp target/fcrepo-oaiprovider-4.0.0-beta-04-SNAPSHOT.jar /path/to/fcrepo/WEB-INF/lib/

To overwrite defaults, optionally copy the oai.xml Spring configuration to Fedora 4's config directory

#> cp fcrepo4-oaiprovider/src/main/resources/spring/oai.xml /path/to/fcrepo/WEB-INF/classes/spring/

Add <import resource="classpath:/spring/oai.xml"/> to Fedora 4's master.xml configuration file

#> vim /path/to/fcrepo/WEB-INF/classes/spring/master.xml

After restarting Fedora 4 the OAI Provider is available at /oai

Example

In order to get some results, a couple of objects can be created:

#> curl -X POST http://localhost:8080/fcrepo/rest -H "Slug:foo""
#> curl -X POST http://localhost:8080/fcrepo/rest -H "Slug:bar""

Try the various responses from the oai provider:

#> curl http://localhost:8080/fcrepo/rest/oai?verb=ListMetadataFormats
#> curl "http://localhost:8080/fcrepo/rest/oai?verb=GetRecord&identifier=MyObject&metadataPrefix=oai_dc"
#> curl "http://localhost:8080/fcrepo/rest/oai?verb=ListRecords&metadataPrefix=oai_dc"
#> curl "http://localhost:8080/fcrepo/rest/oai?verb=ListIdentifiers&metadataPrefix=oai_dc"
#> curl "http://localhost:8080/fcrepo/rest/oai?verb=ListSets"
#> curl "http://localhost:8080/fcrepo/rest/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=MyOAISet"

More examples can be found in Integration Tests

fcrepo4-oaiprovider's People

Contributors

acoburn avatar ajs6f avatar claussni avatar fasseg avatar lsitu avatar mikedurbin avatar nianma avatar osmandin avatar ruebot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.