AnsweredAssumed Answered

about student registration model

Question asked by hdalang on Feb 15, 2015
Latest reply on Feb 23, 2015 by muralidharand
I have created the following model and it's not working, can someone tell if have written my model in the right way:

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="iua:studentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
    <!– Optional meta-data about the model –>
    <description>Student Details</description>
    <author>Hisham Khartoum</author>
    <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.iua.edu.sd/model/content/1.0" prefix="iua" />
    </namespaces>
    <constraints>
        <constraint name="iua:studentSelectGender" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Male</value>
                    <value>Female</value>
                </list>
            </parameter>
        </constraint>
        <constraint name="iua:studentSelectCourseType" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Diploma</value>
                    <value>Bachelor</value>
                    <value>Master</value>
                    <value>PHD</value>
                </list>
            </parameter>
        </constraint>
       
        <constraint name="iua:studentContactNo" type="MINMAX">
            <parameter name="minValue">
            <value>1</value>
            </parameter>
            <parameter name="maxValue">
            <value>99999999999999</value>
            </parameter>
        </constraint>
        <constraint name="iua:studentSelectCountry" type="LIST">
            <parameter name="allowedValues">
                <list>
                    <value>Afghanistan</value>
                    <value>Albania</value>
                    <value>Algeria</value>
                    <value>American Samoa</value>
                    <value>Andorra</value>
               
                </list>
            </parameter>
        </constraint>
    </constraints>
   <types>
        <type name="iua:stdBachelorReg">
            <title>Student Registration Details</title>
            <parent>cm:content</parent>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
        <type name="iua:stdHigherDiplomaReg">
            <title>Student Registration Details for Higher Diploma</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
        <type name="iua:stdMasterReg">
            <title>Student Registration Details for Master Degree</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
        </type>
        <type name="iua:stdPHDReg">
            <title>Student Registration Details for PHD Degree</title>
            <parent>cm:content</parent>
            <properties>
                <property name="iua:studentBachelor">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
            </property>
                <property name="iua:studentBachelorDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHigherDiplomaDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentMaster">
                    <type>d:any</type>
                </property>
                <property name="iua:studentMasterDegree">
                    <type>d:any</type>
                </property>               
            </properties>
         <mandatory-aspects>
            <aspect>iua:stdDetails</aspect>
         </mandatory-aspects>
      </type>
   </types>
   <aspects>
      <aspect name="iua:stdDetails">
         <title>Student Registration Details</title>
         <parent>cm:content</parent>
         <properties>
                <property name="iua:studentFirstName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentSecondName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentLastName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentFamilyName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentBirthDate">
                    <type>d:date</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentGender">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentSelectGender"/>
                  </constraints>
                   </property>
                <property name="iua:studentCountry">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentSelectCountry"/>
                  </constraints>
                  </property>
                  <property name="iua:studentCity">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
                <property name="iua:studentStreetName">
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentEmail">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                    <multiple>true</multiple>
                </property>
                <property name="iua:studentContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>                   
                </property>
                <property name="iua:studentSecondContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>
                </property>
                <property name="iua:studentThirdContact">
                    <type>d:int</type>
                    <mandatory>true</mandatory>
                    <constraints>
                       <constraint ref="iua:studentContactNo"/>
                  </constraints>
                </property>
                <property name="iua:studentPostalCode">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentSkype">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHighSchoolName">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="iua:studentHighSchoolDegree">
                    <type>d:any</type>
                    <mandatory>true</mandatory>
                </property>            
         </properties>
      </aspect>
   </aspects>
</model>





————————————————————————————————
Husham Khartoum | Software Engineer

Outcomes