cancel
Showing results for 
Search instead for 
Did you mean: 

CIFS and Metadata Extraction ?

vivi
Champ in-the-making
Champ in-the-making
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!
7 REPLIES 7

steve
Champ in-the-making
Champ in-the-making
Hi,

When using the client, the client does some work for you (such as prompting the server to extract metadata from files you upload).
When using CIFS, you are going straight to the server, so the extra work the client does on your behalf is omitted.

To automatically get metadata extracted CIFS files, you can create a rule on the space you are uploading to that does the action "Extract common metadata fields from content".
This will then do the same thing.

Hope this helps,

Steve

vivi
Champ in-the-making
Champ in-the-making
Hello!

It works, many thanks!
Alfresco correctly extracts the Author.
I have noticed the created and modified dates are the dates when the document was introduiced into Alfresco and not the dates when the document was really created/modified… Why? How to also pick up the good dates?

Just a question. Is it possible to use to configure a file instead of creating a rule to automise the metadata extraction?

Thanks.

lakshmi
Champ in-the-making
Champ in-the-making
Hi Steve,

"Extract common metadata fields from content" works, but it extracts only the Author property, why doesnt it extract title and description?
Anyway i can achieve to extract both title and description?

Also i have the same question wrt modified/created date.

Thanks,
Lakshmi

vivi
Champ in-the-making
Champ in-the-making
Hello,

When we use CIFS, Author, title are correctly extracted but not the dates… dates which are written are those when the document was introduiced into Alfresco and not the real date of creation/modification…

Are we only 2 having this problem?

cleseach
Star Contributor
Star Contributor
Hello,

Created and Modified dates are relevant to Alfresco repository.
The "real date of creation/modification" is file system information, not content metadata. Metadata Extraction looks into binary content to find properties values; as "real date of creation/modification" are not stored in binary content, they can't be extracted.
Am I clear enough ?

Regarding title and author, are you sure your document has such information ?

Regards,
Charles

vivi
Champ in-the-making
Champ in-the-making
Hello,

Thank you for your answer cleseach!
I understand that the date information are not writen in the file itself as Author or Title do, but in the file system.
So there is no way to collect it with Alfresco, am I right? If not, how to get it, is there another way to do it?

cleseach
Star Contributor
Star Contributor
I'm not a CIFS expert, but I think your right.

Regards,
Charles