blob: 738b6becb5ac1f48d55dd5e1dcbf727a59d27aa1 [file] [log] [blame]
<?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/OCL/Import">
<details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/>
</eAnnotations>
<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" 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="EnoughCopies"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="EnoughCopies" value="Tuple {&#xA;&#x9;message : String = 'There are ' + library?.loans->select((book = self))->size().toString() + ' loans for the ' + copies.toString() + ' copies of \'' + name + '\'',&#xA;&#x9;status : Boolean = library?.loans->select((book = self))->size() &lt;= copies&#xA;}.status"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="copies" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigInteger"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="library" eType="#//Library" eOpposite="#//Library/books"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Member">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="library" eType="#//Library" eOpposite="#//Library/members"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Loan">
<eStructuralFeatures xsi:type="ecore:EReference" name="book" lowerBound="1" eType="#//Book"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="member" lowerBound="1" eType="#//Member"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="date" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
</eClassifiers>
</ecore:EPackage>