This module allows Sesame Sail-compliant triplestores to be plugged into the Trippi triplestore interface, ultimately allowing them to be used with the Fedora Commons Repository.
This module requires the following:
The code should be able to be built with Maven 3, simply cloning the repository, navigating into the cloned repository and calling:
mvn package
By default, this builds against Fedora 3.8.1. To build against other versions of Fedora, the fedora.version
parameter can be passed, something like:
mvn package -Dfedora.version=3.7.1
Packaging should generate both a zip
and tar.gz
file inside of the target
directory.
NOTE: To run the "remote" Blazegraph tests, the remoteBlazegraph
property must be passed:
# Assuming Blazegraph is running on port 9999 on the localhost.
mvn package -DremoteBlazegraph=http://localhost:9999/blazegraph
-
Install your Sail-compliant triplestore. NOTE: Do not put it in the same servlet container as Fedora, since Fedora cannot be running when rebuilding the RI.
-
Extract the archive onto your target machine. Let's assume we have extracted it into
/opt/trippi-sail
. -
Configure Fedora to know of the extracted JARs, in
$CATALINA_BASE/conf/Catalina/localhost/fedora.xml
:<Context> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/opt/trippi-sail/*.jar" searchVirtualFirst="true"/> [...] </Context>
NOTE: It may be desirable (or necessary) to add other paths to the
virtualClasspath
value if you are using a triplestore, in order to make the relevant classes available for the next step. -
Use Spring Bean configuration to inject a
org.openrdf.repository.Repository
implementation into ourorg.trippi.impl.sesame.SesameSession
class. See the examples in thesrc/main/resources/sample-bean-config-xml
directory from the source or/opt/trippi-sail/example-bean-xml
directory from the extracted binary package for examples. The XML file should be created in$FEDORA_HOME/server/config/spring
. -
Remove the reference to the resource index datastore in
$FEDORA_HOME/server/config/fedora.fcfg
; commenting it out should suffice. The section in particular is something like:<server xmlns="http://www.fedora.info/definitions/1/0/config/" class="org.fcrepo.server.BasicServer"> [...] <module role="org.fcrepo.server.resourceIndex.ResourceIndex" class="org.fcrepo.server.resourceIndex.ResourceIndexModule"> [...] <!-- Remove/comment out following param[@name="datastore"] bit in this module. --> <param name="datastore" value="localMulgaraTriplestore"> <comment>(required) Name of the triplestore to use. WARNING: changing the triplestore running the Resource Index Rebuilder.</comment> </param> [...] </module> [...] </server>
-
The RI rebuild does not use the same classloader used by Tomcat, so the above
virtualClasspath
is not sufficient. In order to be able to run the rebuild, the classpath will have to be added to the rebuild command. The easiest way to do this is to prepend to the-cp
entry in$FEDORA_HOME/server/bin/env-server.sh
; enter the path to the directory, followed by an asterisk, like:/opt/trippi-sail/*
. -
Trippi as embedded in Fedora itself can have Sesame/OpenRDF jars built-in, which cause NullPointerExceptions when querying, so it may be necessary to move/rename
$CATALINA_BASE/webapps/fedora/WEB-INF/lib/openrdf-sesame-onejar-{version}.jar
such that it is not eligible for the classloader (change the extension away fromjar
or delete the file entirely, or move it somewhere else).. -
Now, we should be clear to stop Fedora, rebuild the RI and start Fedora, and that should be it: You should now be running Fedora with your other triplestore backing the RI.
Having problems or solved a problem? Contact discoverygarden.
Current maintainers:
If you would like to contribute to this module, please check out our helpful Documentation for Developers info, Developers section on Islandora.ca and contact discoverygarden.