...
Warning |
---|
Support for the oai-provider module has fallen out of support since the release of Fedora 4.4.0. |
Excerpt |
---|
This guide will help you setup the OAI-PMH provider for Fedora 4 on Tomcat 7. For further details, please refer to the project's documentation on GitHub. |
Setting up Tomcat7
Install Tomcat. Use the appropriate package manager (e.g. yum, portage) to install Tomcat (on Xubuntu, for example, setting up Tomcat is accomplished by a simple command:
Code Block |
---|
sudo apt-get install tomcat7 |
Alternatively, visit the Apache Tomcat project documentation for more installation options. Once Tomcat is installed and running, you should see the Tomcat welcome screen when you visit http://localhost:8080.
Setting up Fedora Repository
Use either the Downloads or First Steps pre-packaged WAR file or build Fedora from source to get a WAR file. Copy the WAR to the Tomcat root directory <CATALINA_HOME>/webapps. Start/restart Tomcat, and http://localhost:8080/<fcrepo>/rest should display the Fedora repository front page.
...
The OAI-PMH provider in fcrepo4-oaiprovider relies on JAXB, so download the following JAR files from:
http://central.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.2.7/jaxb-impl-2.2.7.jar
http://central.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.2.7/jaxb-core-2.2.7.jar
and move them to <CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/lib
...
Obtain and build the fcrepo-oaiprovider source code:
Code Block language text git clone https://github.com/fcrepo4-labs/fcrepo4-oaiprovider.git cd fcrepo4-oaiprovider mvn package
Move the generated JAR to Tomcat's lib folder:
Code Block language text cp target/fcrepo4-oaiprovider-4.0.0-beta-05-SNAPSHOT.jar <CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/lib
Copy the oai.xml file to the fcrepo config directory:
Code Block cp fcrepo4-oaiprovider/src/main/resources/spring/oai.xml /<CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/classes/spring/
Edit the fcrepo master.xml file in <CATALINA_HOME>/webapps/<fcrepo>/WEB-INF/class/spring/master.xml to paste the following <import> declaration after other <import> declarations:
Code Block language text <import resource="classpath:/spring/oai.xml"/>
You may have to add the following namespace element to fcrepo-kernel-impl/src/main/resources/fedora-node-types.cnd in the fcrepo4 project and rebuild it, or reference your .cnd file in repository.json, if necessary.
Code Block language text <oai = 'http://www.openarchives.org/OAI/2.0/'>
- Restart Tomcat. Go to http://localhost:8080/<fcrepo>/rest/oai?verb=Identify. If everything is in order, you should see an XML file outlining the default configuration for the OAI-PMH provider.
...
As an example:
Code Block | ||
---|---|---|
| ||
echo "insert data {<> oai:repositoryName coolrepo } " | curl -X PATCH --upload-file - http://localhost:8080/fcrepo/rest |