<model name="rn:renditionmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!-- The Alfresco Rendition Service Model (since 3.3) -->
   <description>Alfresco Rendition Model</description>
   <author>Alfresco</author>
   <published>2010-01-14</published>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>
   
   <namespaces>
      <namespace uri="http://www.alfresco.org/model/rendition/1.0" prefix="rn"/>
   </namespaces>
   
   <types>
      <!-- Thumbnail content type -->
      <type name="cm:thumbnail">
         <title>Thumbnail</title>
         <parent>cm:content</parent>
         <archive>true</archive>
         <includedInSuperTypeQuery>false</includedInSuperTypeQuery>
         <properties>     
            <property name="cm:thumbnailName">
                <title>Thumbnail Name</title>
                <type>d:text</type>
                <mandatory>false</mandatory>
            </property>     
            <property name="cm:contentPropertyName">
                <title>Thumbnailed Content Property Name</title>
                <type>d:qname</type>
                <mandatory>true</mandatory>
            </property>                
         </properties>
      </type>
   </types>
   
   <aspects>
      <!-- This aspect marks a node as a rendition. -->
      <aspect name="rn:rendition">
         <title>Rendition</title>
      </aspect>
      <!-- A hidden rendition is one which is located directly under its source node. -->
      <aspect name="rn:hiddenRendition">
         <title>Hidden Rendition</title>
         <parent>rn:rendition</parent>
      </aspect>
      <!-- A visible rendition is one which is located somewhere other than under its source node. -->
      <aspect name="rn:visibleRendition">
         <title>Visible Rendition</title>
         <parent>rn:rendition</parent>
      </aspect>

      <!-- This aspect is applied to nodes which have been "rendered" using the rendition service. -->
      <aspect name="rn:renditioned">
         <title>Renditioned</title>
         <associations>
            <!-- This association links the source content node to the rendition -->
            <child-association name="rn:rendition">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </child-association>
         </associations>
      </aspect>



      <!-- Thumbnailed aspect relates a content node to it's thumbnails.
           It is retained here for backwards compatibility reasons -->
      <aspect name="cm:thumbnailed">
         <title>Thumbnailed</title>
            <parent>rn:renditioned</parent>
         <properties>              
            <property name="cm:automaticUpdate">
               <title>Automatic Update</title>
               <type>d:boolean</type>
               <mandatory>true</mandatory>
               <default>true</default>
            </property> 
         </properties>
      </aspect>
      
   </aspects>

</model>
