Versions Compared

Key

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

The FileSerializer listens to the JMS events generated from the repository generated JMS events to convert metadata . It converts the generated RDF to SOLR document format with field names and persist name fields, and persists it to the file system. It implements the org.fcrepo.indexer.Indexer interface for the indexing functionalitiesfunctionality, which consists of the methods to handle new/updated records and deleted records.

Info

The FileSerializer serializes the converted SOLR document format with field names generated files are stored under the configured directory file.serializer.dir , which is in flat structure with a file name that concatenates the id and the timestamp like , e.g. id@yyyyMMddHHmmss.

Configuration

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

No Format
  <!-- file serializer -->
  <bean id="fileSerializer" class="org.fcrepo.indexer.FileSerializer">
    <property name="path" value="${file.serializer.dir:./target/test-classes/fileSerializer/}"/>
  </bean>
 
  <!-- Message MainDriven indexerPOJO class(MDP) that processesmanages events, gets RDF from the repository and convert it to SOLR document format, then calls the workers 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="fileSerializer"/>
        ...
      </set>
    </constructor-arg>
    ...
  </bean>