AnsweredAssumed Answered

Adding a mime type and transforming content via openoffice

Question asked by hikenboots on Feb 22, 2006
Latest reply on Feb 23, 2006 by derek
I really need help with this, I must say that I'm feeling my way along in the dark.  I have a client who is interested in Alfresco but has a significant amount of work product in WordPerfect which must be full text indexed.  Doesn't seem insurmountable since openoffice will open a .wpd if you associate the filetype.

I have read extensively through the wiki, particurlarly http://www.alfresco.org/mediawiki/index.php/Content_Transformations and still have issues. 

Seems straightforward…
1. Create a mime type
2. Associate a transformer with the mime type in the transformer registry

In mimetype-map.xml:
         <mimetype mimetype="application/wordperfect" display="Corel WordPerfect">
            <extension>wpd</extension>
         </mimetype>

In content-services-context.xml:
add something like:
      <property name="explicitTransformations">
         <list>
            <list>
               <value>application/wordperfect</value>
          <value>text/plain</value>
               <ref bean="transformer.complex.OpenOffice.PdfBox" />
            </list>
         </list>
      </property>
to:
   <!– Content Transformation Regisitry –>
   <bean id="contentTransformerRegistry" class="org.alfresco.repo.content.transform.ContentTransformerRegistry" >
      <constructor-arg>
         <ref bean="mimetypeService" />
      </constructor-arg>
   </bean>

and use:
   <bean id="transformer.complex.OpenOffice.PdfBox"
        class="org.alfresco.repo.content.transform.ComplexContentTransformer"
        parent="baseContentTransformer" >
      <property name="transformers">
         <list>
            <ref bean="transformer.OpenOffice" />
            <ref bean="transformer.PdfBox" />
         </list>
      </property>
      <property name="intermediateMimetypes">
         <list>
            <value>application/pdf</value>
         </list>
      </property>
   </bean>

If anyone can offer help or advice, I'd be very grateful.

Outcomes