Versions Compared

Key

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

The JcrXmlPersistenceIndexer listens to the repository generated JMS events to persist and persists metadata in JCR/XML format to the file system. It implements the org.fcrepo.indexer.Indexer interface for the indexing functionalityfunctionalities, which consists of the methods to handle new/updated records and deleted records.

JCR/XML is a native data format that supported by Modeshape for backup and recovery. In the case of system failure that we need to recovery recover the system repository or share the metadata with other organizations, we can use the persisted JCR/XML to files serve this purpose.

Info

The JCR/XML is files are stored level by level under the configured directory fcrepo.jcrxml.storage , or (default to fcrepo4-jcrxml), one level folder for metadata and sub-containers in one folder, and it under a Modeshape JCR container. At this time, the persisted JCR/XML files contains no binary values at this time.

Configuration

The indexer is configured using Spring that can be done using with Java bean setter methods.  Here is a sample configuration fragment showing how to configure and use the JcrXmlPersistenceIndexer:

No Format
  <!-- jcr/xml persistence Indexer -->
  <bean id="jcrXmlPersist" class="org.fcrepo.indexer.persistence.JcrXmlPersistenceIndexer">
    <constructor-arg value="${fcrepo.jcrxml.storage:fcrepo4-jcrxml}" />
  </bean>
 
  <!-- MainMessage Driven indexerPOJO class(MDP) that processesmanages events, gets RDF from the repository and calls the workersindividual 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="jcrXmlPersist"/>
        ...
      </set>
    </constructor-arg>
    ...
  </bean>