Commit c518f6ff authored by acoburn's avatar acoburn
Browse files

clean up documentation and configuration values

parent 95e8d204
......@@ -2,7 +2,7 @@ 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
to a MODS/XML serialization. This translation relies on a pluggable XSLT 2.0
document.
Building
......@@ -36,10 +36,6 @@ 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.
......
# The port on which the service is made available
rest.port=9070
# The URL prefix for the service
rest.prefix=/mods
# The fedora baseUrl
fcrepo.baseUrl=localhost:8080/fcrepo/rest
# The location of the XSLT to convert RDF/XML to MODS/XML
mods.xslt=edu/amherst/acdc/mods/rdf2mods.xsl
......@@ -10,7 +10,6 @@
<!-- OSGI blueprint property placeholder -->
<cm:property-placeholder persistent-id="edu.amherst.acdc.mods" update-strategy="reload">
<cm:default-properties>
<cm:property name="error.maxRedeliveries" value="10"/>
<cm:property name="rest.prefix" value="/mods"/>
<cm:property name="rest.port" value="9070"/>
<cm:property name="mods.xslt" value="edu/amherst/acdc/mods/rdf2mods.xsl"/>
......@@ -22,23 +21,29 @@
<route id="ModsTransformationRoute">
<from uri="jetty:http://0.0.0.0:{{rest.port}}{{rest.prefix}}?matchOnUriPrefix=true&amp;httpMethodRestrict=GET&amp;sendServerVersion=false"/>
<!-- clean up headers -->
<removeHeaders pattern="breadcrumbId"/>
<removeHeaders pattern="Accept"/>
<removeHeaders pattern="User-Agent"/>
<!-- set fcrepo headers -->
<setHeader headerName="CamelFcrepoIdentifier">
<simple>${headers[CamelHttpPath]}</simple>
</setHeader>
<setHeader headerName="CamelFcrepoBaseUrl">
<simple>{{fcrepo.baseUrl}}</simple>
</setHeader>
<log message="Converting: ${headers[CamelFcrepoIdentifier]}"/>
<to uri="fcrepo:{{fcrepo.baseUrl}}?accept=application/rdf+xml&amp;throwExceptionOnFailure=false"/>
<removeHeaders pattern="Accept"/>
<removeHeaders pattern="User-Agent"/>
<!-- get the resource from the repository -->
<to uri="fcrepo:{{fcrepo.baseUrl}}?throwExceptionOnFailure=false"/>
<filter>
<simple>${headers[CamelHttpResponseCode]} == 200</simple>
<!-- if successful, translate it using the provided XSLT -->
<setHeader headerName="Content-Type">
<constant>application/xml</constant>
</setHeader>
<convertBodyTo type="org.w3c.dom.Document"/>
<log message="Converting resource to MODS/XML: ${headers[CamelFcrepoIdentifier]}"/>
<to uri="xslt:{{mods.xslt}}?saxon=true"/>
</filter>
</route>
......
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