AnsweredAssumed Answered

CIFS and Metadata Extraction ?

Question asked by vivi on May 15, 2008
Latest reply on May 29, 2008 by cleseach
Hello,

I have a problem with CIFS and the metadata extraction.

I have defined a personal type with the following aspect:
release date, Number of the document, Issue, Source.


Below are the configuration files:
custom-model-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <!– Registration of new models –>
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customModel.xml</value>
            </list>
        </property>
    </bean>
</beans>

customModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="perso:persomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Perso Model</description>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.someco.com/model/content/1.0" prefix="perso" />
   </namespaces>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="perso:doc">
      <title>Perso Document</title>
      <parent>cm:content</parent>
      <properties>
        <property name="perso:releasedDate">
          <type>d:date</type>
          <mandatory>false</mandatory>
        </property>
        <property name="perso:docNum">
          <type>d:text</type>
          <mandatory>false</mandatory>
        </property>
        <property name="perso:issue">
          <type>d:text</type>
          <mandatory>false</mandatory>
        </property>
        <property name="perso:source">
          <type>d:text</type>
          <mandatory>false</mandatory>
        </property>
        <!–<property name="perso:confidential">
          <type>d:boolean</type>
          <mandatory>false</mandatory>
        </property>–>
      </properties>
      <!–
      <associations>
        <association name="perso:appDocument">
          <title>Applicable Document</title>
          <source>
            <mandatory>false</mandatory>
            <many>true</many>
          </source>
          <target>
            <class>cm:content</class>
            <mandatory>false</mandatory>
            <many>true</many>
          </target>
        </association>
        <association name="perso:refDocument">
          <title>Reference Document</title>
          <source>
            <mandatory>false</mandatory>
            <many>true</many>
          </source>
          <target>
            <class>perso:doc</class>
            <mandatory>false</mandatory>
            <many>true</many>
          </target>
        </association>       
      </associations>
      –>
      <mandatory-aspects>
        <aspect>cm:versionable</aspect>
      </mandatory-aspects>
    </type>
   </types>

</model>

web-client-config-custom.xml

<alfresco-config>

     <!– Example of adding languages to the list in the login page –>
   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="de_DE">German</language>
         <language locale="es_ES">Spanish</language>
         <language locale="fr_FR">French</language>
         <language locale="it_IT">Italian</language>
      </languages>
   </config>

  <!– Modify the view  available in the web client –>
  <config evaluator="string-compare" condition="Views">
    <!– the views available in the client –>
    <views>
      <!– default values for the views available in the client –>
      <view-defaults>
        <browse>
         <!– allowable values: list|details|icons –>
          <view>details</view>
          <page-size>
            <list>10</list>
            <details>20</details>
            <icons>9</icons>
          </page-size>
         </browse>
      </view-defaults>
    </views>
  </config>



  <!– Add type properties to property sheet –>
  <config evaluator="node-type" condition="perso:doc">
    <property-sheet>
      <show-property name="perso:releasedDate" display-label-id="releasedDate" />
      <show-property name="perso:docNum" display-label-id="docNum" />
      <show-property name="perso:issue" display-label-id="issue" />
      <show-property name="perso:source" display-label-id="source" />
    </property-sheet>
  </config>
 
  <!– Add types to add content list –>
  <config evaluator="string-compare" condition="Content Wizards">
    <content-types>
      <type name="perso:doc" />
    </content-types>
  </config>

 
  <config evaluator="string-compare" condition="Action Wizards">
    <!– The list of types shown in the is-subtype condition –>
    <subtypes>
      <type name="perso:doc" />
    </subtypes>
   
    <!– The list of content and/or folder types shown in the specialise-type action –>
    <specialise-types>
      <type name="perso:doc" />
    </specialise-types>
  </config>
 
  <!– Add Advanced Search –>
  <config evaluator="string-compare" condition="Advanced Search">
    <advanced-search>
      <content-types>
        <type name="perso:doc" />
      </content-types>
      <custom-properties>
        <meta-data type="perso:doc" property="perso:releasedDate" display-label-id="releasedDate"/>
        <meta-data type="perso:doc" property="perso:docNum" display-label-id="docNum"/>
        <meta-data type="perso:doc" property="perso:source" display-label-id="source"/>
        <meta-data type="perso:doc" property="perso:confidential" display-label-id="confidential"/>
      </custom-properties>
    </advanced-search>
  </config>
 
</alfresco-config>

webclient.properties

#perso:doc
releasedDate=Released Date
docNum=Document N
issue=Issue/Revision
source=Source


1. No rules were defined. When I put a new file (MSword by example) into Alfresco:
- using the web browser, the type by default is "content" (the default type defined in Alfresco). All metadata (Name, Title, Author) are automaticaly filled in.
- using CIFS (drag and drop), the title and author are not automaticaly filled…

2. Then, if I apply a rule to the document to specialize it with my personal type, when the document was introduice in Alfresco with:
- the web browser, the "content" metadata and the one predefinie by my personal type appear.
- the CIFS, I only get the aspect I have defined in my personal tpe but not the one from the content type…

If I use a rule which specialises the type of each new document with my personal type, I get the same as 2.

My questions are:
Why metadata such as Title and Author are not automatically filled when using the CIFS?
Why, when I apply the same rule to the same file but introduice in Alfresco eather by CIFS or the web browser, the result is different?

How can I solve this problem?

Thanks a lot!

Outcomes