<?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/>.
****************************************************************

JCartmell 17-Sept-2017 Description added.
-->
<entity_model xmlns="http://www.entitymodelling.org/ERmodel">
   <presentation>
      <diagram>
         <deltah>0.5</deltah>
      </diagram>
   </presentation>
   <description>A simple test that for a commuting square of relationships the identifier of the destination entity(A2) is only pulled back a single time to the source entity(B1).
   </description>
   <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>1.3</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>f</name>
         <type>A2</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>A2</name>
      <presentation>
         <rightOf>A1</rightOf>
         <x>3.0</x>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <composition>
         <name>b2</name>
         <type>B2</type>
         <cardinality>
            <OneOrMore/>
         </cardinality>
         <identifying/>
         <inverse>p2</inverse>
      </composition>
   </entity_type>
   <entity_type>
      <name>B1</name>
      <presentation>
         <below>A1</below>
         <y>1.5</y>
         <deltaw>0.3</deltaw>
      </presentation>
      <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>
      <reference>
         <name>g</name>
         <type>B2</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <diagonal>
            <join>
               <component>
                  <rel>p1</rel>
               </component>
               <component>
                  <rel>f</rel>
               </component>
            </join>
         </diagonal>
         <riser>
            <component>
               <rel>p2</rel>
            </component>
         </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>
   <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>A2</below>
         <deltaw>0.3</deltaw>
      </presentation>
      <dependency>
         <name>p2</name>
         <type>A2</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>b2</inverse_of>
      </dependency>
   </entity_type>
</entity_model>
