<?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="er" nsURI="http://www.example.org/er" nsPrefix="er">
  <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="Entity" eSuperTypes="#//ModellingConcept #//EntityConcept">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="existedKey invalidPrimaryKey invalidAttributInKey"/>
    </eAnnotations>
    <eAnnotations source="gmf.node">
      <details key="border.width" value="1"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="0 30 30 0"/>
      <details key="polygon.y" value="0 0 30 30"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="existedKey" value="&#xA;&#x9;&#x9;&#x9;keySet->forAll(k1:Key, k2:Key | k1.keyAttributes->intersection(k2.keyAttributes)->includesAll(k1.keyAttributes) and k1.keyAttributes->symmetricDifference(k2.keyAttributes)->isEmpty() implies k1=k2)"/>
      <details key="existedKey$message" value="'The key with attribute set already exists'"/>
      <details key="invalidPrimaryKey" value="&#xA;&#x9;&#x9;&#x9;if(keySet->notEmpty()) then&#xA;&#x9;&#x9;&#x9;&#x9;if(not primaryKey->oclIsUndefined()) then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keySet->includes(primaryKey)&#xA;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;not primaryKey->oclIsUndefined()&#xA;&#x9;&#x9;&#x9;&#x9;endif&#xA;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;keySet->isEmpty()&#xA;&#x9;&#x9;&#x9;endif"/>
      <details key="invalidAttributInKey" value="&#xA;&#x9;&#x9;&#x9;&#x9;if(not keySet.keyAttributes->isEmpty()) then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if(entityAttributes->notEmpty()) then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;entityAttributes->includesAll(keySet.keyAttributes)&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;entityAttributes->notEmpty()&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xA;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;keySet.keyAttributes->isEmpty()&#xA;&#x9;&#x9;&#x9;&#x9;endif"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entityAttributes" upperBound="-1"
        eType="#//Attribute" containment="true">
      <eAnnotations source="gmf.link">
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
        <details key="width" value="0"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="keySet" upperBound="-1"
        eType="#//Key" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="list"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="primaryKey" eType="#//Key">
      <eAnnotations source="gmf.link">
        <details key="label.text" value="primaryKey"/>
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="dash"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ModellingConcept" abstract="true">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="existedName"/>
    </eAnnotations>
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="label.icon" value="false"/>
      <details key="border.color" value="0,0,0"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="existedName" value="&#xA;&#x9;&#x9;&#x9;ModellingConcept.allInstances()->symmetricDifference(Gerund.allInstances())->forAll(m1:ModellingConcept, m2:ModellingConcept | m1.name = m2.name implies m1=m2)"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="RelationshipConcept" abstract="true"
      eSuperTypes="#//ModellingConcept">
    <eAnnotations source="gmf.node">
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="0 30 60 30"/>
      <details key="polygon.y" value="30 0 30 60"/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Attribute" eSuperTypes="#//ModellingConcept">
    <eAnnotations source="gmf.node">
      <details key="border.width" value="1"/>
      <details key="phantom" value="true"/>
      <details key="size" value="50,5"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="attributeDomain" eType="#//AttributeDomain"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Domain" eSuperTypes="#//ModellingConcept">
    <eAnnotations source="gmf.node">
      <details key="border.width" value="1"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="primitiveDomain" lowerBound="1"
        eType="#//PrimitiveDomain"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="MinCardinality">
    <eLiterals name="zero"/>
    <eLiterals name="one" value="1"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="MaxCardinality">
    <eLiterals name="one" value="1"/>
    <eLiterals name="many" value="2"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Relationship" eSuperTypes="#//RelationshipConcept">
    <eAnnotations source="gmf.node">
      <details key="border.width" value="1"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entities" lowerBound="2"
        upperBound="-1" eType="#//RegularEntity" containment="true">
      <eAnnotations source="gmf.affixed"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="relationshipAttributes"
        upperBound="-1" eType="#//Attribute" containment="true">
      <eAnnotations source="gmf.link">
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ISA" eSuperTypes="#//RelationshipConcept">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="invalidClassificationAtrtibute SubTypeExistsAsSuperType duplicateSybtype"/>
    </eAnnotations>
    <eAnnotations source="gmf.node">
      <details key="label.text" value="IS-A"/>
      <details key="label.style" value="bold"/>
      <details key="border.width" value="2"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="0 15 30"/>
      <details key="polygon.y" value="15 0 15"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="invalidClassificationAtrtibute" value="&#xA;&#x9;&#x9;if supertype.entity.oclIsTypeOf(Entity) then&#xA;&#x9;&#x9;&#x9;supertype.entity.oclAsType(Entity).entityAttributes->includes(classificationAttribute) &#xA;&#x9;&#x9;else &#xA;&#x9;&#x9;&#x9;supertype.entity.oclAsType(Gerund).relationship.relationshipAttributes->includes(classificationAttribute) &#x9;&#xA;&#x9;&#x9;endif"/>
      <details key="SubTypeExistsAsSuperType" value="&#xA;&#x9;&#x9;if(supertype.entity.oclIsTypeOf(Entity)) then &#xA;&#x9;&#x9;&#x9;subtypes->excludes(supertype.entity.oclAsType(Entity))&#xA;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;not supertype.entity.oclIsTypeOf(Entity)&#xA;&#x9;&#x9;endif"/>
      <details key="duplicateSybtype" value="&#xA;&#x9;&#x9;&#x9;ISA.allInstances().subtypes->forAll(e1:Entity | ISA.allInstances().subtypes->select(e2 | e1.name=e2.name)->size()&lt;2)"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="supertype" lowerBound="1"
        eType="#//RegularEntity" containment="true">
      <eAnnotations source="gmf.affixed"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="subtypes" lowerBound="2"
        upperBound="-1" eType="#//Entity">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
        <details key="border.width" value="5"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="classificationAttribute"
        lowerBound="1" eType="#//Attribute">
      <eAnnotations source="gmf.link">
        <details key="label.text" value="classificationAttribute"/>
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="dash"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Categorisation" eSuperTypes="#//RelationshipConcept">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="invalidCategory"/>
    </eAnnotations>
    <eAnnotations source="gmf.node">
      <details key="label.text" value="EX-OR"/>
      <details key="border.width" value="2"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="0 15 30"/>
      <details key="polygon.y" value="0 15 0"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="invalidCategory" value="&#xA;&#x9;&#x9;&#x9;categorisationEntities.entities->excludes(categorisedEntity) and categorisationEntities.entities->&#xA;&#x9;&#x9;&#x9;forAll(e1:EntityConcept, e2:EntityConcept | &#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if(e1.oclIsTypeOf(Entity) and  e2.oclIsTypeOf(Entity)) then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;e1.oclAsType(Entity).name = e2.oclAsType(Entity).name implies e1 = e2&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else if(e1.oclIsTypeOf(Gerund) and  e2.oclIsTypeOf(Gerund)) then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;e1.oclAsType(Gerund).relationship.name = e2.oclAsType(Gerund).relationship.name implies e1 = e2&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; &#x9;true&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; endif&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;)"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="categorisationEntities"
        lowerBound="1" eType="#//Categories" containment="true">
      <eAnnotations source="gmf.affixed"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPartial" lowerBound="1"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="categorisedEntity" lowerBound="1"
        eType="#//EntityConcept">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="IdentificationDependency" eSuperTypes="#//RelationshipConcept">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="invalidWeakEntity"/>
    </eAnnotations>
    <eAnnotations source="gmf.node">
      <details key="border.width" value="2"/>
      <details key="border.color" value="0,0,0"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="invalidWeakEntity" value="&#xA;&#x9;&#x9;if(regularEntity.entity.oclIsTypeOf(Entity)) then&#xA;&#x9;&#x9;&#x9;regularEntity.entity.oclAsType(Entity) &lt;> weakEntity&#xA;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;not regularEntity.entity.oclIsTypeOf(Entity)&#xA;&#x9;&#x9;endif"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="weakEntity" lowerBound="1"
        eType="#//Entity">
      <eAnnotations source="gmf.link">
        <details key="label.text" value="weakEntity"/>
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="width" value="2"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="regularEntity" lowerBound="1"
        eType="#//RegularEntity" containment="true">
      <eAnnotations source="gmf.affixed"/>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="RegularEntity">
    <eAnnotations source="gmf.node">
      <details key="label.placement" value="external"/>
      <details key="label" value="min,max"/>
      <details key="label.pattern" value="({0},{1})"/>
      <details key="label.icon" value="false"/>
      <details key="border.color" value="0,0,0"/>
      <details key="color" value="255,255,255"/>
      <details key="border.width" value="1"/>
      <details key="figure" value="ellipse"/>
      <details key="size" value="7,7"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entity" lowerBound="1"
        eType="#//EntityConcept">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="role" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="min" lowerBound="1" eType="#//MinCardinality"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="max" lowerBound="1" eType="#//MaxCardinality"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Categories">
    <eAnnotations source="gmf.node">
      <details key="label.placement" value="external"/>
      <details key="label" value="min,max"/>
      <details key="label.pattern" value="({0},{1})"/>
      <details key="label.icon" value="false"/>
      <details key="border.color" value="0,0,0"/>
      <details key="color" value="255,255,255"/>
      <details key="border.width" value="1"/>
      <details key="figure" value="ellipse"/>
      <details key="size" value="7,7"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entities" lowerBound="2"
        upperBound="-1" eType="#//EntityConcept">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
        <details key="border.width" value="2"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="min" lowerBound="1" eType="#//MinCardinality"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="max" lowerBound="1" eType="#//MaxCardinality"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ERModel" eSuperTypes="#//ModellingConcept">
    <eAnnotations source="gmf.diagram">
      <details key="model.extension" value="erdsl"/>
      <details key="diagram.extension" value="erdsldiag"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entities" upperBound="-1"
        eType="#//Entity" containment="true">
      <eAnnotations source="gmf.compartment"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="relationships" upperBound="-1"
        eType="#//RelationshipConcept" containment="true">
      <eAnnotations source="gmf.compartment"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="gerunds" upperBound="-1"
        eType="#//Gerund" containment="true">
      <eAnnotations source="gmf.compartment"/>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EReference" name="domains" upperBound="-1"
        eType="#//Domain" containment="true">
      <eAnnotations source="gmf.compartment"/>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EntityConcept" abstract="true"/>
  <eClassifiers xsi:type="ecore:EClass" name="Key" eSuperTypes="#//ModellingConcept">
    <eAnnotations source="gmf.node">
      <details key="border.width" value="1"/>
      <details key="size" value="50,25"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="keyAttributes" lowerBound="1"
        upperBound="-1" eType="#//Attribute">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="dash"/>
        <details key="color" value="180,180,180"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Gerund" eSuperTypes="#//EntityConcept">
    <eAnnotations source="gmf.node">
      <details key="label.placement" value="none"/>
      <details key="label.icon" value="false"/>
      <details key="border.width" value="1"/>
      <details key="border.color" value="0,0,0"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="0 0 60 60"/>
      <details key="polygon.y" value="60 0 0 60"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="relationship" lowerBound="1"
        eType="#//Relationship" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="list"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="AttributeDomain">
    <eAnnotations source="gmf.node">
      <details key="label.placement" value="none"/>
      <details key="label.icon" value="false"/>
      <details key="color" value="255,178,102"/>
      <details key="border.width" value="0"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="domain" lowerBound="1"
        eType="#//Domain">
      <eAnnotations source="gmf.link">
        <details key="target.decoration" value="arrow"/>
        <details key="style" value="solid"/>
        <details key="color" value="0,0,0"/>
      </eAnnotations>
    </eStructuralFeatures>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="default" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="length" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="PrimitiveDomain">
    <eLiterals name="integer"/>
    <eLiterals name="string" value="1"/>
    <eLiterals name="real" value="2"/>
    <eLiterals name="boolean" value="3"/>
    <eLiterals name="date" value="4"/>
    <eLiterals name="time" value="5"/>
  </eClassifiers>
</ecore:EPackage>
