1<?xml version="1.0" encoding="UTF-8"?>
2<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
3 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
4 name="University" nsURI="http://www.example.org/university" nsPrefix="university">
5
6 <!-- University: root container for all academic entities -->
7 <eClassifiers xsi:type="ecore:EClass" name="University">
8 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
9 <eStructuralFeatures xsi:type="ecore:EReference" name="departments" upperBound="-1"
10 eType="#//Department" containment="true"/>
11 <eStructuralFeatures xsi:type="ecore:EReference" name="students" upperBound="-1"
12 eType="#//Student" containment="true"/>
13 <eStructuralFeatures xsi:type="ecore:EReference" name="courses" upperBound="-1"
14 eType="#//Course" containment="true"/>
15 </eClassifiers>
16
17 <!-- Department: academic unit with professors -->
18 <eClassifiers xsi:type="ecore:EClass" name="Department">
19 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
20 <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
21 <eStructuralFeatures xsi:type="ecore:EReference" name="professors" upperBound="-1"
22 eType="#//Professor" containment="true"/>
23 <eStructuralFeatures xsi:type="ecore:EReference" name="offeredCourses" upperBound="-1"
24 eType="#//Course"/>
25 </eClassifiers>
26
27 <!-- Professor: academic staff member -->
28 <eClassifiers xsi:type="ecore:EClass" name="Professor">
29 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="specialisation" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
31 <eStructuralFeatures xsi:type="ecore:EAttribute" name="yearsExperience" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
32 <eStructuralFeatures xsi:type="ecore:EReference" name="teaches" upperBound="-1"
33 eType="#//Course"/>
34 </eClassifiers>
35
36 <!-- Student: enrolled academic participant -->
37 <eClassifiers xsi:type="ecore:EClass" name="Student">
38 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
39 <eStructuralFeatures xsi:type="ecore:EAttribute" name="studentId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
40 <eStructuralFeatures xsi:type="ecore:EAttribute" name="grade" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
41 <eStructuralFeatures xsi:type="ecore:EAttribute" name="year" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
42 <eStructuralFeatures xsi:type="ecore:EReference" name="enrolledIn" upperBound="-1"
43 eType="#//Course"/>
44 <eStructuralFeatures xsi:type="ecore:EReference" name="major" eType="#//Department"/>
45 </eClassifiers>
46
47 <!-- Course: academic subject offering -->
48 <eClassifiers xsi:type="ecore:EClass" name="Course">
49 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
50 <eStructuralFeatures xsi:type="ecore:EAttribute" name="code" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
51 <eStructuralFeatures xsi:type="ecore:EAttribute" name="credits" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
52 <eStructuralFeatures xsi:type="ecore:EAttribute" name="level" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
53 <eStructuralFeatures xsi:type="ecore:EReference" name="prerequisites" upperBound="-1"
54 eType="#//Course"/>
55 </eClassifiers>
56</ecore:EPackage>