<?xml version="1.0" encoding="UTF-8"?>
<!--
  ****************************************************************
ERmodel_v1.2/instances/catalogue/src/conceptualModels/2RegularHypergraph.xml 
****************************************************************

Copyright 2016, 2107 Cyprotex Discovery Ltd.

This file is part of the the ERmodel suite of models and transforms.

The ERmodel suite is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ERmodel suite is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
****************************************************************
-->
<entity_model xmlns="http://www.entitymodelling.org/ERmodel">
  <absolute>
    <name>Chen76</name>
    <composition>
      <cardinality>
        <OneOrMore/>
      </cardinality>
      <type>DEPT</type>
    </composition>
    <composition>
      <cardinality>
        <OneOrMore/>
      </cardinality>
      <type>EMP</type>
    </composition>
    <composition>
      <cardinality>
        <OneOrMore/>
      </cardinality>
      <type>PROJ</type>
    </composition>
    <composition>
      <cardinality>
        <OneOrMore/>
      </cardinality>
      <type>PART</type>
    </composition>
    <composition>
      <cardinality>
        <OneOrMore/>
      </cardinality>
      <type>SUPP</type>
    </composition>
  </absolute>
  <group>
    <name>body</name>
    <presentation>
      <y>1.0</y>
    </presentation>
    <entity_type>
      <name>DEPT</name>
      <presentation>
        <x>0.2</x>
        <h>1.25</h>
        <deltaw>1.2</deltaw>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
        <name>DEPT-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
      </attribute>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>DEPT-EMP</type>
        <identifying/>
        <inverse>dept</inverse>
        <diagram>
          <path>
            <destattach>0.3</destattach>
          </path>
        </diagram>
      </composition>
    </entity_type>
    <entity_type>
      <name>DEPT-EMP</name>
      <presentation>
        <below>DEPT</below>
        <deltaw>0.3</deltaw>
        <x>0.7</x>
        <y>1.1</y>
      </presentation>
      <attribute>
        <name>DEPT-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
        <implementationOf>
          <rel>dept</rel>
        </implementationOf>
      </attribute>
      <attribute>
        <name>EMP-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
        <implementationOf>
          <rel>emp</rel>
        </implementationOf>
      </attribute>
    </entity_type>
    <entity_type>
      <name>EMP</name>
      <presentation>
        <rightOf>DEPT</rightOf>
        <w>2.5</w>
        <h>1.55</h>
      </presentation>
      <attribute>
        <name>EMP-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
      </attribute>
      <attribute>
        <name>NAME</name>
        <type>
          <string/>
        </type>
      </attribute>
      <attribute>
        <name>DOB</name>
        <type>
          <string/>
        </type>
        <identifying/>
      </attribute>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>DEPT-EMP</type>
        <identifying/>
        <inverse>emp</inverse>
        <diagram>
          <path>
            <destattach>0.7</destattach>
          </path>
        </diagram>
      </composition>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>DEP</type>
        <identifying/>     
        <inverse>emp</inverse>
      </composition>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>PROJ-WORKER</type>
        <identifying/>       
        <inverse>emp</inverse>
        <diagram>
          <path>
            <destattach>0.25</destattach>
            <id><label><yAdjustment>1.3</yAdjustment><xAdjustment>0.2</xAdjustment></label></id>
          </path>
        </diagram>
      </composition>
    </entity_type>
    <entity_type>
      <name>DEP</name>
      <presentation>
        <below>EMP</below>
        <rightOf>DEPT-EMP</rightOf>
        <deltaw>0.4</deltaw>
      </presentation>
      <!--
      <dependency>
        <type>emp</type>
        <cardinality>
          <ExactlyOne/>
        </cardinality>
      </dependency>
      -->
      <attribute>
        <name>EMP-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
        <implementationOf>
          <rel>emp</rel>
        </implementationOf>
      </attribute>
      <attribute>
        <name>NAME</name>
        <type>
          <string/>
        </type>
      </attribute>
      <attribute>
        <name>DOB</name>
        <type>
          <string/>
        </type>
      </attribute>
    </entity_type>
    <group>
      <name>project_group</name>
      <presentation>
        <rightOf>EMP</rightOf>
        <x>1.0</x>
      </presentation>
      <entity_type>
        <name>PROJ</name>
        <presentation>
          <x>0.5</x>
          <w>3.5</w>
        </presentation>
        <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
          <name>PROJECT-NO</name>
          <type>
            <string/>
          </type>
          <identifying/>
        </attribute>
        <attribute>
          <name>DESCRIPTION</name>
          <type>
            <string/>
          </type>
        </attribute>
        <composition>
          <cardinality>
            <ExactlyOne/>
          </cardinality>
          <type>PROJ-MAN</type>
          <identifying/>
          <inverse>proj</inverse>
          <diagram>
            <path>
              <align>
                <ToDest/>
              </align>
            </path>
          </diagram>
        </composition>
        <composition>
          <cardinality>
            <OneOrMore/>
          </cardinality>
          <type>PROJ-WORKER</type>
          <identifying/>          
          <inverse>proj</inverse>
          <diagram>
            <path>
              <srcattach>0.75</srcattach>
              <destattach>0.8</destattach>
              <id><label><yAdjustment>1.4</yAdjustment><xAdjustment>0.3</xAdjustment></label></id>
            </path>
          </diagram>
        </composition>
        <composition>
          <cardinality>
            <OneOrMore/>
          </cardinality>
          <type>PROJ-PART</type>
          <identifying/>         
          <inverse>proj</inverse>
          <diagram>
            <path>
              <srcattach>0.875</srcattach>
              <destattach>0.25</destattach>
            </path>
          </diagram>
        </composition>
      </entity_type>
      <group>
        <name>project_children</name>
        <presentation>
          <below>PROJ</below>
          <x>1.75</x>
          <y>1.0</y>
        </presentation>
        <entity_type>
          <name>PROJ-MAN</name>
          <presentation>
            <y>-0.75</y>
            <deltaw>0.3</deltaw>
          </presentation>
          <!--
          <dependency>
            <name>proj</name>
            <type>PROJ</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>PROJ-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>proj</rel>
            </implementationOf>
          </attribute>
          <attribute>
            <name>EMP-NO</name>
            <type>
              <string/>
            </type>
            <implementationOf>
              <rel>EMP</rel>
            </implementationOf>
          </attribute>
          <reference>
            <type>EMP</type>
            <cardinality>
              <ExactlyOne/>
            </cardinality>
            <diagram>
              <path>
                <srcarmlen>0.2</srcarmlen>
              </path>
            </diagram>
          </reference>
        </entity_type>
        <entity_type>
          <name>PROJ-WORKER</name>
          <presentation>
            <below>PROJ-MAN</below>
            <y>1.3</y>
            <deltaw>1.2</deltaw>
          </presentation>
          <!--
          <dependency>
            <name>emp</name>
            <type>EMP</type>
            <cardinality>
              <ExactlyOne/>
            </cardinality>
          </dependency>
          -->
          <attribute>
            <name>EMP-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>emp</rel>
            </implementationOf>
          </attribute>
          <!--
          <dependency>
            <name>proj</name>
            <type>PROJ</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>PROJ-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>proj</rel>
            </implementationOf>
          </attribute>
          <attribute>
            <name>PERCENTAGE-OF-TIME</name>
            <type>
              <string/>
            </type>
          </attribute>
        </entity_type>
        <entity_type>
          <name>PROJ-PART</name>
          <presentation>
            <rightOf>PROJ-MAN</rightOf>
            <x>1.5</x>
            <y>1.0</y>
            <deltaw>1.0</deltaw>
          </presentation>
          <composition>
            <cardinality>
              <OneOrMore/>
            </cardinality>
            <type>PROJ-PART-SUPP</type>
            <identifying/>
            <inverse>part</inverse>
            <diagram>
              <path>
                <destattach>0.25</destattach>
            <id><label><yAdjustment>0.2</yAdjustment></label></id>
              </path>
            </diagram>
          </composition>
          <!--
          <dependency>
            <name>proj</name>
            <type>PROJ</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>PROJ-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>proj</rel>
            </implementationOf>
          </attribute>
          <!--
          <dependency>
            <name>part</name>
            <type>PART</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>PART-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>part</rel>
            </implementationOf>
          </attribute>       
          <attribute>
            <name>QUANTITY-COMMITTED</name>
            <type>
              <string/>
            </type>
          </attribute>
        </entity_type>
        <entity_type>
          <name>PROJ-PART-SUPP</name>
          <presentation>
            <below>PROJ-PART</below>
            <x>1.0</x>
            <y>1.0</y>
            <deltaw>0.35</deltaw>
          </presentation>
          <!--
          <dependency>
            <name>part</name>
            <type>PROJ-PART</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>PROJ-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>part</rel>
            </implementationOf>
          </attribute>
          <attribute>
            <name>PART-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>part</rel>
            </implementationOf>
          </attribute>
          <!--
           <dependency>
            <name>supp</name>
            <type>SUPP</type>
            <cardinality><ExactlyOne/></cardinality>
          </dependency>
          -->
          <attribute>
            <name>SUPP-NO</name>
            <type>
              <string/>
            </type>
            <identifying/>
            <implementationOf>
              <rel>supp</rel>
            </implementationOf>
          </attribute>
        </entity_type>
      </group>
    </group>
    <entity_type>
      <name>PART</name>
      <presentation>
        <rightOf>PROJ</rightOf>
        <x>1.0</x>
        <deltaw>0.9</deltaw>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
        <name>PART-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
      </attribute>
      <attribute>
        <name>DESCRIPTION</name>
        <type>
          <string/>
        </type>
      </attribute>
      <attribute>
        <name>QUANTITY-ON-HAND</name>
        <type>
          <string/>
        </type>
      </attribute>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>PROJ-PART</type>
        <identifying/>

        <inverse>part</inverse>
        <diagram>
          <path>
            <destattach>0.75</destattach>
          </path>
        </diagram>
      </composition>
    </entity_type>
    <entity_type>
      <name>SUPP</name>
      <presentation>
        <rightOf>PART</rightOf>
        <deltaw>0.45</deltaw>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
        <name>SUPP-NO</name>
        <type>
          <string/>
        </type>
        <identifying/>
      </attribute>
      <composition>
        <cardinality>
          <OneOrMore/>
        </cardinality>
        <type>PROJ-PART-SUPP</type>
        <identifying/>
        <inverse>supp</inverse>
        <diagram>
          <path>
            <destattach>0.75</destattach>
            <id><label><yAdjustment>2.2</yAdjustment></label></id>
          </path>
        </diagram>
      </composition>

    </entity_type>
  </group>
</entity_model>
