cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistency in contentModel.xml

rjohnson
Star Contributor
Star Contributor
Whilst creating a new custom content model for an application, I used Jeff Potts excellent tutorial (version 2) as a way of coming to grips with what I needed to do. I downloaded the source for this tutorial and used the code in share-config-custom as per the pdf.

When I ran the code I got no properties display and a small amount of debugging showed that the audio namespace didn't exist. As I am running 4.0a and this code is tested against 4.0a I found this odd.

Looking further into it, version of contentModel.xml that I have in my installation sure enough did not have the audio namespace declared. A quick search of the internet turned up a version of contentModel.xml that did have the audio namespace and a quick diff on the files showed that my contentModel.xml was missing several other things as well. Namely:-

in namespaces
<namespace uri="http://www.alfresco.org/model/audio/1.0" prefix="audio"/>
in cm:rating
<includedInSuperTypeQuery>false</includedInSuperTypeQuery>
in cm:workingcopy aspect

             <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>false</tokenised>
               </index>
in cm:workingcopy aspect

            <property name="cm:workingCopyLabel">
               <type>d:text</type>
               <protected>true</protected>
               <mandatory>false</mandatory>
            </property>
The entire audio aspect declaration

      <aspect name="audio:audio">
         <title>Audio</title>
         <properties>
            <property name="audio:album">
               <title>Album</title>
               <type>d:text</type>
            </property>
            <property name="audio:artist">
               <title>Artist</title>
               <type>d:text</type>
            </property>
            <property name="audio:composer">
               <title>Composer</title>
               <type>d:text</type>
            </property>
            <property name="audio:engineer">
               <title>Engineer</title>
               <type>d:text</type>
            </property>
            <property name="audio:genre">
               <title>Genre</title>
               <type>d:text</type>
            </property>
            <property name="audio:trackNumber">
               <title>Track Number</title>
               <type>d:int</type>
            </property>
            <property name="audio:releaseDate">
               <title>Release Date</title>
               <type>d:date</type>
            </property>

            <property name="audio:sampleRate">
               <title>Sample Rate</title>
               <type>d:int</type>
            </property>
            <property name="audio:sampleType">
               <title>Sample Type</title>
               <description>Audio Sample Type, typically one of 8Int, 16Int, 32Int or 32Float</description>
               <type>d:text</type>
            </property>
            <property name="audio:channelType">
               <title>Channel Type</title>
               <description>Audio Channel Type, typically one of Mono, Stereo, 5.1 or 7.1</description>
               <type>d:text</type>
            </property>
            <property name="audio:compressor">
               <title>Compressor</title>
               <description>Audio Compressor Used, such as MP3 or FLAC</description>
               <type>d:text</type>
            </property>
         </properties>
      </aspect>

None of this would (is) a big issue except that the published date and version of the two (different) files is exactly the same, namely


   <published>2009-06-04</published>
   <version>1.1</version>

Now, there seems to be a breakdown in the versioning of this file and I do not know which version is packaged up with 4.0d (the current version) but the one packaged up with 4.0a was clearly the wrong one.

Two questions:-
    1. Should I raise JIRA on this?
    2. Can I just copy the contentModel.xml with the "extras" in it over my existing contentModel.xml or are there dependencies?
Thanks in advance for your help.

Bob Johnson
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Glad the tutorial was useful to you!

I can confirm that the missing items you list were indeed absent from 4.0.a. But they were fixed in 4.0.b so there is no need to raise a Jira.

You should be able to correct those problems manually in your 4.0.a model. If you diff the model between 4.0.a and 4.0.d you'll see that the audio namespace and aspect, the includedInSuperTypeQuery entries, and a property called cm:workingCopyLabel are the only differences, and I don't think any of those will cause a problem if backported to 4.0.a.

Jeff