<?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.5</deltah>
      </diagram>
   </presentation>
   <description>This example shows up a bug in the naming conventions used in generating 
                logical2physical. This bug is mentioned in the comments in file
                ERmodel2.physical_enrichment.module.xslt.
   </description> 
   <absolute>
      <composition>
         <name>context</name>
         <type>context</type>
         <cardinality>OneOrMore</cardinality>
      </composition>
   </absolute>
   <entity_type>
      <name>context</name>
      <presentation>
         <x>7.5</x>
         <y>1.3</y>
      </presentation>
      <value>
         <name>name</name>
         <type>string</type>
         <identifying/>
      </value>
      <composition>
         <name>a</name>
         <type>A</type>
         <cardinality>OneOrMore</cardinality>
         <inverse>..</inverse>
      </composition>
      <composition>
         <name>x1</name>
         <type>X1</type>
         <cardinality>OneOrMore</cardinality>
         <inverse>..</inverse>
         <identifying/>
      </composition>
   </entity_type>
   <group>
      <name>content</name>
      <presentation>
         <below>context</below>
      </presentation>
      <entity_type>
         <name>A</name>
         <presentation>
            <x>0.6</x>
            <y>0.7</y>
         </presentation>
         <value>
            <name>name</name>
            <type>string</type>
            <identifying/>
         </value>
         <dependency>
            <name>..</name>
            <type>context</type>
            <cardinality>ExactlyOne</cardinality>
            <inverse_of>a</inverse_of>
         </dependency>
         <reference>
            <name>f</name>
            <type>B</type>
            <identifying/>
            <cardinality>ExactlyOne</cardinality>
            <diagonal>
               <join>
                  <component>
                     <rel>..</rel>
                  </component>
               </join>
            </diagonal>
            <riser>
               <join>
                  <component>
                     <rel>p1</rel>
                  </component>
                  <component>
                     <rel>..</rel>
                  </component>
                  <component>
                     <rel>..</rel>
                  </component>
               </join>
            </riser>
            <diagram>
               <path>
                  <label>
                     <position>Upside</position>
                  </label>
              
                  <srcarmlen>0.4</srcarmlen>
               </path>
            </diagram>
         </reference>
      </entity_type>
      <entity_type>
         <name>X1</name>
         <presentation>
            <rightOf>A</rightOf>
            <x>6.0</x>
            <y>1.0</y>
         </presentation>
         <value>
            <name>name</name>
            <type>string</type>
            <identifying/>
         </value>
         <dependency>
            <name>..</name>
            <type>context</type>
            <cardinality>ExactlyOne</cardinality>
            <inverse_of>x1</inverse_of>
         </dependency>
         <composition>
            <name>x2</name>
            <type>X2</type>
            <cardinality>OneOrMore</cardinality>
            <inverse>..</inverse>
            <identifying/>
         </composition>
      </entity_type>
      <entity_type>
         <name>X2</name>
         <presentation>
            <below>X1</below>
         </presentation>
         <value>
            <name>name</name>
            <type>string</type>
            <identifying/>
         </value>
         <dependency>
            <name>..</name>
            <type>X1</type>
            <cardinality>ExactlyOne</cardinality>
            <inverse_of>x2</inverse_of>
         </dependency>
         <composition>
            <name>b</name>
            <type>B</type>
            <cardinality>OneOrMore</cardinality>
            <inverse>p1</inverse>
         </composition>
         <composition>
            <name>c</name>
            <type>C</type>
            <cardinality>OneOrMore</cardinality>
            <inverse>p2</inverse>
            <identifying/>
         </composition>
         <composition>
            <name>d</name>
            <type>D</type>
            <cardinality>OneOrMore</cardinality>
            <inverse>p3</inverse>
            <identifying/>
         </composition>
      </entity_type>
      <group>
         <name>X2 children</name>
         <presentation>
            <below>X2</below>
            <y>1.0</y>
         </presentation>
         <entity_type>
            <name>B</name>
            <presentation>
               <deltaw>0.3</deltaw>
            </presentation>
            <value>
               <name>name</name>
               <type>string</type>
               <identifying/>
            </value>
            <dependency>
               <name>p1</name>
               <type>X2</type>
               <cardinality>ExactlyOne</cardinality>
               <inverse_of>b</inverse_of>
            </dependency>
            <reference>
               <name>g</name>
               <type>C</type>
               <cardinality>ExactlyOne</cardinality>
               <identifying/>
               <diagonal>
                  <join>
                     <component>
                        <rel>p1</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                  </join>
               </diagonal>
               <riser>
                  <join>
                     <component>
                        <rel>p2</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                  </join>
               </riser>
               <diagram>
                  <path>
                     <align>ToSrc</align>
                     <label>
                        <position>Upside</position>
                     </label>
                     <inverse>
                        <label>
                           <position>Downside</position>
                        </label>
                     </inverse>
                     <scope>
                        <label>
                           <position>Downside</position>
                           <xAdjustment>-0.5</xAdjustment>
                        </label>
                     </scope>
                  </path>
               </diagram>
            </reference>
         </entity_type>
         <entity_type>
            <name>C</name>
            <value>
               <name>name</name>
               <type>string</type>
               <identifying/>
            </value>
            <presentation>
               <rightOf>B</rightOf>
               <x>2.0</x>
               <deltaw>0.3</deltaw>
            </presentation>
            <dependency>
               <name>p2</name>
               <type>X2</type>
               <cardinality>ExactlyOne</cardinality>
               <inverse_of>c</inverse_of>
            </dependency>
            <reference>
               <name>h</name>
               <type>D</type>
               <cardinality>ExactlyOne</cardinality>
               <identifying/>
               <diagonal>
                  <join>
                     <component>
                        <rel>p2</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                  </join>
               </diagonal>
               <riser>
                  <join>
                     <component>
                        <rel>p3</rel>
                     </component>
                     <component>
                        <rel>..</rel>
                     </component>
                  </join>
               </riser>
               <diagram>
                  <path>
                     <align>ToSrc</align>
                     <label>
                        <position>Upside</position>
                     </label>
                     <inverse>
                        <label>
                           <position>Downside</position>
                        </label>
                     </inverse>
                     <scope>
                        <label>
                           <position>Downside</position>
                           <xAdjustment>-0.5</xAdjustment>
                        </label>
                     </scope>
                  </path>
               </diagram>
            </reference>
         </entity_type>
         <entity_type>
            <name>D</name>
            <value>
               <name>name</name>
               <type>string</type>
               <identifying/>
            </value>
            <presentation>
               <rightOf>C</rightOf>
               <x>2.0</x>
               <deltaw>0.3</deltaw>
            </presentation>
            <dependency>
               <name>p3</name>
               <type>X2</type>
               <cardinality>ExactlyOne</cardinality>
               <inverse_of>d</inverse_of>
            </dependency>
         </entity_type>
      </group>
   </group>
</entity_model>
