company
Company
dummyInvariant
diagnostics
context
name
employees
size
Employee
reportsTo
manager
noManagerImpliesDirectReports
diagnostics
context
hasNameAsOperation
name
manager
company
directReports
allReports
reportingChain
hasNameAsAttribute
CompanySizeKind
small
small
medium
medium
large
large
Bug418716
AttributeWithInitital
AttributeWithoutInitital
<?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="company" nsURI="http://www.eclipse.org/ocl/test/2010/Company.ecore"
    nsPrefix="co">
  <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
    <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL"/>
    <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL"/>
    <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="Company">
    <eOperations name="dummyInvariant" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL">
        <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">
        <details key="derivation" value="let table : Set(Tuple(range : Sequence(Integer), size : CompanySizeKind)) =&#xD;    Set{Tuple{range=Sequence{0..49}, size=CompanySizeKind::small},&#xD;         Tuple{range=Sequence{50..999}, size=CompanySizeKind::medium},&#xD;         Tuple{range=Sequence{1000..1000000}, size=CompanySizeKind::large}} in&#xD;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">
      <details key="mustHaveName" value="not name.oclIsUndefined() and hasNameAsAttribute and hasNameAsOperation()"/>
      <details key="mustHaveNonEmptyName" value="Tuple {&#xA;&#x9;message : String = 'this is a \'precondition\'\n',&#xA;&#x9;status : Boolean = name->notEmpty() implies name.size() > 0&#xA;}.status"/>
    </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">
        <details key="body" value="self.reportingChain->includes(manager)"/>
      </eAnnotations>
      <eParameters name="manager" eType="#//Employee"/>
    </eOperations>
    <eOperations name="noManagerImpliesDirectReports" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL">
        <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>
    <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">
        <details key="body" value="name &lt;> null"/>
      </eAnnotations>
    </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">
        <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">
        <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">
        <details key="derivation" value="if (manager.oclIsUndefined()) then&#xD;    OrderedSet{}&#xD;else&#xD;    manager.reportingChain->prepend(manager)&#xD;endif"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="hasNameAsAttribute" 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">
        <details key="derivation" value="name &lt;> 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>
  <eClassifiers xsi:type="ecore:EClass" name="Bug418716">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="AttributeWithInitital"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL">
        <details key="initial" value="100"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="AttributeWithoutInitital"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
  </eClassifiers>
</ecore:EPackage>

