1<?xml version="1.0" encoding="UTF-8"?>
2<ecore:EPackage xmi:version="2.0"
3 xmlns:xmi="http://www.omg.org/XMI"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
6 name="company"
7 nsURI="http://www.example.org/company"
8 nsPrefix="company">
9
10 <eClassifiers xsi:type="ecore:EEnum" name="EmploymentStatus">
11 <eLiterals name="FULL_TIME" value="0"/>
12 <eLiterals name="PART_TIME" value="1"/>
13 <eLiterals name="CONTRACTOR" value="2"/>
14 </eClassifiers>
15
16 <eClassifiers xsi:type="ecore:EClass" name="Person" abstract="true">
17 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
18 <eStructuralFeatures xsi:type="ecore:EAttribute" name="email" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
19 <eStructuralFeatures xsi:type="ecore:EAttribute" name="status" eType="#//EmploymentStatus"/>
20 <eStructuralFeatures xsi:type="ecore:EReference" name="employer" eType="#//Company" eOpposite="#//Company/employees"/>
21 </eClassifiers>
22
23 <eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
24 <eStructuralFeatures xsi:type="ecore:EAttribute" name="employeeId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
25 </eClassifiers>
26
27 <eClassifiers xsi:type="ecore:EClass" name="Manager" eSuperTypes="#//Person">
28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="department" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
29 </eClassifiers>
30
31 <eClassifiers xsi:type="ecore:EClass" name="Company">
32 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
33 <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1" eType="#//Person" containment="true" eOpposite="#//Person/employer"/>
34 </eClassifiers>
35
36</ecore:EPackage>