Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Implement the indexing functionality using the org.fcrepo.indexer.Indexer interface, which consists of only two methods (one to handle new/updated records, and another to handle deleted records).  Any configuration required should be done using Java bean setter methods.
  2. Update the Spring configuration to add a bean referencing the new class and providing the configuration properties needed.
  3. Add the bean to the list of workers invoked by the indexer.

Trying Out the Indexer

The easiest way to To get hands-on experience with the indexer and see updates synced with an external triplestore is to use the kitchen sink project.  The kitchen sink offers a Fedora4 repository with the indexer pre-configured to sync to a Fuseki triplestore.  To set this up, first download and run the Fuseki triplestore.  Then build and run the pre-configured Fedora4:, you need three components:

1. Triplestore

The easiest to setup is Jena Fuseki (Fuseki setup instructions).

2. Fedora Repository

$ git clone https://github.com/futures/fcrepo-kitchen-sinkfcrepo4.git
  
$ cd fcrepo-kitchen-sinkfcrepo4
$ git checkout fuseki
$ MAVEN_OPTS = "-Xmx1024m -XX:MaxPermSize=1024m" mvn install
$ cd fcrepo-webapp
$ MAVEN_OPTS = "-Xmx512m" mvn="-Xmx512m" mvn jetty:run

3. JMS Indexer

$ git clone https://github.com/futures/fcrepo-jms-indexer-pluggable.git
$ cd fcrepo-jms-indexer-pluggable
$ mvn install
$ cd fcrepo-jms-indexer-webapp
$ mvn -Djetty.port=8081 jetty:run

The Fedora Repository Using the default settings, Fedora4 will be running at http://localhost:8080/rest/ – you can create, update and delete objects and datastreams using your browser, or using the REST API (see SPARQL Recipes).  Each event will trigger the indexer and be synced to Fuseki, which you can access at http://localhost:3030/.