blob: 895ded94d7ae859fc2d42b84c0b2d1902a208ab1 [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="RandL"
nsURI="http://de.tuhh.sts.octopus/octopus2emfatic/2006/RandL" nsPrefix="RandL">
<eClassifiers xsi:type="ecore:EClass" name="ServiceLevel">
<eOperations name="invariant_ServiceLevel14" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->indexOf('c') = 3"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel15" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="OrderedSet{'a', 'b', 'c', 'd' }->insertAt(3, 'X') = OrderedSet{'a', 'b', 'X', 'c', 'd' }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{Set{1, 2 }, Set{2, 3 }, Set{4, 5, 6 } }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel7" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{2, 1, 2, 3, 5, 6, 4 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{1, 2, 3, 4, 5, 6 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel16" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->subSequence(3, 5) = Sequence{'c', 'c', 'd' }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Bag{1, 1, 2, 2, 4, 5, 6 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.program.partners->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Bag{Set{1, 2 }, Set{1, 2 }, Set{4, 5, 6 } }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel13" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->at(3) = 'c'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel19" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->prepend('X') = Sequence{'X', 'a', 'b', 'c', 'c', 'd', 'e' }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel10" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{1, 4, 7, 10 }->symmetricDifference(Set{4, 5, 7 }) = Set{1, 5, 10 }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{Set{1, 2 }, Set{2, 3 }, Set{4, 5, 6 } }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel8" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{1, 4, 7, 10 } - Set{4, 7 } = Set{1, 10 }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel12" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="OrderedSet{'a', 'b', 'c', 'd' }->last() = 'd'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel11" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->first() = 'a'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel18" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'a', 'b', 'c', 'c', 'd', 'e' }->append('X') = Sequence{'a', 'b', 'c', 'c', 'd', 'e', 'X' }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel17" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="OrderedSet{'a', 'b', 'c', 'd' }->subOrderedSet(2, 3) = OrderedSet{'b', 'c' }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ServiceLevel9" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="OrderedSet{12, 9, 6, 3 } - Set{1, 3, 2 } = OrderedSet{12, 9, 6 }"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="mgOCLArithSimplifierTest">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{1 + 0, 3 + (4+5)}->at(1+0)"/>
</eAnnotations>
<eParameters name="paramA" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
<eParameters name="paramB" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="availableServices" ordered="false"
upperBound="-1" eType="#//Service" eOpposite="#//Service/level"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="Membership" ordered="false"
upperBound="-1" eType="#//Membership" eOpposite="#//Membership/currentLevel"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="program" lowerBound="1"
eType="#//LoyaltyProgram" eOpposite="#//LoyaltyProgram/levels"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Membership">
<eOperations name="invariant_Membership4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="account->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="getCurrentLevelName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="currentLevel.name"/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_correctCard" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="participants.cards->includes(self.card)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Membership3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs.levels->includes(currentLevel)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Membership5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs.levels->includes(currentLevel)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Membership2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="participants.cards.membership->includes(self)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_noEarnings" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs.partners.deliveredServices->forAll(pointsEarned = 0) implies account->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Membership1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="account.points >= 0 or account->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_noEarnings2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs.isSaving implies account->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="membershipOper" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject">
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_levelAndColor" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="currentLevel.name = 'Silver' implies card.color = Color::silver and currentLevel.name = 'Gold' implies card.color = Color::gold"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="membershipAttr" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="currentLevel" eType="#//ServiceLevel"
eOpposite="#//ServiceLevel/Membership"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="account" eType="#//LoyaltyAccount"
eOpposite="#//LoyaltyAccount/membership"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="card" eType="#//CustomerCard"
eOpposite="#//CustomerCard/membership"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="participants" lowerBound="1"
eType="#//Customer"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="programs" lowerBound="1"
eType="#//LoyaltyProgram"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Gender">
<eLiterals name="male"/>
<eLiterals name="female" value="1"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProgramPartner">
<eOperations name="invariant_ProgramPartner1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.programs.partners->select(p : ProgramPartner | p &lt;> self)->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="getBurningTransactions" ordered="false" upperBound="-1" eType="#//Transaction">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.deliveredServices.transactions->iterate(t : Transaction; resultSet : Set( Transaction) = Set{ } | if t.oclIsTypeOf(Burning) then resultSet->including(t) else resultSet endif)"/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_totalPoints" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="deliveredServices.transactions.points->sum() &lt; 10000"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_nrOfParticipants2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="numberOfCustomers = programs.participants->asSet()->size()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_nrOfParticipants" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="numberOfCustomers = programs.participants->size()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_totalPointsEarning" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="deliveredServices.transactions->select(oclIsTypeOf(Earning)).points->sum() &lt; 10000"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_totalPointsEarning2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="deliveredServices.transactions->select(oclIsTypeOf(Earning)).points->sum() &lt; 10000"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="numberOfCustomers" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="deliveredServices" ordered="false"
upperBound="-1" eType="#//Service" eOpposite="#//Service/partner"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="programs" ordered="false"
lowerBound="1" upperBound="-1" eType="#//LoyaltyProgram" eOpposite="#//LoyaltyProgram/partners"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Earning" eSuperTypes="#//Transaction"/>
<eClassifiers xsi:type="ecore:EClass" name="Date">
<eOperations name="isBefore" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject">
<eParameters name="t" eType="#//Date"/>
</eOperations>
<eOperations name="isAfter" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject">
<eParameters name="t" eType="#//Date"/>
</eOperations>
<eOperations name="fromYMD" eType="#//Date">
<eParameters name="k" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eParameters name="i" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eParameters name="j" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="day" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Container_RandL">
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Transaction"
upperBound="-1" eType="#//Transaction" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Burning" upperBound="-1"
eType="#//Burning" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_ServiceLevel"
upperBound="-1" eType="#//ServiceLevel" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_LoyaltyAccount"
upperBound="-1" eType="#//LoyaltyAccount" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Service" upperBound="-1"
eType="#//Service" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_ProgramPartner"
upperBound="-1" eType="#//ProgramPartner" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ref_RandL_Date" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Earning" upperBound="-1"
eType="#//Earning" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Membership" upperBound="-1"
eType="#//Membership" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_TransactionReportLine"
upperBound="-1" eType="#//TransactionReportLine" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_LoyaltyProgram"
upperBound="-1" eType="#//LoyaltyProgram" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_CustomerCard"
upperBound="-1" eType="#//CustomerCard" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_TransactionReport"
upperBound="-1" eType="#//TransactionReport" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ref_RandL_Customer" upperBound="-1"
eType="#//Customer" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Service">
<eOperations name="post_upgradePointsEarned_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.calcPoints() = self.calcPoints() + amount"/>
</eAnnotations>
<eParameters name="amount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eOperations name="invariant_Service4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="'Anneke '.concat('and Jos') = 'Anneke and Jos'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Service1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.pointsEarned > 0 implies not ( self.pointsBurned = 0 )"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Service7" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="'Anneke and Jos'.substring(12, 14) = 'Jos'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Service6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="'Anneke'.toLower() = 'anneke'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="calcPoints" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eOperations name="invariant_Service2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="'Anneke'.size() = 6"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Service3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="( 'Anneke' = 'Jos' ) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="upgradePointsEarned">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="// TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_upgradePointsEarned_1(amount ); &#xA; "/>
</eAnnotations>
<eParameters name="amount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eOperations name="invariant_Service5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="'Anneke'.toUpper() = 'ANNEKE'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="condition" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pointsBurned" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="serviceNr" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pointsEarned" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="level" eType="#//ServiceLevel"
eOpposite="#//ServiceLevel/availableServices"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="partner" eType="#//ProgramPartner"
eOpposite="#//ProgramPartner/deliveredServices"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="transactions" ordered="false"
upperBound="-1" eType="#//Transaction" eOpposite="#//Transaction/generatedBy"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="LoyaltyAccount" eType="#//LoyaltyAccount"
eOpposite="#//LoyaltyAccount/usedServices"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Color">
<eLiterals name="silver"/>
<eLiterals name="gold" value="1"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TransactionReport">
<eOperations name="invariant_cycle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="card.transactions->includesAll(lines.transaction)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_dates" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="lines.date->forAll(d | d.isBefore(until) and d.isAfter(from))"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="totalBurned" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="lines.transaction->select(oclIsTypeOf(Burning)).points->sum()"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="card.owner.name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="card.membership.account.number"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="balance" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="card.membership.account.points"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="totalEarned" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="lines.transaction->select(oclIsTypeOf(Earning)).points->sum()"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="lines" ordered="false"
upperBound="-1" eType="#//TransactionReportLine" eOpposite="#//TransactionReportLine/report"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="card" eType="#//CustomerCard"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="until" eType="#//Date"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="from" eType="#//Date"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Transaction">
<eOperations name="invariant_Transaction1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsKindOf(Transaction) = true"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_getProgram_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.card.membership.programs"/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_Transaction4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsKindOf(Burning) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Transaction3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsTypeOf(Burning) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Transaction2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsTypeOf(Transaction) = true"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="program" eType="#//LoyaltyProgram"/>
<eOperations name="getProgram" eType="#//LoyaltyProgram">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="// TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_getProgram_1(); &#xA; throw new UnsupportedOperationException(); &#xA; "/>
</eAnnotations>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="points" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="amount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="account" eType="#//LoyaltyAccount"
eOpposite="#//LoyaltyAccount/transactions"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="generatedBy" eType="#//Service"
eOpposite="#//Service/transactions"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="card" eType="#//CustomerCard"
eOpposite="#//CustomerCard/transactions"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="date" eType="#//Date"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TransactionReportLine">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="serviceDesc" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transaction.generatedBy.description"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="partnerName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transaction.generatedBy.partner.name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="points" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transaction.points"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="amount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transaction.amount"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="transaction" eType="#//Transaction"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="report" eType="#//TransactionReport"
eOpposite="#//TransactionReport/lines"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="date" eType="#//Date">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transaction.date"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CustomerCard">
<eOperations name="invariant_CustomerCard3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.owner.programs->size() > 0"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="getTransactions" ordered="false" upperBound="-1" eType="#//Transaction">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="transactions->select(date.isAfter(from) and date.isBefore(until))"/>
</eAnnotations>
<eParameters name="from" eType="#//Date"/>
<eParameters name="until" eType="#//Date"/>
</eOperations>
<eOperations name="getTotalPoints" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="transactions->select(date.isAfter(d)).points->sum()"/>
</eAnnotations>
<eParameters name="d" eType="#//Date"/>
</eOperations>
<eOperations name="invariant_ofAge" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="owner.age >= 18"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_checkDates" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="validFrom.isBefore(goodThru)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_CustomerCard4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.transactions->select(points > 100)->notEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="valid" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="true"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="printedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="owner.title.concat(' ').concat(owner.name)"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="color" eType="#//Color"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="myLevel" eType="#//ServiceLevel"
changeable="false" volatile="true" transient="true" derived="true" containment="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="membership.currentLevel"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" eType="#//Customer"
eOpposite="#//Customer/cards"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="transactions" ordered="false"
upperBound="-1" eType="#//Transaction" eOpposite="#//Transaction/card"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="membership" eType="#//Membership"
eOpposite="#//Membership/card"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="goodThru" eType="#//Date"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="validFrom" eType="#//Date"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Customer">
<eOperations name="invariant_Customer10" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.programs->collect(partners)->collectNested(deliveredServices)->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.name = 'Edward'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eOperations name="birthdayHappens">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="// TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_birthdayHappens_1(); &#xA; "/>
</eAnnotations>
</eOperations>
<eOperations name="cardsForProgram" unique="false" upperBound="-1" eType="#//CustomerCard">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="p.memberships.card"/>
</eAnnotations>
<eParameters name="p" eType="#//LoyaltyProgram"/>
</eOperations>
<eOperations name="invariant_Customer7" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="gender = Gender::male implies title = 'Mr.'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.title = 'Mr.'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer9" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="memberships.account->reject( not ( points > 0 ))->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer8" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="memberships.account->select(points > 0)->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.name = 'Edward' and self.title = 'Mr.'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer11" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{1, 2, 3 }->iterate(i : Integer; sum : Integer = 0 | sum + i) = 0"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.name = 'Edward'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_myInvariant23" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.name = 'Edward'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="name = 'Edward'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer12" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs->size() = cards->select(valid = true)->size()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_sizesAgree" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="programs->size() = cards->select(valid = true)->size()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Customer1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="cards->select(valid = true)->size() > 1"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ANY" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.memberships.account->any(number &lt; 10000)->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_ofAge" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="age >= 18"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isMale" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="gender" eType="#//Gender"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="initial" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="name.substring(1, 1)"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="loyalToCompanies" ordered="false"
unique="false" upperBound="-1" eType="#//ProgramPartner" changeable="false"
volatile="true" transient="true" derived="true" containment="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="programs.partners"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="wellUsedCards" ordered="false"
upperBound="-1" eType="#//CustomerCard" changeable="false" volatile="true"
transient="true" derived="true" containment="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="cards->select(transactions.points->sum() > 10000)"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="dateOfBirth" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="programs" ordered="false"
upperBound="-1" eType="#//LoyaltyProgram" eOpposite="#//LoyaltyProgram/participants">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="memberships.programs"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="cards" ordered="false"
upperBound="-1" eType="#//CustomerCard" eOpposite="#//CustomerCard/owner"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="memberships" upperBound="-1"
eType="#//Membership"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LoyaltyProgram">
<eOperations name="invariant_LoyaltyProgram20" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="participants->forAll(age() &lt;= 70)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="pre_enroll_3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="not self.participants->includes(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram12" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Bag{1, 3, 4, 3, 5 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_enroll_2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.participants = self.participants->including(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="post_addService_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.partners->collect( i_ProgramPartner : ProgramPartner | i_ProgramPartner.deliveredServices )->includes(s)"/>
</eAnnotations>
<eParameters name="l" eType="#//ServiceLevel"/>
<eParameters name="p" eType="#//ProgramPartner"/>
<eParameters name="s" eType="#//Service"/>
</eOperations>
<eOperations name="enroll">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="assert pre_enroll_1(c ); &#xA; assert pre_enroll_2(c ); &#xA; assert pre_enroll_3(c ); &#xA; assert pre_enroll_4(c ); &#xA; // TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_enroll_1(c ); &#xA; assert post_enroll_2(c ); &#xA; assert post_enroll_3(c ); &#xA; assert post_enroll_4(c ); &#xA; assert post_enroll_5(c ); &#xA; "/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram14" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{1 .. 10 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_enroll_5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.memberships->select( m : Membership | m.participants = c )->forAll( i_Membership : Membership | i_Membership.account->asSet()->notEmpty() and i_Membership.account.points = 0 )"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="partners.deliveredServices->forAll(pointsEarned = 0)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="selectPopularPartners" ordered="false" upperBound="-1" eType="#//ProgramPartner">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="// TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_selectPopularPartners_1(d ); &#xA; throw new UnsupportedOperationException(); &#xA; "/>
</eAnnotations>
<eParameters name="d" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
</eOperations>
<eOperations name="getServicesByLevel" ordered="false" upperBound="-1" eType="#//Service">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="levels->select(name = levelName).availableServices->asSet()"/>
</eAnnotations>
<eParameters name="levelName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram16" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.participants->size() &lt; 10000"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_enroll_4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.participants = self.participants->including(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram19" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.memberships.account->isUnique(number)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_enroll_3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.participants = self.participants->including(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="addService">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="assert pre_addService_1(l, p, s ); &#xA; assert pre_addService_2(l, p, s ); &#xA; // TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_addService_1(l, p, s ); &#xA; assert post_addService_2(l, p, s ); &#xA; "/>
</eAnnotations>
<eParameters name="l" eType="#//ServiceLevel"/>
<eParameters name="p" eType="#//ProgramPartner"/>
<eParameters name="s" eType="#//Service"/>
</eOperations>
<eOperations name="pre_enroll_4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="not self.participants->includes(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="post_addTransaction_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="let acc : LoyaltyAccount = self.memberships->collect( i_Membership : Membership | i_Membership.account )->select( a : LoyaltyAccount | a.number = accNr )->any( i_LoyaltyAccount : LoyaltyAccount | true ) in let newT : Transaction = self.partners->select( p : ProgramPartner | p.name = pName )->collect( i_ProgramPartner : ProgramPartner | i_ProgramPartner.deliveredServices )->select( s : Service | s.serviceNr = servId )->collect( i_Service : Service | i_Service.transactions )->select( i_Transaction : Transaction | (i_Transaction.date = d) and i_Transaction.amount = amnt )->any( i_Transaction : Transaction | true ) in let card : CustomerCard = self.memberships->select( m : Membership | m.account.number = accNr )->collect( i_Membership : Membership | i_Membership.card )->any( i_CustomerCard : CustomerCard | true ) in acc.points = acc.points + newT.points "/>
</eAnnotations>
<eParameters name="pName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eParameters name="amnt" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/>
<eParameters name="servId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eParameters name="d" eType="#//Date"/>
<eParameters name="accNr" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram10" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{1, 3, 45, 2, 3 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram21" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.participants->forAll(c1 | self.participants->forAll(c2 | c1 &lt;> c2 implies c1.name &lt;> c2.name))"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="addTransaction">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="// TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_addTransaction_1(pName, amnt, servId, d, accNr ); &#xA; "/>
</eAnnotations>
<eParameters name="pName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eParameters name="amnt" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject"/>
<eParameters name="servId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eParameters name="d" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
<eParameters name="accNr" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eOperations name="pre_enroll_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="c.name &lt;> ''"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_multipleIterators" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.participants->forAll(c1, c2 | c1 &lt;> c2 implies c1.name &lt;> c2.name)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="getServices" ordered="false" upperBound="-1" eType="#//Service">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="if partners->includes(pp) then pp.deliveredServices else Set{ } endif"/>
</eAnnotations>
<eParameters name="pp" eType="#//ProgramPartner"/>
</eOperations>
<eOperations name="invariant_noAccounts" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="partners.deliveredServices->forAll(pointsEarned = 0 and pointsBurned = 0) implies memberships.account->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_addService_2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.levels->collect( i_ServiceLevel : ServiceLevel | i_ServiceLevel.availableServices )->includes(s)"/>
</eAnnotations>
<eParameters name="l" eType="#//ServiceLevel"/>
<eParameters name="p" eType="#//ProgramPartner"/>
<eParameters name="s" eType="#//Service"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram13" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{1 .. ( 6 + 4 ) }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="participants->forAll(age() > 55)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="levels->includesAll(memberships.currentLevel)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_minServices" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="partners.deliveredServices->size() >= 1"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="pre_addService_2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.levels->includes(l)"/>
</eAnnotations>
<eParameters name="l" eType="#//ServiceLevel"/>
<eParameters name="p" eType="#//ProgramPartner"/>
<eParameters name="s" eType="#//Service"/>
</eOperations>
<eOperations name="invariant_firstLevel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="levels->first().name = 'Silver'"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram9" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="OrderedSet{'apple', 'orange', 'strawberry', 'pear' }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram17" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.memberships.account->isUnique(acc | acc.number)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram11" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{'ape', 'nut' }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram7" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{1, 2, 5, 88 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram18" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.memberships.account->isUnique(acc : LoyaltyAccount | acc.number)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_LoyaltyProgram15" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Sequence{1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="enrollAndCreateCustomer" eType="#//Customer">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="assert pre_enrollAndCreateCustomer_1(n, d ); &#xA; // TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_enrollAndCreateCustomer_1(n, d ); &#xA; throw new UnsupportedOperationException(); &#xA; "/>
</eAnnotations>
<eParameters name="n" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eParameters name="d" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
</eOperations>
<eOperations name="pre_addService_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.partners->includes(p)"/>
</eAnnotations>
<eParameters name="l" eType="#//ServiceLevel"/>
<eParameters name="p" eType="#//ProgramPartner"/>
<eParameters name="s" eType="#//Service"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.levels->exists(name = 'basic')"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="getServices" ordered="false" upperBound="-1" eType="#//Service">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="partners.deliveredServices->asSet()"/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_LoyaltyProgram8" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="Set{'apple', 'orange', 'strawberry' }->isEmpty()"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="post_enroll_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="self.participants = self.participants->including(c)"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="pre_enrollAndCreateCustomer_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="true"/>
</eAnnotations>
<eParameters name="n" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eParameters name="d" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
</eOperations>
<eOperations name="invariant_knownServiceLevel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="levels->includesAll(memberships.currentLevel)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="pre_enroll_2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="c.name &lt;> ''"/>
</eAnnotations>
<eParameters name="c" eType="#//Customer"/>
</eOperations>
<eOperations name="invariant_LoyaltyProgram22" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.memberships.account->one(number &lt; 10000)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="isSaving" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="partners.deliveredServices->forAll(pointsEarned = 0)"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sortedAccounts" unique="false"
upperBound="-1" eType="#//LoyaltyAccount" changeable="false" volatile="true"
transient="true" derived="true" containment="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="self.memberships.account->sortedBy(number)"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="participants" upperBound="-1"
eType="#//Customer" eOpposite="#//Customer/programs">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="memberships.participants"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="partners" ordered="false"
lowerBound="1" upperBound="-1" eType="#//ProgramPartner" eOpposite="#//ProgramPartner/programs"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="levels" lowerBound="1"
upperBound="-1" eType="#//ServiceLevel" eOpposite="#//ServiceLevel/program"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="memberships" upperBound="-1"
eType="#//Membership"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LoyaltyAccount">
<eOperations name="pre_isEmpty_1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="true"/>
</eAnnotations>
</eOperations>
<eOperations name="getCustomerName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="body" value="membership.card.owner.name"/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_transactions" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="transactions.points->exists(p : Integer | p = 500)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="isEmpty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="assert pre_isEmpty_1(); &#xA; // TODO: implement this method &#xA; // Ensure that you remove @generated or mark it @generated NOT body &#xA; assert post_isEmpty_1(); &#xA; throw new UnsupportedOperationException(); &#xA; "/>
</eAnnotations>
</eOperations>
<eOperations name="invariant_points" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="points > 0 implies transactions->exists(t | t.points > 0)"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_oneOwner" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="transactions.card.owner->asSet()->size() = 1"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="burn">
<eParameters name="i" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eOperations name="earn">
<eParameters name="i" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="totalPointsEarned" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="transactions->select(oclIsTypeOf(Earning)).points->sum()"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="points" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"
changeable="false" volatile="true" transient="true" derived="true">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="derive" value="0"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="usedServices" ordered="false"
upperBound="-1" eType="#//Service" eOpposite="#//Service/LoyaltyAccount"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="membership" eType="#//Membership"
eOpposite="#//Membership/account"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="transactions" ordered="false"
upperBound="-1" eType="#//Transaction" eOpposite="#//Transaction/account"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Burning" eSuperTypes="#//Transaction">
<eOperations name="invariant_Burning3" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsTypeOf(Burning) = true"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Burning6" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsKindOf(Earning) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Burning1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsKindOf(Transaction) = true"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Burning5" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsTypeOf(Earning) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Burning4" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsKindOf(Burning) = true"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
<eOperations name="invariant_Burning2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/OCL/examples/ocl">
<details key="invariant" value="self.oclIsTypeOf(Transaction) = false"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
<eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
</eParameters>
</eOperations>
</eClassifiers>
</ecore:EPackage>