AnsweredAssumed Answered

Alfresco Extracter and versioning

Question asked by lplp on May 7, 2015
Latest reply on May 12, 2015 by lplp
Hi,
we have built a custom MetadataExtractor combined with a custom ContentType for our own needs.
We think we made all the correct declarations.

When we create a file, all happens correctly :
- File is created with the correct ContentType (adding th new metadata)
- those metadata are populated by the custom extracter.

As seen in the log:
2015-05-07 14:13:40,907  DEBUG [content.metadata.AbstractMappingMetadataExtracter] [http-apr-8080-exec-12] Extracted Metadata from ContentAccessor[ contentUrl=store://2015/5/7/14/13/1056d1ec-91fd-40d7-84ba-02d674f58172.bin, mimetype=application/vnd.ms-excel, size=23552, encoding=UTF-8, locale=fr_FR]
  Found: {refExploitPrincipale=uneSuperbeRef, meta:last-author=null, meta:save-date=2015-05-06T17:14:23Z, Last-Author=null, subject=Objet du fichier de test, Application-Name=Microsoft Excel, dcterms:created=2006-09-16T00:00:00Z, Author=null, siteA=unSuperSiteA, date=2015-05-06T17:14:23Z, statutFiche=Actif, creator=null, objetFiche=unSuperObjet, Creation-Date=2006-09-16T00:00:00Z, author=null, title=Le super titre du ficher de test, meta:author=null, created=2006-09-16T00:00:00Z, description=Objet du fichier de test, cp:subject=Objet du fichier de test, extended-properties:Application=Microsoft Excel, Last-Save-Date=2015-05-06T17:14:23Z, dc:title=Le super titre du ficher de test, dcterms:modified=2015-05-06T17:14:23Z, meta:creation-date=2006-09-16T00:00:00Z, dc:creator=null, Last-Modified=2015-05-06T17:14:23Z, modified=2015-05-06T17:14:23Z, liaison=Liaison type 3, Content-Type=application/vnd.ms-excel, comments=null}
  Mapped and Accepted: {{http://www.sfr.com/model/content/1.0}Site_A=unSuperSiteA, {http://www.sfr.com/model/content/1.0}Objet=unSuperObjet, {http://www.sfr.com
/model/content/1.0}statut=Actif, {http://www.sfr.com/model/content/1.0}Ref_exploit_principale=uneSuperbeRef, {http://www.sfr.com/model/content/1.0}Liaison=Liais
on type 3}
2015-05-07 14:13:40,907  DEBUG [content.metadata.AbstractMappingMetadataExtracter] [http-apr-8080-exec-12] Completed metadata extraction:
   reader:    ContentAccessor[ contentUrl=store://2015/5/7/14/13/1056d1ec-91fd-40d7-84ba-02d674f58172.bin, mimetype=application/vnd.ms-excel, size=23552, encoding=UTF-8, locale=fr_FR]
   extracter: com.sfr.extracter.FicheAttribExtracter@7d513a95
   changed:   {{http://www.sfr.com/model/content/1.0}Site_A=unSuperSiteA, {http://www.sfr.com/model/content/1.0}Objet=unSuperObjet {http://www.sfr.com/model/content/1.0}statut=Actif, {http://www.sfr.com/model/content/1.0}Ref_exploit_principale=uneSuperbeRef, {http://www.sfr.com/model/content/1.0}Liaison=Liaison type 3
}



But if i create a new version of the file, although the Extracter is actually fired up and new metada gets read, nothing in written in the new node :

2015-05-07 14:17:11,258  DEBUG [content.metadata.AbstractMappingMetadataExtracter] [http-apr-8080-exec-15] Extracted Metadata from ContentAccessor[ contentUrl=store://2015/5/7/14/17/cdc1e226-9e1b-44fa-abd9-77aec9e6fc93.bin, mimetype=application/vnd.ms-excel, size=23552, encoding=UTF-8, locale=fr_FR]
  Found: {refExploitPrincipale=uneSuperbeRef, meta:last-author=null, meta:save-date=2015-05-07T12:16:34Z, Last-Author=null, subject=Objet du fichier de test, Application-Name=Microsoft Excel, dcterms:created=2006-09-16T00:00:00Z, Author=null, siteA=unSuperSiteA, date=2015-05-07T12:16:34Z, statutFiche=Resilie, creator=null, objetFiche=unSuperObjet, Creation-Date=2006-09-16T00:00:00Z, author=null, title=Le super titre du ficher de test, meta:author=null, created=2006-09-16T00:00:00Z, description=Objet du fichier de test, cp:subject=Objet du fichier de test, extended-properties:Application=Microsoft Excel, Last-Save-Date=2015-05-07T12:
16:34Z, dc:title=Le super titre du ficher de test, dcterms:modified=2015-05-07T12:16:34Z, meta:creation-date=2006-09-16T00:00:00Z, dc:creator=null, Last-Modified=2015-05-07T12:16:34Z, modified=2015-05-07T12:16:34Z, liaison=Liaison type 3, Content-Type=application/vnd.ms-excel, comments=null}
  Mapped and Accepted: {}
2015-05-07 14:17:11,258  DEBUG [content.metadata.AbstractMappingMetadataExtracter] [http-apr-8080-exec-15] Completed metadata extraction:
   reader:    ContentAccessor[ contentUrl=store://2015/5/7/14/17/cdc1e226-9e1b-44fa-abd9-77aec9e6fc93.bin, mimetype=application/vnd.ms-excel, size=23552, encoding=UTF-8, locale=fr_FR]
   extracter: com.sfr.extracter.FicheAttribExtracter@7d513a95
   changed:   {}


We can't find out what we did wrong.

Does anybody has an idea ?

Thanx for help.

Regards,

Laurent

Outcomes