{"directed":true,"nodes":[{"nsPrefix":"co","nsURI":"http://www.eclipse.org/ocl/test/2010/Company.ecore","name":"company","id":0,"eClass":"EPackage"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Company","instanceClass":null,"abstract":false,"id":1,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Employee","instanceClass":null,"abstract":false,"id":2,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"instanceClassName":null,"name":"CompanySizeKind","instanceClass":null,"id":3,"serializable":true,"eClass":"EEnum"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Bug418716","instanceClass":null,"abstract":false,"id":4,"interface":false,"eClass":"EClass"},{"ordered":true,"upperBound":1,"unique":true,"name":"dummyInvariant","lowerBound":1,"id":5,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":1,"iD":false,"id":6,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"employees","changeable":true,"resolveProxies":true,"lowerBound":0,"id":7,"derived":false},{"ordered":true,"upperBound":1,"volatile":true,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":true,"unique":true,"name":"size","changeable":false,"lowerBound":1,"iD":false,"id":8,"derived":true},{"id":9,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"unique":true,"name":"diagnostics","lowerBound":0,"id":10,"many":false,"required":false,"eClass":"EParameter"},{"ordered":true,"upperBound":1,"unique":true,"name":"context","lowerBound":0,"id":11,"many":false,"required":false,"eClass":"EParameter"},{"id":12,"eClass":"EGenericType"},{"id":13,"eClass":"EGenericType"},{"id":14,"eClass":"EGenericType"},{"id":15,"eClass":"EGenericType"},{"id":16,"eClass":"EGenericType"},{"id":17,"eClass":"EGenericType"},{"container":true,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":true,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"company","changeable":true,"resolveProxies":true,"lowerBound":1,"id":18,"derived":false},{"id":19,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"unique":true,"name":"reportsTo","lowerBound":1,"id":20,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"unique":true,"name":"noManagerImpliesDirectReports","lowerBound":1,"id":21,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"unique":true,"name":"hasNameAsOperation","lowerBound":1,"id":22,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":0,"iD":false,"id":23,"derived":false},{"container":false,"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"manager","changeable":true,"resolveProxies":true,"lowerBound":0,"id":24,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":true,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":true,"unique":true,"name":"directReports","changeable":false,"resolveProxies":true,"lowerBound":0,"id":25,"derived":true},{"container":false,"ordered":false,"upperBound":-1,"defaultValue":null,"volatile":true,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":true,"unique":true,"name":"allReports","changeable":false,"resolveProxies":true,"lowerBound":0,"id":26,"derived":true},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":true,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":true,"unique":true,"name":"reportingChain","changeable":false,"resolveProxies":true,"lowerBound":0,"id":27,"derived":true},{"ordered":true,"upperBound":1,"defaultValue":false,"volatile":true,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":true,"unique":true,"name":"hasNameAsAttribute","changeable":false,"lowerBound":0,"iD":false,"id":28,"derived":true},{"id":29,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"unique":true,"name":"manager","lowerBound":0,"id":30,"many":false,"required":false,"eClass":"EParameter"},{"id":31,"eClass":"EGenericType"},{"id":32,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"unique":true,"name":"diagnostics","lowerBound":0,"id":33,"many":false,"required":false,"eClass":"EParameter"},{"ordered":true,"upperBound":1,"unique":true,"name":"context","lowerBound":0,"id":34,"many":false,"required":false,"eClass":"EParameter"},{"id":35,"eClass":"EGenericType"},{"id":36,"eClass":"EGenericType"},{"id":37,"eClass":"EGenericType"},{"id":38,"eClass":"EGenericType"},{"id":39,"eClass":"EGenericType"},{"id":40,"eClass":"EGenericType"},{"id":41,"eClass":"EGenericType"},{"id":42,"eClass":"EGenericType"},{"id":43,"eClass":"EGenericType"},{"id":44,"eClass":"EGenericType"},{"id":45,"eClass":"EGenericType"},{"id":46,"eClass":"EGenericType"},{"name":"small","id":47,"value":0,"literal":"small","eClass":"EEnumLiteral"},{"name":"medium","id":48,"value":1,"literal":"medium","eClass":"EEnumLiteral"},{"name":"large","id":49,"value":2,"literal":"large","eClass":"EEnumLiteral"},{"ordered":true,"upperBound":1,"defaultValue":0,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"AttributeWithInitital","changeable":true,"lowerBound":0,"iD":false,"id":50,"derived":false},{"ordered":true,"upperBound":1,"defaultValue":0,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"AttributeWithoutInitital","changeable":true,"lowerBound":0,"iD":false,"id":51,"derived":false},{"id":52,"eClass":"EGenericType"},{"id":53,"eClass":"EGenericType"}],"links":[{"source":0,"target":1},{"source":0,"target":2},{"source":0,"target":3},{"source":0,"target":4},{"source":1,"target":0},{"source":1,"target":5},{"source":1,"target":6},{"source":1,"target":7},{"source":1,"target":8},{"source":5,"target":9},{"source":5,"target":1},{"source":5,"target":10},{"source":5,"target":11},{"source":10,"target":12},{"source":10,"target":5},{"source":11,"target":13},{"source":11,"target":5},{"source":13,"target":14},{"source":13,"target":15},{"source":6,"target":16},{"source":6,"target":1},{"source":7,"target":2},{"source":7,"target":17},{"source":7,"target":1},{"source":7,"target":18},{"source":17,"target":2},{"source":8,"target":3},{"source":8,"target":19},{"source":8,"target":1},{"source":19,"target":3},{"source":2,"target":0},{"source":2,"target":20},{"source":2,"target":21},{"source":2,"target":22},{"source":2,"target":23},{"source":2,"target":24},{"source":2,"target":18},{"source":2,"target":25},{"source":2,"target":26},{"source":2,"target":27},{"source":2,"target":28},{"source":20,"target":29},{"source":20,"target":2},{"source":20,"target":30},{"source":30,"target":2},{"source":30,"target":31},{"source":30,"target":20},{"source":31,"target":2},{"source":21,"target":32},{"source":21,"target":2},{"source":21,"target":33},{"source":21,"target":34},{"source":33,"target":35},{"source":33,"target":21},{"source":34,"target":36},{"source":34,"target":21},{"source":36,"target":37},{"source":36,"target":38},{"source":22,"target":39},{"source":22,"target":2},{"source":23,"target":40},{"source":23,"target":2},{"source":24,"target":2},{"source":24,"target":41},{"source":24,"target":2},{"source":41,"target":2},{"source":18,"target":1},{"source":18,"target":42},{"source":18,"target":2},{"source":18,"target":7},{"source":42,"target":1},{"source":25,"target":2},{"source":25,"target":43},{"source":25,"target":2},{"source":43,"target":2},{"source":26,"target":2},{"source":26,"target":44},{"source":26,"target":2},{"source":44,"target":2},{"source":27,"target":2},{"source":27,"target":45},{"source":27,"target":2},{"source":45,"target":2},{"source":28,"target":46},{"source":28,"target":2},{"source":3,"target":0},{"source":3,"target":47},{"source":3,"target":48},{"source":3,"target":49},{"source":47,"target":3},{"source":48,"target":3},{"source":49,"target":3},{"source":4,"target":0},{"source":4,"target":50},{"source":4,"target":51},{"source":50,"target":52},{"source":50,"target":4},{"source":51,"target":53},{"source":51,"target":4}],"multigraph":true}