<?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">
   <presentation>
      <diagram>
         <deltah>0.4</deltah>
      </diagram>
   </presentation>
   <description>
      A test that the physical models are generated correctly in the presence of abstraction and the use of inherited relationships.
   </description>
   <defaults>
      <et_width>2.0</et_width>
      <et_height>2.0</et_height>
   </defaults>
   <absolute>
      <composition>
         <type>A1</type>
         <cardinality>
            <OneOrMore/>
         </cardinality>
      </composition>
      <composition>
         <type>A2</type>
         <cardinality>
            <OneOrMore/>
         </cardinality>
      </composition>
   </absolute>
   <entity_type>
      <name>A1</name>
      <presentation>
         <x>0.6</x>
         <y>2.0</y>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <composition>
         <name>b1</name>
         <type>B1</type>
         <cardinality>
            <OneOrMore/>
         </cardinality>
         <identifying/>
         <inverse>p1</inverse>
      </composition>
      <reference>
         <name>f1</name>
         <type>Is</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <diagram>
            <path>
               <align>
                  <ToSrc/>
               </align>
               <label>
                  <position>
                     <Upside/>
                  </position>
               </label>
               <inverse>
                  <label>
                     <position>
                        <Downside/>
                     </position>
                  </label>
               </inverse>
            </path>
         </diagram>
      </reference>
   </entity_type>
   <entity_type>
      <name>I</name>
      <presentation>
         <rightOf>A1</rightOf>
         <x>1.8</x>
         <y>-1.0</y>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <entity_type>
         <name>Is</name>
         <presentation>
            <h>0.6</h>
            <w>1.3</w>
         </presentation>
      </entity_type>
      <reference>
         <name>f2</name>
         <type>A2</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <diagram>
            <path>
               <align>
                  <ToDest/>
               </align>
               <label>
                  <position>
                     <Upside/>
                  </position>
               </label>
               <inverse>
                  <label>
                     <position>
                        <Downside/>
                     </position>
                  </label>
               </inverse>
            </path>
         </diagram>
      </reference>
   </entity_type>
   <entity_type>
      <name>A2</name>
      <presentation>
         <rightOf>A1</rightOf>
         <x>6.0</x>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <composition>
         <name>j</name>
         <type>J</type>
         <cardinality>
            <OneOrMore/>
         </cardinality>
         <identifying/>
         <inverse>p2</inverse>
      </composition>
   </entity_type>
   <entity_type>
      <name>B1</name>
      <presentation>
         <below>A1</below>
         <y>3.5</y>
      </presentation>
      <entity_type>
         <name>B1s</name>
         <reference>
            <name>g</name>
            <type>B2s</type>
            <cardinality>
               <ExactlyOne/>
            </cardinality>
            <diagonal>
               <join>
                  <component>
                     <rel>p1</rel>
                  </component>
                  <component>
                     <rel>f1</rel>
                  </component>
                  <component>
                     <rel>f2</rel>
                  </component>
               </join>
            </diagonal>
            <riser>
               <join>
                  <component>
                     <rel>p2</rel>
                  </component>
                  <component>
                     <rel>p2</rel>
                  </component>
               </join>
            </riser>
            <diagram>
               <path>
                  <align>
                     <ToSrc/>
                  </align>
                  <label>
                     <position>
                        <Upside/>
                     </position>
                  </label>
                  <inverse>
                     <label>
                        <position>
                           <Downside/>
                        </position>
                     </label>
                  </inverse>
                  <scope>
                     <label>
                        <xAdjustment>-0.5</xAdjustment>
                     </label>
                  </scope>
               </path>
            </diagram>
         </reference>
      </entity_type>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <dependency>
         <name>p1</name>
         <type>A1</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>b1</inverse_of>
      </dependency>
   </entity_type>
   <entity_type>
      <name>J</name>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <presentation>
         <below>A2</below>
      </presentation>
      <entity_type>
         <name>Js</name>
         <composition>
            <name>b2</name>
            <type>B2</type>
            <cardinality>
               <OneOrMore/>
            </cardinality>
            <identifying/>
            <inverse>p2</inverse>
         </composition>
      </entity_type>
      <dependency>
         <name>p2</name>
         <type>A2</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>b2</inverse_of>
      </dependency>
   </entity_type>
   <entity_type>
      <name>B2</name>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <presentation>
         <rightOf>B1</rightOf>
         <below>J</below>
      </presentation>
      <entity_type>
         <name>B2s</name>
      </entity_type>
      <dependency>
         <name>p2</name>
         <type>Js</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>b2</inverse_of>
      </dependency>
   </entity_type>
</entity_model>
