AnsweredAssumed Answered

Custom metadata extracter not working on update

Question asked by cyberheap on Oct 1, 2009
I have created a custom metadata extracter based on the OpenDocument source.

I have set the overwritePolicy to EAGER, but I still can't get the extracter to work on content update.
When I add a new file the extraction works fine.

This is my custom-metadata-extrators-context.xml:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<!–
       This sample show how to modify the mappings properties of the new V2.1 Metadata Extractors.
       In this example, in addition to the default mappings, the field 'user1' is mapped to
       'cm:description'.  The available source properties is described on the Javadocs of the
       extracter class.
–>
<beans>

    <bean id="extracter.AutoCAD" class="si.agenda.repo.content.metadata.AutoCADMetadataExtracter" parent="baseMetadataExtracter" >
        <property name="inheritDefaultMapping">
            <value>false</value>
        </property>
        <property name="overwritePolicy">
                <value>EAGER</value>
        </property>
        <property name="mappingProperties">
            <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
               <property name="location">
                  <value>classpath:alfresco/extension/custom-autocad-extractor-mappings.properties</value>
               </property>
            </bean>
        </property>
    </bean>

</beans>


This is classpath:alfresco/extension/custom-autocad-extractor-mappings.properties:

namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
title=cm:description
description=cm:title

Any idea would be appreciated!

Thanks,
Primoz

Outcomes