AnsweredAssumed Answered

v2.1 extractor problem on Office document custom property

Question asked by col_edinburgh on Jul 4, 2011
Latest reply on Jul 4, 2011 by col_edinburgh
I am trying to get the extractor to scrape a custom property called 'customerid' from a MS Word file.
I can't get my custom extractor to work, any help would be appreciated. Here are the steps i have taken:

1. created custom aspect in 'customModel.xml file
<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –>
<!–       types and aspects added here will automatically be registered –>

<model name="custom:customModel" xmlns="">

   <!– Optional meta-data about the model –>
   <description>Custom Model</description>

          <!– Import Alfresco Dictionary Definitions –>
      <import uri="" prefix="d"/>
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="" prefix="cm"/>

   <!– Introduction of new namespaces defined by this model –>
   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
      <namespace uri="custom.model" prefix="custom"/>
<!– Definition of new Content Aspect: Customer Details –>

<aspect name="custom:CustomerDetails">
<title>Customer Details</title>
<property name="custom:CustomerName">
<title>Customer Name</title>

2. added new aspect to 'web-client-config-custom.xml'
<!– Lists the custom aspect in business rules Action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<aspect name="custom:CustomerDetails"/>
<!– Displays the properties in view details page –>
<config evaluator="aspect-name" condition="custom:CustomerDetails">
<separator name="sepCust1" display-label="Customer Details" component-generator="HeaderSeparatorGenerator" />
<show-property name="custom:CustomerName"/>
3. added property to 'custom-metadata-extrators-context.xml'
<?xml version='1.0' encoding='UTF-8'?>

       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.
<bean id="extracter.Office" class="org.alfresco.repo.content.metadata.OfficeMetadataExtracter" parent="baseMetadataExtracter" >
<property name="inheritDefaultMapping">
<property name="mappingProperties">
<bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location">

I have added two content rules to the space: 1. add the custom aspect to all items and 2. extract common metadata field to all items

The aspect is added to the new content item but the new custom property is always blank.