| <?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="noreflectioncompany" nsURI="http://www.eclipse.org/ocl/test/2010/NoReflectionCompany.ecore" nsPrefix="nrco"> |
| <eAnnotations source="http://www.eclipse.org/OCL/Import"> |
| <details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> |
| <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/> |
| </eAnnotations> |
| <eClassifiers xsi:type="ecore:EClass" name="Company"> |
| <eOperations name="dummyInvariant" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="body" value="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:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> |
| <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> |
| </eGenericType> |
| </eParameters> |
| </eOperations> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1" eType="#//Employee" containment="true" eOpposite="#//Employee/company"/> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" lowerBound="1" eType="#//CompanySizeKind" changeable="false" volatile="true" |
| transient="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="let table : Set(Tuple(range : Sequence(Integer), size : CompanySizeKind)) = Set{Tuple{range = Sequence{0..49}, size = CompanySizeKind::small}, Tuple{range = Sequence{50..999}, size = CompanySizeKind::medium}, Tuple{range = Sequence{1000..1000000}, size = CompanySizeKind::large}} in table->any(range->includes(employees->size()))?.size"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EClass" name="Employee"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> |
| <details key="constraints" value="mustHaveName mustHaveNonEmptyName"/> |
| </eAnnotations> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="mustHaveName" value="Tuple {
	message : String = 'Employee must have a name',
	status : Boolean = not name.oclIsUndefined() and hasNameAsAttribute and hasNameAsOperation()
}.status"/> |
| <details key="mustHaveNonEmptyName" value="name->notEmpty() implies name.size() > 0"/> |
| </eAnnotations> |
| <eOperations name="reportsTo" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="body" value="self.reportingChain->includes(manager)"/> |
| </eAnnotations> |
| <eParameters name="manager" eType="#//Employee"/> |
| </eOperations> |
| <eOperations name="hasNameAsOperation" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="body" value="name <> null"/> |
| </eAnnotations> |
| </eOperations> |
| <eOperations name="noManagerImpliesDirectReports" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="body" value="manager.oclIsUndefined() implies directReports->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:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> |
| <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> |
| </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:EReference" name="manager" eType="#//Employee"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="company" lowerBound="1" eType="#//Company" eOpposite="#//Company/employees"/> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="directReports" upperBound="-1" eType="#//Employee" changeable="false" volatile="true" |
| transient="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="company.employees->select(manager = self)"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="allReports" ordered="false" upperBound="-1" eType="#//Employee" changeable="false" |
| volatile="true" transient="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="Employee.allInstances()->select(reportsTo(self))"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EReference" name="reportingChain" upperBound="-1" eType="#//Employee" changeable="false" volatile="true" |
| transient="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="if manager.oclIsUndefined() then OrderedSet{} else manager?.reportingChain->prepend(manager) endif"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| <eStructuralFeatures xsi:type="ecore:EAttribute" name="hasNameAsAttribute" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" |
| changeable="false" volatile="true" transient="true" derived="true"> |
| <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> |
| <details key="derivation" value="name <> null"/> |
| </eAnnotations> |
| </eStructuralFeatures> |
| </eClassifiers> |
| <eClassifiers xsi:type="ecore:EEnum" name="CompanySizeKind"> |
| <eLiterals name="small"/> |
| <eLiterals name="medium" value="1"/> |
| <eLiterals name="large" value="2"/> |
| </eClassifiers> |
| </ecore:EPackage> |