cancel
Showing results for 
Search instead for 
Did you mean: 

Custom metadata extractor

anovotny
Champ in-the-making
Champ in-the-making
Hello,
I tried to follow this wiki page - http://wiki.alfresco.com/wiki/Metadata_Extraction, but I am making mistake somewhere – it simply doesn’t work.
I need to extract the value from document properties (let’s say keyword) to my custom property (let’s say bc:testovaci)
What I did:
In folder c:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\ created the file mswordprop-extractor-context.xml

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

<beans>
<bean id="extracter.Office" class="org.alfresco.repo.content.metadata.OfficeMetadataExtracter" parent="baseMetadataExtracter" >
  <property name="inheritDefaultMapping">
    <value>true</value>
  </property>
  <property name="mappingProperties">
    <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
      <property name="location">
        <value>classpath:alfresco/extension/mswordprop-extractor-mappings.properties</value>
      </property>
    </bean>
  </property>
</bean>  
</beans>

And the file
mswordprop-extractor-mappings.properties

namespace.prefix.bc=http://www.bcdokumentace.com/model/content/1.0
KEYWORDS=bc:testovaci

Created the rule „Extract common metadata field from context“.
The standard fileds are loaded, but the custom one not.
Tested with Word 2003 and 2007 and loading through web interface and CIFS.
Still the same.
Do I miss something?
Thank you.
Ales
1 REPLY 1

shikarishambu
Champ in-the-making
Champ in-the-making
It looks like you are using a custom content model. So, here is how you do it

1. Define the custom content model
2. Update the custom-metadata-extrators-context.xml
3. Update the webclient.properties
4. Update the web-client-config-custom.xml

All these files should be located under tomcat/shared/classes/alfresco/extension

There is a great post on this at http://ecmarchitect.com/images/articles/alfresco-content/content-article.pdf

Thanks