Commit b504d1d0 authored by acoburn's avatar acoburn
Browse files

Merge branch 'rename_xml_metadata' into 'master'

Renamed acrepo-xml-metadata to acrepo-exts-serialize-xml



See merge request !35
parents 784b2fa3 8798e590
......@@ -14,7 +14,7 @@ by making available a REST-based HTTP interface.
* `acrepo-exts-fits`: This service will return FITS information associated with a Fedora Binary, in XML format
* `acrepo-exts-jsonld`: This module exposes an HTTP endpoint for creating compact JSON-LD documents from a fedora repository using a pluggable context document
* `acrepo-image-service`: An image manipulation service
* `acrepo-xml-metadata`: This service translates Fedora RDF documents into MODS/XML or DC/XML
* `acrepo-exts-serialize-xml`: This service translates Fedora RDF documents into MODS/XML or DC/XML
Services
--------
......@@ -64,6 +64,7 @@ command from its shell:
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-exts-fits
feature:install acrepo-exts-jsonld
feature:install acrepo-exts-serialize-xml
feature:install acrepo-idiomatic
feature:install acrepo-idiomatic-pgsql
feature:install acrepo-image-service
......@@ -72,7 +73,6 @@ command from its shell:
feature:install acrepo-services-ldcache-file
feature:install acrepo-services-mint
feature:install acrepo-services-validation
feature:install acrepo-xml-metadata
More information
----------------
......
Amherst College XML-based metadata transformation service
Amherst College XML-based metadata serialization extension
=========================================================
This service implements a translation service from Fedora RDF-based metadata
......@@ -29,19 +29,15 @@ This project can be deployed in an OSGi container. For example using
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:install acrepo-xml-metadata
feature:install acrepo-exts-serialize-xml
Configuration
-------------
The application can be configured by creating the following configuration
file `$KARAF_HOME/etc/edu.amherst.acdc.xml.metadata.cfg`. The following values
file `$KARAF_HOME/etc/edu.amherst.acdc.exts.serialize.xml.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 for MODS. 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.
......
......@@ -9,13 +9,13 @@
<version>1.0.1-SNAPSHOT</version>
</parent>
<artifactId>acrepo-xml-metadata</artifactId>
<artifactId>acrepo-exts-serialize-xml</artifactId>
<packaging>bundle</packaging>
<name>RDF to XML (MODS and DC) transformation service</name>
<name>RDF to XML (MODS and DC) serialization service</name>
<properties>
<osgi.export.packages>edu.amherst.acdc.xml.metadata;version=${project.version}</osgi.export.packages>
<osgi.export.packages>edu.amherst.acdc.exts.serialize.xml;version=${project.version}</osgi.export.packages>
</properties>
<dependencies>
......@@ -96,7 +96,7 @@
<configuration>
<artifacts>
<artifact>
<file>src/main/cfg/edu.amherst.acdc.xml.metadata.cfg</file>
<file>src/main/cfg/edu.amherst.acdc.exts.serialize.xml.cfg</file>
<type>cfg</type>
<classifier>configuration</classifier>
</artifact>
......
# The maximum number or redeliveries for any message
error.maxRedeliveries=10
# The port on which the service is made available
rest.port=9104
rest.host=localhost
......@@ -9,5 +6,5 @@ rest.host=localhost
fcrepo.baseUrl=localhost:8080/fcrepo/rest
# The location of the XSLT to convert RDF/XML to MODS/XML and DC/XML
mods.xslt=edu/amherst/acdc/xml/metadata/rdf2mods.xsl
dc.xslt=edu/amherst/acdc/xml/metadata/rdf2dc.xsl
mods.xslt=edu/amherst/acdc/exts/serialize/xml/rdf2mods.xsl
dc.xslt=edu/amherst/acdc/exts/serialize/xml/rdf2dc.xsl
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package edu.amherst.acdc.xml.metadata;
package edu.amherst.acdc.exts.serialize.xml;
import static org.apache.camel.Exchange.HTTP_METHOD;
import static org.apache.camel.Exchange.HTTP_PATH;
......@@ -35,13 +35,6 @@ public class EventRouter extends RouteBuilder {
*/
public void configure() throws Exception {
/**
* A generic error handler (specific to this RouteBuilder)
*/
onException(Exception.class)
.maximumRedeliveries("{{error.maxRedeliveries}}")
.log("Event Routing Error: ${routeId}");
from("jetty:http://{{rest.host}}:{{rest.port}}/dc?" +
"matchOnUriPrefix=true&httpMethodRestrict=GET,OPTIONS&sendServerVersion=false")
.routeId("XmlDcTransformation")
......
......@@ -8,19 +8,18 @@
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<!-- OSGI blueprint property placeholder -->
<cm:property-placeholder persistent-id="edu.amherst.acdc.xml.metadata" update-strategy="reload">
<cm:property-placeholder persistent-id="edu.amherst.acdc.exts.serialize.xml" update-strategy="reload">
<cm:default-properties>
<cm:property name="error.maxRedeliveries" value="10"/>
<cm:property name="rest.port" value="9104"/>
<cm:property name="rest.host" value="localhost"/>
<cm:property name="mods.xslt" value="edu/amherst/acdc/xml/metadata/rdf2mods.xsl"/>
<cm:property name="dc.xslt" value="edu/amherst/acdc/xml/metadata/rdf2dc.xsl"/>
<cm:property name="mods.xslt" value="edu/amherst/acdc/exts/serialize/xml/rdf2mods.xsl"/>
<cm:property name="dc.xslt" value="edu/amherst/acdc/exts/serialize/xml/rdf2dc.xsl"/>
<cm:property name="fcrepo.baseUrl" value="localhost:8080/fcrepo/rest"/>
</cm:default-properties>
</cm:property-placeholder>
<camelContext id="AcrepoXmlMetadata" xmlns="http://camel.apache.org/schema/blueprint">
<package>edu.amherst.acdc.xml.metadata</package>
<camelContext id="AcrepoExtsSerializeXml" xmlns="http://camel.apache.org/schema/blueprint">
<package>edu.amherst.acdc.exts.serialize.xml</package>
</camelContext>
</blueprint>
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package edu.amherst.acdc.mods;
package edu.amherst.acdc.exts.serialize.xml;
import static org.apache.camel.Exchange.HTTP_PATH;
import static org.apache.camel.Exchange.HTTP_RESPONSE_CODE;
......
......@@ -7,7 +7,7 @@
</encoder>
</appender>
<logger name="edu.amherst.acdc.mods" additivity="false" level="INFO">
<logger name="edu.amherst.acdc.exts.serialize.xml" additivity="false" level="INFO">
<appender-ref ref="STDOUT"/>
</logger>
<logger name="org.apache.camel" additivity="false" level="INFO">
......
......@@ -60,9 +60,9 @@ import org.slf4j.Logger;
*/
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class AcrepoXmlMetadataIT extends AbstractOSGiIT {
public class AcrepoExtsSerializeXmlIT extends AbstractOSGiIT {
private static Logger LOGGER = getLogger(AcrepoXmlMetadataIT.class);
private static Logger LOGGER = getLogger(AcrepoExtsSerializeXmlIT.class);
@Configuration
public Option[] config() {
......@@ -87,7 +87,7 @@ public class AcrepoXmlMetadataIT extends AbstractOSGiIT {
.versionAsInProject().classifier("features").type("xml"), "scr"),
features(maven().groupId("edu.amherst.acdc").artifactId("acrepo-karaf")
.type("xml").classifier("features").versionAsInProject(),
"acrepo-xml-metadata"),
"acrepo-exts-serialize-xml"),
systemProperty("karaf.metadata.port").value(metadataServicePort),
systemProperty("fcrepo.port").value(fcrepoPort),
......@@ -95,8 +95,8 @@ public class AcrepoXmlMetadataIT extends AbstractOSGiIT {
editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort),
editConfigurationFilePut("etc/edu.amherst.acdc.xml.metadata.cfg", "fcrepo.baseUrl", fcrepoBaseUrl),
editConfigurationFilePut("etc/edu.amherst.acdc.xml.metadata.cfg", "rest.port", metadataServicePort)
editConfigurationFilePut("etc/edu.amherst.acdc.exts.serialize.xml.cfg", "fcrepo.baseUrl", fcrepoBaseUrl),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.serialize.xml.cfg", "rest.port", metadataServicePort)
};
}
......@@ -104,13 +104,13 @@ public class AcrepoXmlMetadataIT extends AbstractOSGiIT {
public void testInstallation() throws Exception {
assertTrue(featuresService.isInstalled(featuresService.getFeature("camel-core")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("fcrepo-camel")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-xml-metadata")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-serialize-xml")));
}
@Test
public void testDcMetadataService() throws Exception {
// make sure that the camel context has started up.
final CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.name=AcrepoXmlMetadata)",
final CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.name=AcrepoExtsSerializeXml)",
10000);
assertNotNull(ctx);
......
......@@ -78,7 +78,7 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
.type("xml").classifier("features").versionAsInProject(), "activemq-camel"),
features(maven().groupId("edu.amherst.acdc").artifactId("acrepo-karaf")
.type("xml").classifier("features").versionAsInProject(), "acrepo-idiomatic",
"acrepo-idiomatic-pgsql", "acrepo-xml-metadata", "acrepo-image-service",
"acrepo-idiomatic-pgsql", "acrepo-exts-serialize-xml", "acrepo-image-service",
"acrepo-services-validation", "acrepo-services-jsonld", "acrepo-services-mint",
"acrepo-exts-jsonld", "acrepo-template-mustache", "acrepo-exts-fits",
"acrepo-libs-jena", "acrepo-libs-sesame", "acrepo-libs-jsonld",
......@@ -86,8 +86,8 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
editConfigurationFilePut("etc/edu.amherst.acdc.exts.fits.cfg", "rest.port", fitsPort),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.jsonld.cfg", "rest.port", jsonldPort),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.serialize.xml.cfg", "rest.port", metadataPort),
editConfigurationFilePut("etc/edu.amherst.acdc.template.mustache.cfg", "rest.port", templatePort),
editConfigurationFilePut("etc/edu.amherst.acdc.xml.metadata.cfg", "rest.port", metadataPort),
editConfigurationFilePut("etc/edu.amherst.acdc.idiomatic.cfg", "rest.port", idiomaticPort),
editConfigurationFilePut("etc/edu.amherst.acdc.image.service.cfg", "rest.port", imagePort),
editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
......@@ -106,9 +106,9 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-services-ldcache")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-services-mint")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-services-validation")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-xml-metadata")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-fits")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-jsonld")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-serialize-xml")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-template-mustache")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-image-service")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-libs-sesame")));
......
......@@ -68,7 +68,7 @@
<bundle>mvn:edu.amherst.acdc/acrepo-services-ldcache-file/${project.version}</bundle>
<feature version="${project.version}">acrepo-marmotta-libs</feature>
<feature version="${project.version}">acrepo-libs-marmotta</feature>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldcache-backend-file-${marmotta.version}.jar</bundle>
......@@ -95,8 +95,8 @@
<configfile finalname="/etc/edu.amherst.acdc.services.validation.cfg">mvn:edu.amherst.acdc/acrepo-services-validation/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-xml-metadata" version="${project.version}">
<details>Installs the MODS/XML translation service</details>
<feature name="acrepo-exts-serialize-xml" version="${project.version}">
<details>Installs the MODS/XML and DC/XML serialization service</details>
<feature version="${camel.version}">camel</feature>
<feature version="${camel.version}">camel-blueprint</feature>
......@@ -104,9 +104,9 @@
<feature version="${camel.version}">camel-saxon</feature>
<feature version="${fcrepo-camel.version}">fcrepo-camel</feature>
<bundle>mvn:edu.amherst.acdc/acrepo-xml-metadata/${project.version}</bundle>
<bundle>mvn:edu.amherst.acdc/acrepo-exts-serialize-xml/${project.version}</bundle>
<configfile finalname="/etc/edu.amherst.acdc.xml.metadata.cfg">mvn:edu.amherst.acdc/acrepo-xml-metadata/${project.version}/cfg/configuration</configfile>
<configfile finalname="/etc/edu.amherst.acdc.exts.serialize.xml.cfg">mvn:edu.amherst.acdc/acrepo-exts-serialize-xml/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-services-jsonld" version="${project.version}">
......
......@@ -115,10 +115,10 @@
<module>acrepo-services-ldcache-file</module>
<module>acrepo-services-mint</module>
<module>acrepo-services-validation</module>
<module>acrepo-xml-metadata</module>
<module>acrepo-exts-jsonld</module>
<module>acrepo-template-mustache</module>
<module>acrepo-exts-fits</module>
<module>acrepo-exts-jsonld</module>
<module>acrepo-exts-serialize-xml</module>
</modules>
<dependencyManagement>
......
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