Commit 045ddcec authored by acoburn's avatar acoburn
Browse files

Create a linked data cache service atop Marmotta

parent 337638ee
......@@ -14,6 +14,7 @@ Services
* `acrepo-image-service`: An image manipulation service
* `acrepo-jsonld-service`: This service exposes an HTTP endpoint for creating compact JSON-LD documents from a fedora repository using a pluggable context document
* `acrepo-services-jsonld`: This service creates expanded or compact JSON-LD representations of input documents
* `acrepo-services-ldcache`: This service dereferences and caches URIs, retrieving the `object` of particular triples on demand
* `acrepo-services-mint`: This mints random (public) URIs for use with fedora resources
* `acrepo-services-validation`: An OSGi-based validation service
* `acrepo-xml-metadata`: This service translates Fedora RDF documents into MODS/XML or DC/XML
......@@ -38,8 +39,9 @@ command from its shell:
feature:install acrepo-idiomatic-pgsql
feature:install acrepo-image-service
feature:install acrepo-jsonld-service
feature:install acrepo-services-mint
feature:install acrepo-services-jsonld
feature:install acrepo-services-ldcache
feature:install acrepo-services-mint
feature:install acrepo-services-validation
feature:install acrepo-xml-metadata
......
......@@ -55,6 +55,13 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-services-ldcache</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>edu.amherst.acdc</groupId>
<artifactId>acrepo-karaf</artifactId>
......@@ -64,7 +71,7 @@
<scope>test</scope>
</dependency>
<!-- Testing & Camel Plugin -->
<!-- Testing -->
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>javax.inject</artifactId>
......
/*
* Copyright 2016 Amherst College
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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 edu.amherst.acdc.itests;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;
import static org.slf4j.LoggerFactory.getLogger;
import java.io.File;
import edu.amherst.acdc.services.ldcache.LDCacheService;
import edu.amherst.acdc.services.ldcache.LDCacheServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.ConfigurationManager;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;
import org.slf4j.Logger;
/**
* @author Aaron Coburn
* @since May 2, 2016
*/
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class AcrepoLdCacheIT extends AbstractOSGiIT {
private static final String PREF_LABEL = "http://www.w3.org/2004/02/skos/core#prefLabel";
private static final String LABEL = "http://www.w3.org/2000/01/rdf-schema#label";
private static final String OFFICIAL_NAME = "http://www.geonames.org/ontology#officialName";
private static final Logger LOGGER = getLogger(AcrepoLdCacheIT.class);
private static final LDCacheService svc = new LDCacheServiceImpl("target/ldcache", 100000);
@Configuration
public Option[] config() {
final ConfigurationManager cm = new ConfigurationManager();
final String fcrepoPort = cm.getProperty("fcrepo.dynamic.test.port");
final String rmiRegistryPort = cm.getProperty("karaf.rmiRegistry.port");
final String rmiServerPort = cm.getProperty("karaf.rmiServer.port");
final String fcrepoBaseUrl = "localhost:" + fcrepoPort + "/fcrepo/rest";
final String sshPort = cm.getProperty("karaf.ssh.port");
return new Option[] {
karafDistributionConfiguration()
.frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
.versionAsInProject().type("zip"))
.unpackDirectory(new File("target", "exam"))
.useDeployFolder(false),
logLevel(LogLevel.WARN),
keepRuntimeFolder(),
configureConsole().ignoreLocalConsole(),
features(maven().groupId("org.apache.karaf.features").artifactId("standard")
.versionAsInProject().classifier("features").type("xml"), "scr", "wrap"),
features(maven().groupId("edu.amherst.acdc").artifactId("acrepo-karaf")
.type("xml").classifier("features").versionAsInProject(),
"acrepo-services-ldcache", "acrepo-services-ldcache-pgsql"),
systemProperty("fcrepo.port").value(fcrepoPort),
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)
};
}
@Test
public void testInstallation() throws Exception {
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-services-ldcache")));
}
@Test
public void testLdCacheService() throws Exception {
assertTrue(svc.get("http://dbpedia.org/resource/Berlin", LABEL).contains("Berlin"));
assertTrue(svc.get("http://sws.geonames.org/2658434/", OFFICIAL_NAME).contains("Switzerland"));
assertTrue(svc.get("http://id.loc.gov/vocabulary/resourceTypes/txt", PREF_LABEL).contains("Text"));
assertTrue(svc.get("http://id.loc.gov/authorities/names/n79006936", PREF_LABEL)
.contains("Melville, Herman, 1819-1891"));
assertTrue(svc.get("http://purl.org/dc/dcmitype/StillImage", LABEL).contains("Still Image"));
assertTrue(svc.get("http://vocab.getty.edu/tgn/7003712", PREF_LABEL).contains("Berlin"));
}
@Test
public void testLdCacheServiceWithLang() throws Exception {
assertTrue(svc.get("http://dbpedia.org/resource/Berlin", LABEL, "en").contains("Berlin"));
assertTrue(svc.get("http://sws.geonames.org/2658434/", OFFICIAL_NAME, "en").contains("Switzerland"));
assertTrue(svc.get("http://id.loc.gov/vocabulary/resourceTypes/txt", PREF_LABEL, "en").contains("Text"));
assertTrue(svc.get("http://id.loc.gov/authorities/names/n79006936", PREF_LABEL, "en")
.contains("Melville, Herman, 1819-1891"));
assertTrue(svc.get("http://purl.org/dc/dcmitype/StillImage", LABEL, "en").contains("Still Image"));
assertTrue(svc.get("http://vocab.getty.edu/tgn/7003712", PREF_LABEL, "en").contains("Berlin"));
}
}
......@@ -80,7 +80,9 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
.type("xml").classifier("features").versionAsInProject(), "acrepo-idiomatic",
"acrepo-idiomatic-pgsql", "acrepo-xml-metadata", "acrepo-image-service",
"acrepo-services-validation", "acrepo-services-jsonld", "acrepo-services-mint",
"acrepo-exts-jsonld", "acrepo-template-mustache", "acrepo-fits-rest"),
"acrepo-exts-jsonld", "acrepo-template-mustache", "acrepo-fits-rest",
"acrepo-jena-libs", "acrepo-sesame-libs", "acrepo-jsonld-libs",
"acrepo-jackson-libs", "acrepo-marmotta-libs", "acrepo-services-ldcache"),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.jsonld.cfg", "rest.port", jsonldPort),
editConfigurationFilePut("etc/edu.amherst.acdc.template.mustache.cfg", "rest.port", templatePort),
......@@ -101,6 +103,7 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-idiomatic")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-idiomatic-pgsql")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-services-jsonld")));
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")));
......@@ -108,5 +111,10 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-template-mustache")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-image-service")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-fits-rest")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-sesame-libs")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-marmotta-libs")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-jena-libs")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-jsonld-libs")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-jackson-libs")));
}
}
......@@ -76,14 +76,12 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<version>${httpclient.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
<version>${httpcore.version}</version>
<scope>test</scope>
</dependency>
......
<?xml version='1.0' encoding='UTF-8'?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="amherst-repo-services-${project.version}">
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="amherst-repo-services-${project.version}">
<repository>mvn:org.fcrepo.camel/fcrepo-camel/${fcrepo-camel.version}/xml/features</repository>
<repository>mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features</repository>
<repository>mvn:org.apache.activemq/activemq-karaf/${activemq.version}/xml/features</repository>
<repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/${pax-jdbc.version}/xml/features</repository>
<feature name="acrepo-idiomatic" version="${project.version}" resolver="(obr)" start-level="50">
<feature name="acrepo-idiomatic" version="${project.version}">
<details>Installs the id mapping service</details>
<feature>jndi</feature>
......@@ -25,7 +25,7 @@
<configfile finalname="/etc/edu.amherst.acdc.idiomatic.cfg">mvn:edu.amherst.acdc/acrepo-idiomatic/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-idiomatic-pgsql" version="${project.version}" resolver="(obr)" start-level="50">
<feature name="acrepo-idiomatic-pgsql" version="${project.version}">
<details>Installs the id mapping service database</details>
<feature>jdbc</feature>
......@@ -39,7 +39,7 @@
<configfile finalname="/etc/org.ops4j.datasource-idiomatic.cfg">mvn:edu.amherst.acdc/acrepo-idiomatic-pgsql/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-image-service" version="${project.version}" resolver="(obr)" start-level="50">
<feature name="acrepo-image-service" version="${project.version}">
<details>Installs the image service</details>
<feature version="${camel.version}">camel</feature>
......@@ -53,7 +53,17 @@
<configfile finalname="/etc/edu.amherst.acdc.image.service.cfg">mvn:edu.amherst.acdc/acrepo-image-service/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-services-mint" version="${project.version}" resolver="(obr)" start-level="50">
<feature name="acrepo-services-ldcache" version="${project.version}">
<details>Installs the LDCache service</details>
<bundle>mvn:edu.amherst.acdc/acrepo-services-ldcache/${project.version}</bundle>
<feature version="${project.version}">acrepo-marmotta-libs</feature>
<configfile finalname="/etc/edu.amherst.acdc.services.ldcache.cfg">mvn:edu.amherst.acdc/acrepo-services-ldcache/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-services-mint" version="${project.version}">
<details>Installs the id minter</details>
<bundle dependency="true">mvn:org.apache.commons/commons-lang3/${commons-lang.version}</bundle>
......@@ -63,7 +73,7 @@
<configfile finalname="/etc/edu.amherst.acdc.services.mint.cfg">mvn:edu.amherst.acdc/acrepo-services-mint/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-services-validation" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-services-validation" version="${project.version}">
<details>Installs the validation service</details>
<feature version="${project.version}">acrepo-jena-libs</feature>
......@@ -73,7 +83,7 @@
<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}" resolver="(orb)" start-level="50">
<feature name="acrepo-xml-metadata" version="${project.version}">
<details>Installs the MODS/XML translation service</details>
<feature version="${camel.version}">camel</feature>
......@@ -87,7 +97,7 @@
<configfile finalname="/etc/edu.amherst.acdc.xml.metadata.cfg">mvn:edu.amherst.acdc/acrepo-xml-metadata/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-services-jsonld" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-services-jsonld" version="${project.version}">
<details>Installs the JSON-LD transformation OSGi service</details>
<feature version="${project.version}">acrepo-jsonld-libs</feature>
......@@ -95,7 +105,7 @@
<bundle>mvn:edu.amherst.acdc/acrepo-services-jsonld/${project.version}</bundle>
</feature>
<feature name="acrepo-exts-jsonld" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-exts-jsonld" version="${project.version}">
<details>Installs a sample JSON-LD transformation workflow</details>
<feature version="${camel.version}">camel</feature>
......@@ -109,7 +119,7 @@
<configfile finalname="/etc/edu.amherst.acdc.exts.jsonld.cfg">mvn:edu.amherst.acdc/acrepo-exts-jsonld/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-template-mustache" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-template-mustache" version="${project.version}">
<details>Installs a sample JSON-LD-based template rendering service</details>
<feature version="${camel.version}">camel</feature>
......@@ -126,7 +136,7 @@
<configfile finalname="/etc/edu.amherst.acdc.template.mustache.cfg">mvn:edu.amherst.acdc/acrepo-template-mustache/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-fits-rest" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-fits-rest" version="${project.version}">
<details>Installs a FITS RESTful service</details>
<feature version="${camel.version}">camel</feature>
......@@ -139,10 +149,10 @@
<configfile finalname="/etc/edu.amherst.acdc.fits.rest.cfg">mvn:edu.amherst.acdc/acrepo-fits-rest/${project.version}/cfg/configuration</configfile>
</feature>
<feature name="acrepo-jena-libs" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-jena-libs" version="${project.version}">
<details>Installs jena and related dependencies</details>
<feature version="${project.version}">acrepo-jsonld-libs</feature>
<feature version="${project.version}" dependency="true">acrepo-jsonld-libs</feature>
<bundle>mvn:org.apache.jena/jena-osgi/${jena.version}</bundle>
......@@ -152,18 +162,112 @@
<bundle dependency="true">mvn:com.github.andrewoma.dexx/collection/${dexx.version}</bundle>
</feature>
<feature name="acrepo-jsonld-libs" version="${project.version}" resolver="(orb)" start-level="50">
<feature name="acrepo-sesame-libs" version="${project.version}">
<details>Installs the OpenRDF libraries</details>
<feature prerequisite="true" dependency="false">wrap</feature>
<feature version="${project.version}" dependency="true">acrepo-jackson-libs</feature>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-event/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-memory/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-model/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-util/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-api/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-api/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-query/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-api/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-rdfjson/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-rdfxml/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-turtle/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-n3/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-sail/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryparser-api/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryalgebra-model/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-trig/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-api/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-nativerdf/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-sail-inferencer/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryalgebra-evaluation/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-repository-sparql/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryparser-sparql/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-queryresultio-sparqlxml/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-http-client/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-http-protocol/${sesame.version}</bundle>
<bundle>wrap:mvn:org.openrdf.sesame/sesame-rio-ntriples/${sesame.version}</bundle>
<bundle>mvn:com.github.jsonld-java/jsonld-java-sesame/${jsonld-sesame.version}</bundle>
<bundle>mvn:com.github.jsonld-java/jsonld-java/${jsonld-sesame.version}</bundle>
<bundle dependency="true">${wrapped.bundle.location}/commons-httpclient.commons-httpclient-${commons-httpclient.version}.jar</bundle>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore.version}</bundle>
<bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
<bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
</feature>
<feature name="acrepo-marmotta-libs" version="${project.version}">
<details>Installs the Marmotta libraries</details>
<feature version="${project.version}" dependency="true">acrepo-sesame-libs</feature>
<feature version="${project.version}" dependency="true">acrepo-jsonld-libs</feature>
<feature version="${project.version}" dependency="true">acrepo-jackson-libs</feature>
<bundle>mvn:org.apache.marmotta/ldcache-api/${marmotta.version}</bundle>
<!-- locally wrapped OSGi bundles -->
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldcache-core-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldclient-api-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldclient-core-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.marmotta-commons-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldclient-provider-rdf-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldclient-provider-rdfa-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldclient-provider-xml-${marmotta.version}.jar</bundle>
<bundle>${wrapped.bundle.location}/org.apache.marmotta.ldcache-backend-file-${marmotta.version}.jar</bundle>
<bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
<bundle dependency="true">mvn:com.google.guava/guava/${guava16.version}</bundle>
<bundle dependency="true">mvn:joda-time/joda-time/${joda-time.version}</bundle>
<bundle dependency="true">mvn:commons-validator/commons-validator/${commons-validator.version}</bundle>
<bundle dependency="true">mvn:commons-beanutils/commons-beanutils/${commons-beanutils.version}</bundle>
<bundle dependency="true">mvn:org.apache.commons/commons-lang3/${commons-lang.version}</bundle>
<bundle dependency="true">mvn:ch.qos.cal10n/cal10n-api/${cal10n.version}</bundle>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore.version}</bundle>
<bundle dependency="true">mvn:jaxen/jaxen/${jaxen.version}</bundle>
<bundle dependency="true">${wrapped.bundle.location}/commons-digester.commons-digester-${commons-digester.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.apache.httpcomponents.fluent-hc-${fluent-hc.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.apache.httpcomponents.httpclient-cache-${httpclient-cache.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.apache.httpcomponents.httpcore-nio-${httpcore-nio.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.apache.httpcomponents.httpmime-${httpmime.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.jdom.jdom2-${jdom2.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.semarglproject.semargl-rdfa-${semargl.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.semarglproject.semargl-core-${semargl.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.semarglproject.semargl-rdf-${semargl.version}.jar</bundle>
<bundle dependency="true">${wrapped.bundle.location}/org.semarglproject.semargl-sesame-${semargl.version}.jar</bundle>
</feature>
<feature name="acrepo-jsonld-libs" version="${project.version}">
<details>Installs the JSON-LD related bundles</details>
<bundle>mvn:com.github.jsonld-java/jsonld-java/${jsonld.version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson2.version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2.version}</bundle>
<bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2.version}</bundle>
<feature version="${project.version}" dependency="true">acrepo-jackson-libs</feature>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
<bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore.version}</bundle>
<bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
<bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
</feature>
<feature name="acrepo-jackson-libs" version="${project.version}">
<details>Installs the Jackson Libraries</details>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/${jackson2.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2.version}</bundle>
</feature>
</features>
Linked Data Cache Service (PostgreSQL)
======================================
This service implements a database backend for the linked data cache service
Building
--------
To build this project use
mvn install
Deploying in OSGi
-----------------
This project can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/repository-services/LATEST/xml/features
feature:install acrepo-services-ldcache-pgsql
Configuration
-------------
The application can be configured by creating or editing the following configuration
file `$KARAF_HOME/etc/org.ops4j.datasource-ldcache.cfg`. The following values
are available for configuration:
The name of the database
databaseName=ldcache
The hostname for the database server
serverName=localhost
The port for the database server
portNumber=5432
The username for connecting to the database
user=
The password for connecting to the database
password=
By editing this file, this service will be immediately redeployed with the new values.
For more help see the [Apache Camel](http://camel.apache.org/) documentation
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>repository-services</artifactId>
<groupId>edu.amherst.acdc</groupId>
<version>1.0.1-SNAPSHOT</version>
</parent>
<artifactId>acrepo-services-ldcache-pgsql</artifactId>
<packaging>pom</packaging>
<name>PostgreSQL DataService Connector</name>
<description>OSGi dataservice connector for PostgreSQL.</description>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>src/main/cfg/edu.amherst.acdc.services.ldcache.pgsql.cfg</file>
<type>cfg</type>
<classifier>configuration</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
# These values should not be changed
osgi.jdbc.driver.name=PostgreSQL JDBC Driver
osgi.jdbc.driver.class=org.postgresql.Driver
dataSourceName=ldcacheds
# The values below should be configured to match your
# local pgsql database server.
databaseName=ldcache
serverName=localhost
portNumber=5432
user=
password=
Linked Data Cache Service
=========================
This module provides access to a linked data caching service.
Building
--------
To build this project use
mvn install
Deploying in OSGi
-----------------
Each of these projects can be deployed in an OSGi container. For example using
[Apache Karaf](http://karaf.apache.org) version 4.x and above, you can run the following
command from its shell:
feature:repo-add mvn:edu.amherst.acdc/acrepo-karaf/LATEST/xml/features
feature:install acrepo-services-ldcache
Configuration
-------------
The application can be configured by creating the following configuration
file `$KARAF_HOME/etc/edu.amherst.acdc.services.ldcache.cfg`. The following values
are available for configuration:
Set the number of seconds before items expire (0=default value: 1 day)
ldcache.timeout=0
The directory in which to store the cache files
ldcache.cacheDir=/tmp/ldcache
By editing this file, this service will be immediately redeployed
with the new configuration.
For more help see the [Apache Camel](http://camel.apache.org/) documentation
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">