org.fcrepo:fcrepo4-oaiprovider

The Fedora Commons repository OAI provider.

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

org.fcrepo
ArtifactId

ArtifactId

fcrepo4-oaiprovider
Last Version

Last Version

4.4.0
Release Date

Release Date

Type

Type

bundle
Description

Description

The Fedora Commons repository OAI provider.
Project Organization

Project Organization

DuraSpace, Inc.
Source Code Management

Source Code Management

https://github.com/fcrepo4-labs/fcrepo4-oaiprovider

Download fcrepo4-oaiprovider

Dependencies

compile (9)

Group / Artifact Type Version
org.fcrepo : fcrepo-http-commons jar 4.4.0
org.fcrepo : fcrepo-transform jar 4.4.0
org.fcrepo : fcrepo-kernel-api jar 4.4.0
org.fcrepo : fcrepo-kernel-modeshape jar 4.4.0
org.springframework : spring-context jar 4.1.1.RELEASE
org.fcrepo : fcrepo-http-api jar 4.4.0
org.apache.httpcomponents : httpclient jar 4.3.3
org.springframework : spring-core jar 4.1.1.RELEASE
org.springframework : spring-web jar 4.1.1.RELEASE

provided (2)

Group / Artifact Type Version
com.sun.xml.bind : jaxb-impl jar 2.2.7
javax : javaee-api jar 7.0

test (14)

Group / Artifact Type Version
org.fcrepo : fcrepo-http-api test-jar 4.4.0
org.fcrepo : fcrepo-configs jar 4.4.0
org.fcrepo : fcrepo-http-commons test-jar 4.4.0
org.fcrepo : fcrepo-auth-common jar 4.4.0
junit : junit jar 4.11
org.mockito : mockito-core jar 1.10.8
org.springframework : spring-test jar 4.1.1.RELEASE
javax.servlet : javax.servlet-api jar 3.1.0
org.glassfish.grizzly : grizzly-http-server jar 2.3.16
org.glassfish.grizzly : grizzly-http-servlet jar 2.3.16
org.glassfish.jersey.test-framework.providers : jersey-test-framework-provider-grizzly2 jar 2.13
org.glassfish.jersey.ext : jersey-spring3 jar 2.13
org.glassfish.jersey.core : jersey-common jar 2.13
ch.qos.logback : logback-classic jar 1.1.2

Project Modules

There are no modules declared in this project.

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

org.fcrepo

Fedora Commons Repository 4 - Labs

Modules that are in-progress

Versions

Version
4.4.0