Excerpt |
---|
The SparqlIndexer listens to the repository generated JMS events and index records to a the triplestore like Fuseki, Sesame etc. It implements the org.fcrepo.indexer.Indexer interface for the indexing functionalities, which consists of the methods to handle new/updated records and deleted records. |
Once the SparqlIndexer configured to index the records, we can use the triplestore to perform external SPARQL searchings with with the SPARQL Recipes.
Info |
---|
The triplestore need to be started before running the message consumer web app. Please follow the instructions to setup the a triplestore. |
Configuration
The SparqlIndexer is indexer is configured using Spring that can be done using through the Java bean setter methods. Here is a sample configuration fragment showing how to configure and use itthe SparqlIndexer:
No Format |
---|
<!-- sparql-update indexer --> <bean id="sparqlUpdate" class="org.fcrepo.indexer.sparql.SparqlIndexer"> <!-- fuseki --> <property name="queryBase" value="http://${fuseki.host:localhost}:${fuseki.port:3030}/test/query"/> <property name="updateBase" value="http://${fuseki.host:localhost}:${fuseki.port:3030}/test/update"/> <property name="formUpdates"> <value type="java.lang.Boolean">false</value> </property> <!-- sesame --> <!-- <property name="queryBase" value="http://${sesame.host:localhost}:${sesame.port:8081}/openrdf-sesame/repositories/test"/> <property name="updateBase" value="http://${sesame.host:localhost}:${sesame.port:8081}/openrdf-sesame/repositories/test/statements"/> <property name="formUpdates"> <value type="java.lang.Boolean">true</value> </property> --> </bean> <!-- Message Driven POJO (MDP) that manages individual indexers --> <bean id="indexerGroup" class="org.fcrepo.indexer.IndexerGroup"> <constructor-arg name="repositoryURL" value="http://${fcrepo.host:localhost}:${fcrepo.port:8080}${fcrepo.context:/}rest" /> <constructor-arg name="indexers"> <set> ... <ref bean="sparqlUpdate"/> ... </set> </constructor-arg> ... </bean> |