AnsweredAssumed Answered

Custom Extractor problem

Question asked by nabilblk on Aug 3, 2009
Latest reply on Aug 11, 2009 by nabilblk
Hi every body  ,

I have some problem with my custom extractor :
This is my code :

One class MyExtracter :

public class MyExtracter extends AbstractMappingMetadataExtracter {

   private static final String KEY_CUSTOM = "N_CMDE";
   public static String[] SUPPORTED_MIMETYPES = new String[] {

   public BWTExtracter() {
       super(new HashSet<String>(Arrays.asList(SUPPORTED_MIMETYPES)));

protected Map<String, Serializable> extractRaw(ContentReader reader)
      throws Throwable {
      Map<String, Serializable> rawProperties = newRawMap();
                   InputStream in=reader.getContentInputStream();     
      String myString = IOUtils.toString(in, "UTF-8");
                   putRawValue(KEY_CUSTOM, myString, rawProperties);
       return rawProperties;
My properties file :

# Namespaces
# Mappings

Change the <WEB-INF>/classes/alfresco/content-services-context.xml file :

<bean id=""
parent="baseMetadataExtracter" />

when i run this and add a custom content that correspond this extraction , the method extractRaw are executed (I verify this with a debugger from eclipse) and the method return a Map with the custom properties and here value .

But the value of custom property in the screen is always blanc ..

Do you have any idea ??