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

   <description>Alfresco Repository System Definitions</description>
   <author>Alfresco</author>
   <published>2005-09-29</published>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
   </imports>

   <namespaces>
      <namespace uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
   </namespaces>

   <types>

      <type name="sys:base">
         <title>Base</title>
         <mandatory-aspects>
            <aspect>sys:referenceable</aspect>
         </mandatory-aspects>
      </type>

      <type name="sys:descriptor">
         <title>Descriptor</title>
         <parent>sys:base</parent>
         <properties>
            <property name="sys:versionMajor">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:versionMinor">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:versionRevision">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:versionLabel">
               <type>d:text</type>
            </property>
            <property name="sys:versionBuild">
               <type>d:text</type>
            </property>
            <property name="sys:versionSchema">
               <type>d:int</type>
               <mandatory enforced="true">true</mandatory>
               <default>0</default>
            </property>
            <property name="sys:versionEdition">
               <type>d:any</type>
               <multiple>true</multiple>
            </property>               
            <property name="sys:versionProperties">
               <type>d:content</type>
               <multiple>false</multiple>
            </property>               
         </properties>
      </type>      

      <type name="sys:container">
         <title>Container</title>
         <parent>sys:base</parent>
         <associations>
            <child-association name="sys:children">
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>sys:base</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </child-association>
         </associations>
      </type>

      <type name="sys:store_root">
         <title>Store Root</title>
         <parent>sys:container</parent>
         <mandatory-aspects>
            <aspect>sys:aspect_root</aspect>
         </mandatory-aspects>
      </type>

      <type name="sys:reference">
         <title>Reference</title>
         <parent>sys:base</parent>
         <properties>
            <property name="sys:reference">
               <type>d:noderef</type>
               <mandatory enforced="true">true</mandatory>
            </property>
         </properties>
      </type>
      
   </types>


   <aspects>

      <aspect name="sys:aspect_root">
         <title>Root</title>
      </aspect>

      <!-- aspect to store the fundamental node identifiers -->
      <aspect name="sys:referenceable">
         <title>Referenceable</title>
         <properties>
            <property name="sys:store-protocol">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:store-identifier">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:node-uuid">
               <type>d:text</type>
               <mandatory enforced="true">true</mandatory>
            </property>
            <property name="sys:node-dbid">
               <type>d:long</type>
               <mandatory enforced="true">true</mandatory>
            </property>
         </properties>
      </aspect>

      <!-- aspect to tag incomplete nodes -->
      <aspect name="sys:incomplete">
         <title>Incomplete</title>
      </aspect>
      
      <!-- aspect to tag temporary nodes -->
      <aspect name="sys:temporary">
         <title>Temporary</title>
      </aspect>
      
      <!-- details stored on archived nodes -->
      <aspect name="sys:archived">
         <title>Archived</title>
         <properties>
            <property name="sys:archivedOriginalParentAssoc">
               <type>d:childassocref</type>
               <mandatory>true</mandatory>
            </property>
            <property name="sys:archivedBy">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="sys:archivedDate">
               <type>d:datetime</type>
               <mandatory>true</mandatory>
            </property>
            <property name="sys:archivedOriginalOwner">
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>
      <aspect name="sys:archived-assocs">
         <properties>
            <property name="sys:archivedParentAssocs">
               <type>d:childassocref</type>
               <mandatory>false</mandatory>
               <multiple>true</multiple>
               <index enabled="false" />
            </property>
            <property name="sys:archivedChildAssocs">
               <type>d:childassocref</type>
               <mandatory>false</mandatory>
               <multiple>true</multiple>
               <index enabled="false" />
            </property>
            <property name="sys:archivedSourceAssocs">
               <type>d:assocref</type>
               <mandatory>false</mandatory>
               <multiple>true</multiple>
               <index enabled="false" />
            </property>
            <property name="sys:archivedTargetAssocs">
               <type>d:assocref</type>
               <mandatory>false</mandatory>
               <multiple>true</multiple>
               <index enabled="false" />
            </property>
         </properties>
      </aspect>

      <!--
         Localization:
         If you add this aspect to a node, then the server will assume that all non-multilingual
         properties apply to this locale.
      -->
      <aspect name="sys:localized">
         <title>Translation</title>
         <properties>
            <property name="sys:locale">
               <title>Locale</title>    
               <type>d:locale</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
      </aspect>

   </aspects>

</model>