AnsweredAssumed Answered

Getting a filename with myExtracter class

Question asked by alf983 on Dec 25, 2007
Latest reply on Jan 16, 2008 by kevinr
Can I get the filename with the extracter class?

This is (example)

package org.alfresco.repo.content.metadata;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;

import org.alfresco.repo.content.metadata.AbstractMetadataExtracter;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.namespace.QName;

public class myExtracter extends AbstractMetadataExtracter {
   public static String[] SUPPORTED_MIMETYPES = new String[] {

   //static final QName PROP_AUTHOR = QName.createQName("", "author");

   static final QName PROP_DURATA = QName.createQName("", "durata");
   static final QName PROP_RISOL = QName.createQName("", "resolution");
   static final QName PROP_ARTISTA = QName.createQName("", "artista");
  // static final QName PROP_NAMEFILE = QName.createQName("','filename");

   public myExtracter() {
      super(new HashSet<String>(Arrays.asList(SUPPORTED_MIMETYPES)), 1.0,

   public void extractInternal(ContentReader reader,final Map<QName, Serializable> destination) throws Throwable {

      String content2=reader.getContentUrl();
      Long size=reader.getSize();
      trimPut(PROP_DURATA, content2 , destination);
      trimPut(PROP_RISOL, size.toString() , destination);
      trimPut(PROP_ARTISTA, content2 , destination);

Help me!!!
Thanks!! :lol: