diff --git a/build.gradle b/build.gradle
index 9314a9e7..de75e12e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,7 +48,7 @@ subprojects {
slf4jVersion = '1.7.12'
fcrepoCamelVersion = '4.5.0'
fcrepoCamelToolboxVersion = '4.7.0'
- activemqVersion = '5.14.0'
+ activemqVersion = '5.14.1'
commonsIoVersion = '2.4'
camelVersionRange = '[2.18.0, 3)'
diff --git a/islandora-connector-broadcast/build.gradle b/islandora-connector-broadcast/build.gradle
index adcc51eb..b7eeb8e7 100644
--- a/islandora-connector-broadcast/build.gradle
+++ b/islandora-connector-broadcast/build.gradle
@@ -5,6 +5,7 @@ description = 'Islandora CLAW Broadcaster'
dependencies {
compile group: 'org.apache.camel', name: 'camel-core', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-blueprint', version: camelVersion
+ compile group: 'org.apache.activemq', name: 'activemq-camel', version: activemqVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
testCompile group: 'org.apache.camel', name: 'camel-test-blueprint', version: camelVersion
}
@@ -16,7 +17,9 @@ jar {
vendor project.vendor
license project.license
- instruction 'Import-Package', "org.apache.camel;version=\"${camelVersionRange}\",${defaultOsgiImports}"
+ instruction 'Import-Package', 'org.apache.activemq.camel.component,' +
+ "org.apache.camel;version=\"${camelVersionRange}\"," +
+ defaultOsgiImports
instruction 'Export-Package', 'ca.islandora.alpaca.connector.broadcast'
}
}
diff --git a/islandora-indexing-triplestore/build.gradle b/islandora-indexing-triplestore/build.gradle
index 12a29813..c3ed5712 100644
--- a/islandora-indexing-triplestore/build.gradle
+++ b/islandora-indexing-triplestore/build.gradle
@@ -6,10 +6,15 @@ dependencies {
compile group: 'org.apache.camel', name: 'camel-core', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-blueprint', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-http4', version: camelVersion
- compile group: 'org.apache.activemq', name: 'activemq-camel', version: activemqVersion
+ compile group: 'org.apache.camel', name: 'camel-jsonpath', version: camelVersion
compile group: 'org.fcrepo.camel', name: 'fcrepo-camel', version: fcrepoCamelVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
testCompile group: 'org.apache.camel', name: 'camel-test-blueprint', version: camelVersion
+ testCompile group: 'org.apache.activemq', name: 'activemq-camel', version: activemqVersion
+ testCompile group: 'org.apache.servicemix.bundles', name: 'org.apache.servicemix.bundles.xerces', version: '2.11.0_1'
+ testCompile group: 'org.ow2.asm', name: 'asm-commons', version: '5.0.3'
+
+
}
jar {
@@ -20,15 +25,15 @@ jar {
license project.license
instruction 'Import-Package', 'org.apache.camel.component.http4,' +
- 'org.apache.activemq.camel.component,' +
"org.apache.camel;version=\"${camelVersionRange}\"," +
+ "org.fcrepo.camel.processor," +
defaultOsgiImports
instruction 'Export-Package', 'ca.islandora.indexing.triplestore'
}
}
artifacts {
- archives (file('build/cfg/main/ca.islandora.indexing.triplestore.cfg')) {
+ archives (file('build/cfg/main/ca.islandora.alpaca.indexing.triplestore.cfg')) {
classifier 'configuration'
type 'cfg'
}
diff --git a/islandora-indexing-triplestore/src/main/cfg/ca.islandora.indexing.triplestore.cfg b/islandora-indexing-triplestore/src/main/cfg/ca.islandora.alpaca.indexing.triplestore.cfg
similarity index 61%
rename from islandora-indexing-triplestore/src/main/cfg/ca.islandora.indexing.triplestore.cfg
rename to islandora-indexing-triplestore/src/main/cfg/ca.islandora.alpaca.indexing.triplestore.cfg
index dd94a4ba..fa6234e1 100644
--- a/islandora-indexing-triplestore/src/main/cfg/ca.islandora.indexing.triplestore.cfg
+++ b/islandora-indexing-triplestore/src/main/cfg/ca.islandora.alpaca.indexing.triplestore.cfg
@@ -1,11 +1,12 @@
# In the event of failure, the maximum number of times a redelivery will be attempted.
error.maxRedeliveries=10
-# The JMS connection URI, used for connecting to a local or remote ActiveMQ broker.
-jms.brokerUrl=tcp://localhost:61616
-
# The camel URI for the incoming message stream.
-input.stream=activemq:queue:islandora/triplestore/index
+input.stream=activemq:queue:islandora-indexing-triplestore
# The base URL of the triplestore being used.
triplestore.baseUrl=http://localhost:8080/bigdata/namespace/kb/sparql
+
+# Credentials for user with read privileges for the resource.
+drupal.username=
+drupal.password=
diff --git a/islandora-indexing-triplestore/src/main/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.java b/islandora-indexing-triplestore/src/main/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.java
new file mode 100644
index 00000000..13b11175
--- /dev/null
+++ b/islandora-indexing-triplestore/src/main/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexer.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to Islandora Foundation under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * The Islandora Foundation licenses this file to you under the MIT License.
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ca.islandora.alpaca.indexing.triplestore;
+
+import static org.apache.camel.LoggingLevel.ERROR;
+import static org.apache.camel.LoggingLevel.INFO;
+import static org.fcrepo.camel.FcrepoHeaders.FCREPO_URI;
+import static org.slf4j.LoggerFactory.getLogger;
+
+import com.jayway.jsonpath.JsonPathException;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.Exchange;
+import org.fcrepo.camel.processor.SparqlUpdateProcessor;
+import org.fcrepo.camel.processor.SparqlDeleteProcessor;
+import org.slf4j.Logger;
+
+/**
+ * @author dhlamb
+ */
+public class TriplestoreIndexer extends RouteBuilder {
+
+ private static final Logger LOGGER = getLogger(TriplestoreIndexer.class);
+
+ @Override
+ public void configure() {
+
+ // Global exception handler for the indexer.
+ // Just logs after retrying X number of times.
+ onException(Exception.class)
+ .maximumRedeliveries("{{error.maxRedeliveries}}")
+ .handled(true)
+ .log(
+ ERROR,
+ LOGGER,
+ "Error indexing ${property.uri} in triplestore: ${exception.message}\n\n${exception.stacktrace}"
+ );
+
+ // Main router.
+ from("{{input.stream}}")
+ .routeId("IslandoraTriplestoreIndexerRouter")
+ .to("direct:parse.event")
+ .choice()
+ .when(exchangeProperty("action").isEqualTo("Delete"))
+ .to("direct:triplestore.delete")
+ .otherwise()
+ .to("direct:retrieve.resource")
+ .to("direct:triplestore.index");
+
+ // Extracts info using jsonpath and stores it as properties on the exchange.
+ from("direct:parse.event")
+ .routeId("IslandoraTriplestoreIndexerParseEvent")
+ // Custom exception handler. Doesn't retry if event is malformed.
+ .onException(JsonPathException.class)
+ .maximumRedeliveries(0)
+ .handled(true)
+ .log(
+ ERROR,
+ LOGGER,
+ "Error extracting properties from event: ${exception.message}\n\n${exception.stacktrace}"
+ )
+ .end()
+ .setProperty("action").jsonpath("$.type")
+ .setProperty("uri").jsonpath("$.object");
+
+ // POSTs a SPARQL delete query for all triples with subject == uri.
+ from("direct:triplestore.delete")
+ .routeId("IslandoraTriplestoreIndexerDelete")
+ .setHeader(FCREPO_URI, simple("${property.uri}?_format=jsonld"))
+ .process(new SparqlDeleteProcessor())
+ .log(INFO, LOGGER, "Deleting ${property.uri} in triplestore")
+ .to("{{triplestore.baseUrl}}");
+
+ // Retrieves the resource from Drupal.
+ from("direct:retrieve.resource")
+ .routeId("IslandoraTriplestoreIndexerRetrieveResource")
+ .setHeader(Exchange.HTTP_METHOD, constant("GET"))
+ .toD("${property.uri}?_format=jsonld&authUsername={{drupal.username}}" +
+ "&authPassword={{drupal.password}}"
+ );
+
+ // Converts the resource to a SPARQL update query, POSTing it to the triplestore.
+ from("direct:triplestore.index")
+ .routeId("IslandoraTriplestoreIndexerIndex")
+ .setHeader(FCREPO_URI, simple("${property.uri}?_format=jsonld"))
+ .process(new SparqlUpdateProcessor())
+ .log(INFO, LOGGER, "Indexing ${property.uri} in triplestore")
+ .to("{{triplestore.baseUrl}}");
+
+ }
+}
diff --git a/islandora-indexing-triplestore/src/main/java/ca/islandora/indexing/triplestore/TriplestoreIndexer.java b/islandora-indexing-triplestore/src/main/java/ca/islandora/indexing/triplestore/TriplestoreIndexer.java
deleted file mode 100644
index aea6f87b..00000000
--- a/islandora-indexing-triplestore/src/main/java/ca/islandora/indexing/triplestore/TriplestoreIndexer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to Islandora Foundation under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- *
- * The Islandora Foundation licenses this file to you under the MIT License.
- * You may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://opensource.org/licenses/MIT
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package ca.islandora.indexing.triplestore;
-
-import static org.apache.camel.builder.PredicateBuilder.and;
-import static org.apache.camel.builder.PredicateBuilder.or;
-import static org.apache.camel.LoggingLevel.ERROR;
-import static org.fcrepo.camel.FcrepoHeaders.FCREPO_BASE_URL;
-import static org.fcrepo.camel.FcrepoHeaders.FCREPO_IDENTIFIER;
-
-import org.apache.camel.Predicate;
-import org.apache.camel.builder.RouteBuilder;
-import org.fcrepo.camel.processor.SparqlUpdateProcessor;
-import org.fcrepo.camel.processor.SparqlDeleteProcessor;
-
-/**
- * @author dhlamb
- */
-public class TriplestoreIndexer extends RouteBuilder {
-
- @Override
- public void configure() {
-
- final Predicate isTriples = header("Content-Type").isEqualTo("application/n-triples");
- final Predicate hasBaseUrl = header(FCREPO_BASE_URL).isNotNull();
- final Predicate hasIdentifier = header(FCREPO_IDENTIFIER).isNotNull();
- final Predicate hasFcrepoCamelHeaders = and(hasBaseUrl, hasIdentifier);
- final Predicate hasAction = or(header("action").isEqualTo("delete"), header("action").isEqualTo("upsert"));
- final Predicate isValid = and(isTriples, hasFcrepoCamelHeaders, hasAction);
-
- onException(Exception.class)
- .maximumRedeliveries("{{error.maxRedeliveries}}")
- .log(ERROR, "Error Indexing in Triplestore: ${routeId}");
-
- from("{{input.stream}}")
- .routeId("IslandoraTriplestoreIndexerRouter")
- .filter(isValid)
- .choice()
- .when(header("action").isEqualTo("delete"))
- .to("direct:triplestoreDelete")
- .otherwise()
- .to("direct:triplestoreUpsert");
-
- from("direct:triplestoreUpsert")
- .routeId("islandoraTripelstoreIndexerUpsert")
- .process(new SparqlUpdateProcessor())
- .to("{{triplestore.baseUrl}}");
-
- from("direct:triplestoreDelete")
- .routeId("islandoraTripelstoreIndexerDelete")
- .process(new SparqlDeleteProcessor())
- .to("{{triplestore.baseUrl}}");
-
- }
-}
diff --git a/islandora-indexing-triplestore/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/islandora-indexing-triplestore/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 2b96258c..aa1d98d0 100644
--- a/islandora-indexing-triplestore/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/islandora-indexing-triplestore/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -8,18 +8,23 @@
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
- ca.islandora.indexing.triplestore
+ ca.islandora.alpaca.indexing.triplestore
diff --git a/islandora-indexing-triplestore/src/test/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexerTest.java b/islandora-indexing-triplestore/src/test/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexerTest.java
new file mode 100644
index 00000000..cc526eb3
--- /dev/null
+++ b/islandora-indexing-triplestore/src/test/java/ca/islandora/alpaca/indexing/triplestore/TriplestoreIndexerTest.java
@@ -0,0 +1,244 @@
+/*
+ * Licensed to Islandora Foundation under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * The Islandora Foundation licenses this file to you under the MIT License.
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://opensource.org/licenses/MIT
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ca.islandora.alpaca.indexing.triplestore;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.AdviceWithRouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+
+import static java.net.URLEncoder.encode;
+import static org.apache.camel.Exchange.CONTENT_TYPE;
+import static org.apache.camel.util.ObjectHelper.loadResourceAsStream;
+
+/**
+ * @author dannylamb
+ */
+public class TriplestoreIndexerTest extends CamelBlueprintTestSupport {
+
+ @EndpointInject(uri = "mock:result")
+ protected MockEndpoint resultEndpoint;
+
+ @Produce(uri = "direct:start")
+ protected ProducerTemplate template;
+
+ @Override
+ public boolean isUseAdviceWith() {
+ return true;
+ }
+
+ @Override
+ public boolean isUseRouteBuilder() {
+ return false;
+ }
+
+ @Override
+ protected String getBlueprintDescriptor() {
+ return "/OSGI-INF/blueprint/blueprint-test.xml";
+ }
+
+ @Override
+ protected Properties useOverridePropertiesWithPropertiesComponent() {
+ final Properties props = new Properties();
+ props.put("input.stream", "seda:foo");
+ return props;
+ }
+
+ @Test
+ public void testRouterWithDeleteEvent() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerRouter";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("direct:triplestore.*");
+ }
+ });
+ context.start();
+
+ getMockEndpoint("mock:direct:triplestore.delete").expectedMessageCount(1);
+ getMockEndpoint("mock:direct:triplestore.index").expectedMessageCount(0);
+
+ template.sendBody(
+ IOUtils.toString(loadResourceAsStream("delete-event.json"), "UTF-8"));
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testRouterWithNonDeleteEvent() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerRouter";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("direct:triplestore.*");
+ mockEndpointsAndSkip("direct:retrieve.resource");
+ }
+ });
+ context.start();
+
+ getMockEndpoint("mock:direct:triplestore.delete").expectedMessageCount(0);
+ getMockEndpoint("mock:direct:triplestore.index").expectedMessageCount(1);
+
+ template.sendBody(
+ IOUtils.toString(loadResourceAsStream("create-event.json"), "UTF-8")
+ );
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testParseEvent() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerParseEvent";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("*");
+ }
+ });
+ context.start();
+
+ final Exchange exchange = template.send(xchange ->
+ xchange.getIn().setBody(IOUtils.toString(loadResourceAsStream("create-event.json"), "UTF-8"))
+ );
+
+ this.assertPredicate(
+ exchangeProperty("uri").isEqualTo("http://localhost:8000/fedora_resource/1"),
+ exchange,
+ true
+ );
+ this.assertPredicate(
+ exchangeProperty("action").isEqualTo("Create"),
+ exchange,
+ true
+ );
+ }
+
+ @Test
+ public void testTriplestoreDelete() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerDelete";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("http*");
+ }
+ });
+ context.start();
+
+ final String uri = "http://localhost:8000/fedora_resource/1";
+
+ final MockEndpoint endpoint = getMockEndpoint("mock:http:localhost:8080/bigdata/namespace/kb/sparql");
+
+ endpoint.expectedMessageCount(1);
+ endpoint.expectedHeaderReceived(Exchange.HTTP_METHOD, "POST");
+ endpoint.expectedHeaderReceived(CONTENT_TYPE, "application/x-www-form-urlencoded; charset=utf-8");
+ endpoint.allMessages().body().startsWith(
+ "update=" + encode("DELETE WHERE { <" + uri + "?_format=jsonld> ?p ?o }", "UTF-8")
+ );
+
+ template.send(exchange -> {
+ exchange.setProperty("uri", uri);
+ exchange.getIn().setBody(IOUtils.toString(loadResourceAsStream("delete-event.json"), "UTF-8"));
+ });
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testRetrieveResource() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerRetrieveResource";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("http*");
+ }
+ });
+ context.start();
+
+ final MockEndpoint endpoint = getMockEndpoint("mock:http:localhost:8000/fedora_resource/1");
+
+ endpoint.expectedMessageCount(1);
+ endpoint.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
+
+ template.send(exchange -> {
+ exchange.setProperty("uri", "http://localhost:8000/fedora_resource/1");
+ });
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Test
+ public void testTriplestoreIndex() throws Exception {
+ final String route = "IslandoraTriplestoreIndexerIndex";
+ context.getRouteDefinition(route).adviceWith(context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ replaceFromWith("direct:start");
+ mockEndpointsAndSkip("http*");
+ }
+ });
+ context.start();
+
+ final String uri = "http://localhost:8000/fedora_resource/1";
+ final String subject = "<" + uri + "?_format=jsonld>";
+ final String responsePrefix =
+ "DELETE WHERE { " + subject + " ?p ?o };\n" +
+ "INSERT DATA { ";
+ final List triples = Arrays.asList(
+ subject + " .",
+ subject + " .",
+ subject + " .",
+ subject + " \"2017-01-30T04:36:07+00:00\" .",
+ subject + " \"2017-01-30T14:35:57+00:00\" .",
+ subject + " 5 ."
+ );
+
+ final MockEndpoint endpoint = getMockEndpoint("mock:http:localhost:8080/bigdata/namespace/kb/sparql");
+
+ endpoint.expectedMessageCount(1);
+ endpoint.expectedHeaderReceived(Exchange.HTTP_METHOD, "POST");
+ endpoint.expectedHeaderReceived(CONTENT_TYPE, "application/x-www-form-urlencoded; charset=utf-8");
+ endpoint.allMessages().body().startsWith("update=" + encode(responsePrefix, "UTF-8"));
+ endpoint.allMessages().body().endsWith(encode("\n}", "UTF-8"));
+ for (final String triple : triples) {
+ endpoint.expectedBodyReceived().body().contains(encode(triple, "UTF-8"));
+ }
+
+ template.send(exchange -> {
+ exchange.setProperty("uri", uri);
+ exchange.getIn().setHeader(CONTENT_TYPE, "application/ld+json");
+ exchange.getIn().setBody(IOUtils.toString(loadResourceAsStream("resource.rdf"), "UTF-8"));
+ });
+
+ assertMockEndpointsSatisfied();
+ }
+}
diff --git a/islandora-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml b/islandora-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml
new file mode 100644
index 00000000..c3466a2c
--- /dev/null
+++ b/islandora-indexing-triplestore/src/test/resources/OSGI-INF/blueprint/blueprint-test.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ca.islandora.alpaca.indexing.triplestore
+
+
+
diff --git a/islandora-indexing-triplestore/src/test/resources/create-event.json b/islandora-indexing-triplestore/src/test/resources/create-event.json
new file mode 100644
index 00000000..93fbd3db
--- /dev/null
+++ b/islandora-indexing-triplestore/src/test/resources/create-event.json
@@ -0,0 +1,9 @@
+{
+ "@context": "https://www.w3.org/ns/activitystreams",
+ "type": "Create",
+ "actor": {
+ "type": "Person",
+ "id": "http://localhost:8000/user/1"
+ },
+ "object": "http://localhost:8000/fedora_resource/1"
+}
\ No newline at end of file
diff --git a/islandora-indexing-triplestore/src/test/resources/delete-event.json b/islandora-indexing-triplestore/src/test/resources/delete-event.json
new file mode 100644
index 00000000..1b459bef
--- /dev/null
+++ b/islandora-indexing-triplestore/src/test/resources/delete-event.json
@@ -0,0 +1,9 @@
+{
+ "@context": "https://www.w3.org/ns/activitystreams",
+ "type": "Delete",
+ "actor": {
+ "type": "Person",
+ "id": "http://localhost:8000/user/1"
+ },
+ "object": "http://localhost:8000/fedora_resource/1"
+}
\ No newline at end of file
diff --git a/islandora-indexing-triplestore/src/test/resources/resource.rdf b/islandora-indexing-triplestore/src/test/resources/resource.rdf
new file mode 100644
index 00000000..506fd0e3
--- /dev/null
+++ b/islandora-indexing-triplestore/src/test/resources/resource.rdf
@@ -0,0 +1,27 @@
+{
+ "@graph":[
+ {
+ "@id":"http:\/\/localhost:8000\/fedora_resource\/1?_format=jsonld",
+ "@type":[
+ "http:\/\/schema.org\/Thing",
+ "http:\/\/www.w3.org\/ns\/ldp#RDFSource",
+ "http:\/\/www.w3.org\/ns\/ldp#Container"
+ ],
+ "http:\/\/islandora.ca\/CLAW\/vclock":[
+ {
+ "@value":"5"
+ }
+ ],
+ "http:\/\/schema.org\/dateCreated":[
+ {
+ "@value":"2017-01-30T04:36:07+00:00"
+ }
+ ],
+ "http:\/\/schema.org\/dateModified":[
+ {
+ "@value":"2017-01-30T14:35:57+00:00"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/karaf/src/main/resources/features.xml b/karaf/src/main/resources/features.xml
index 0690840b..0ddcb5a9 100644
--- a/karaf/src/main/resources/features.xml
+++ b/karaf/src/main/resources/features.xml
@@ -9,22 +9,24 @@
Indexes the triplestore from Drupal nodes
- camel
- activemq-camel
+ fcrepo-service-activemq
+ fcrepo-service-camel
+ camel-http4
+ camel-jsonpath
mvn:ca.islandora.alpaca/islandora-indexing-triplestore/${project.version}
- mvn:ca.islandora.alpaca/islandora-indexing-triplestore/${project.version}/cfg/configuration
+ mvn:ca.islandora.alpaca/islandora-indexing-triplestore/${project.version}/cfg/configuration
Distributes a message to a list of queues/topics.
- camel
+ fcrepo-service-activemq
mvn:ca.islandora.alpaca/islandora-connector-broadcast/${project.version}
- fcrepo-service-activemq
+
mvn:ca.islandora.alpaca/islandora-connector-broadcast/${project.version}/cfg/configuration