| <?xml version="1.0" encoding="UTF-8"?> |
| <ecore:EPackage xmi:version="2.0" |
| xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="tutorial" |
| nsURI="http://www.eclipse.org/mdt/ocl/oclinecore/tutorial" nsPrefix="tut"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> |
| <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| </eAnnotations> |
| <eClassifiers xsi:type="ecore:EClass" name="Library"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1" |
| eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="books" ordered="false" |
| upperBound="-1" eType="#//Book" containment="true" eOpposite="#//Book/library"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="loans" ordered="false" |
| upperBound="-1" eType="#//Loan" containment="true"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="members" ordered="false" |
| upperBound="-1" eType="#//Member" containment="true" eOpposite="#//Member/library"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Book"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> |
| <details key="constraints" value="SufficientCopies"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="SufficientCopies" value="library.loans->select((book = self))->size() <= copies"/> |
| <details key="SufficientCopies$message" value="'There are ' + library.loans->select((book = self))->size().toString() + ' loans for the ' + copies.toString() + ' copies of ' + name"/> |
| </eAnnotations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1" |
| eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="copies" ordered="false" |
| lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="library" ordered="false" |
| eType="#//Library" eOpposite="#//Library/books"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Member"> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1" |
| eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="library" ordered="false" |
| eType="#//Library" eOpposite="#//Library/members"/> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Loan"> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="book" ordered="false" lowerBound="1" |
| eType="#//Book"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="member" ordered="false" |
| lowerBound="1" eType="#//Member"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="date" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/> |
| </eClassifiers> |
| </ecore:EPackage> |