<?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>
         <deltaw>0.2</deltaw>
      </diagram>
   </presentation>
   <defaults>
      <et_width>1.5</et_width>
      <et_y_separation>1.0</et_y_separation>
   </defaults>
   <description>
       A less obvious way of representing a table. Contrast with the tableA example.
   </description>
   <entity_type>
      <name>table</name>
      <presentation>
         <x>2.3</x>
      </presentation>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>name</name>
         <type>
            <string/>
         </type>
         <identifying/>
      </attribute>
      <composition>
         <name>rows</name>
         <cardinality>
            <OneOrMore/>
         </cardinality>
         <type>row</type>
         <identifying/>
         <inverse>ofTable</inverse>
         <diagram>
            <path>
               <label>
                  <position>
                     <Left/>
                  </position>
               </label>
               <inverse>
                  <label>
                     <position>
                        <Left/>
                     </position>
                     <xAdjustment>-0.05</xAdjustment>
                  </label>
               </inverse>
               <id>
                  <label>
                     <position>
                        <Downside/>
                     </position>
                     <xAdjustment>0.3</xAdjustment>
                  </label>
               </id>
               <destarmlen>0.5</destarmlen>
            </path>
         </diagram>
      </composition>
      <composition>
         <name>columns</name>
         <cardinality>
            <OneOrMore/>
         </cardinality>
         <type>column</type>
         <inverse>ofTable</inverse>
         <diagram>
            <path>
               <id>
                  <label>
                     <position>
                        <Downside/>
                     </position>
                     <xAdjustment>-0.3</xAdjustment>
                  </label>
               </id>
               <destarmlen>0.5</destarmlen>
            </path>
         </diagram>
      </composition>
   </entity_type>
   <group>
      <name>row and column</name>
      <presentation>
         <below>table</below>
      </presentation>
      <entity_type>
         <name>row</name>
         <presentation>
            <deltaw>0.3</deltaw>
         </presentation>
         <dependency>
            <name>ofTable</name>
            <inverse_of>rows</inverse_of>
            <type>table</type>
            <cardinality>
               <ExactlyOne/>
            </cardinality>
         </dependency>
         <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
            <name>number</name>
            <type>
               <integer/>
            </type>
            <identifying/>
         </attribute>
         <composition>
            <name>cells</name>
            <cardinality>
               <OneOrMore/>
            </cardinality>
            <type>data cell</type>
            <identifying/>
            <inverse>ofRow</inverse>
            <diagram>
               <path>
                  <label>
                     <position>
                        <Left/>
                     </position>
                  </label>
                  <inverse>
                     <label>
                        <position>
                           <Left/>
                        </position>
                        <xAdjustment>-0.05</xAdjustment>
                     </label>
                  </inverse>
                  <destattach>0.3</destattach>
                  <destarmlen>0.6</destarmlen>
               </path>
            </diagram>
         </composition>
      </entity_type>
      <entity_type>
         <name>column</name>
         <presentation>
            <rightOf>row</rightOf>
            <x>0.8</x>
            <deltaw>0.3</deltaw>
         </presentation>
         <dependency>
            <name>ofTable</name>
            <type>table</type>
            <cardinality>
               <ExactlyOne/>
            </cardinality>
         </dependency>
         <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
            <name>title</name>
            <type>
               <string/>
            </type>
            <identifying/>
         </attribute>
         <composition>
            <name>cells</name>
            <cardinality>
               <OneOrMore/>
            </cardinality>
            <type>data cell</type>
            <identifying/>
            <inverse>ofCol</inverse>
            <diagram>
               <path>
                  <destattach>0.7</destattach>
                  <destarmlen>0.6</destarmlen>
               </path>
            </diagram>
         </composition>
      </entity_type>
   </group>
   <entity_type>
      <name>data cell</name>
      <presentation>
         <below>row and column</below>
         <deltaw>0.5</deltaw>
         <y>1.7</y>
      </presentation>
      <dependency>
         <name>ofRow</name>
         <type>row</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>cells</inverse_of>
      </dependency>
      <dependency>
         <name>ofCol</name>
         <type>column</type>
         <cardinality>
            <ExactlyOne/>
         </cardinality>
         <inverse_of>cells</inverse_of>
      </dependency>
      <attribute xmlns:era="http://www.entitymodelling.org/ERmodel">
         <name>content</name>
         <type>
            <string/>
         </type>
      </attribute>
   </entity_type>
</entity_model>
