| <?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"/> |
| </eAnnotations> |
| <eOperations name="isAvailable" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="body" value="loans->size() < copies"/> |
| </eAnnotations> |
| </eOperations> |
| <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"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="loans" ordered="false" |
| upperBound="-1" eType="#//Loan" volatile="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="library.loans->select(book = self)"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Member"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> |
| <details key="constraints" value="AtMostTwoLoans UniqueLoans"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="AtMostTwoLoans" value="loans->size() <= 2"/> |
| <details key="UniqueLoans" value="loans->isUnique(book)"/> |
| </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:EReference" name="library" ordered="false" |
| eType="#//Library" eOpposite="#//Library/members"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="loans" ordered="false" |
| upperBound="-1" eType="#//Loan" volatile="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="library.loans->select(member = self)"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="books" ordered="false" |
| unique="false" upperBound="-1" eType="#//Book" volatile="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="loans->collect(book)"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </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> |