Commit 36bbacb5 authored by acoburn's avatar acoburn
Browse files

updated readme

parent e6191a38
Amherst College MODS/XML transformation service
===============================================
This service implements a translation service from Fedora RDF-based metadata
to a MODS/XML serialization. This translation relies on a pluggable XSLT
document.
Building
--------
To build this project use
mvn install
To run the project you can execute the following Maven goal
mvn camel:run
Deploying in OSGi
-----------------
This project can be deployed in an OSGi container. For example using
[Apache ServiceMix](http://servicemix.apache.org/) or
[Apache Karaf](http://karaf.apache.org), you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:install acrepo-mods-xml-service
Or by copying the compiled bundle into `$KARAF_HOME/deploy`.
Configuration
-------------
The application can be configured by creating the following configuration
file `$KARAF_HOME/etc/edu.amherst.acdc.mods.cfg`. The following values
are available for configuration:
In the event of failure, the maximum number of times a redelivery will be attempted.
error.maxRedeliveries=10
The location of the XSLT document. This can be a file path (using the `file:` prefix)
or an external URL (e.g. using a `http:` scheme). Without a prefix, the XSL file will
be loaded from the classpath.
mods.xslt=edu/amherst/acdc/mods/rdf2mods.xsl
The port on which the service is available
rest.port=9070
The URL prefix for the service
rest.prefix=/mods
The fedora baseUrl value
fcrepo.baseUrl=localhost:8080/fcrepo/rest
By editing this file, any currently running routes will be immediately redeployed
with the new values.
For more help see the [Apache Camel](http://camel.apache.org) documentation
Camel Router Project for Blueprint (OSGi)
=========================================
To build this project use
mvn install
To run the project you can execute the following Maven goal
mvn camel:run
To deploy the project in OSGi. For example using Apache ServiceMix
or Apache Karaf. You can run the following command from its shell:
osgi:install -s mvn:edu.amherst.acdc/acrepo-mods-xml-service/1.0-SNAPSHOT
For more help see the Apache Camel documentation
http://camel.apache.org/
......@@ -12,7 +12,7 @@
<cm:default-properties>
<cm:property name="error.maxRedeliveries" value="10"/>
<cm:property name="rest.prefix" value="/mods"/>
<cm:property name="rest.port" value="10080"/>
<cm:property name="rest.port" value="9070"/>
<cm:property name="mods.xslt" value="edu/amherst/acdc/mods/rdf2mods.xsl"/>
<cm:property name="fcrepo.baseUrl" value="localhost:8080/fcrepo/rest"/>
</cm:default-properties>
......@@ -25,12 +25,9 @@
<setHeader headerName="CamelFcrepoIdentifier">
<simple>${headers[CamelHttpPath]}</simple>
</setHeader>
<log message="Fcrepo: ${headers[CamelFcrepoIdentifier]}"/>
<log message="Converting: ${headers[CamelFcrepoIdentifier]}"/>
<to uri="fcrepo:{{fcrepo.baseUrl}}?accept=application/rdf+xml"/>
<convertBodyTo type="org.w3c.dom.Document"/>
<!--<convertBodyTo type="java.lang.String"/>-->
<log message="Response: ${headers[CamelHttpResponseCode]}"/>
<log message="Body: ${body}"/>
<filter>
<simple>${headers[CamelHttpResponseCode]} == 200</simple>
<to uri="xslt:{{mods.xslt}}"/>
......
......@@ -39,8 +39,8 @@
<modules>
<module>acrepo-idiomatic-pgsql</module>
<module>acrepo-idiomatic</module>
<module>acrepo-mint-service</module>
<module>acrepo-karaf</module>
<module>acrepo-mint-service</module>
<module>acrepo-mods-xml-service</module>
</modules>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment