Changeset 2022


Ignore:
Timestamp:
07/21/09 15:45:58 (3 years ago)
Author:
jvelde
Message:
 
Location:
molgenis4eb
Files:
206 added
98 edited

Legend:

Unmodified
Added
Removed
  • molgenis4eb/.classpath

    r1951 r2022  
    77        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 
    88        <classpathentry combineaccessrules="false" kind="src" path="/molgenis3_3"/> 
     9        <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/> 
     10        <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> 
    911        <classpathentry kind="output" path="build/classes"/> 
    1012</classpath> 
  • molgenis4eb/.project

    r1969 r2022  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<projectDescription> 
    3         <name>molgenis3_3_distro</name> 
     3        <name>molgenis4eb</name> 
    44        <comment></comment> 
    55        <projects> 
  • molgenis4eb/.settings/org.eclipse.wst.common.component

    r1969 r2022  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<project-modules id="moduleCoreId" project-version="1.5.0"> 
    3     <wb-module deploy-name="molgenis2_distro"> 
     3    <wb-module deploy-name="molgenis4eb"> 
    44        <wb-resource deploy-path="/" source-path="/WebContent"/> 
    55        <wb-resource deploy-path="/WEB-INF/classes" source-path="/generated/src"/> 
     
    1212        </dependent-module> 
    1313        <property name="java-output-path" value="build/classes"/> 
    14         <property name="context-root" value="molgenis"/> 
     14        <property name="context-root" value="molgenis4eb"/> 
    1515    </wb-module> 
    1616</project-modules> 
  • molgenis4eb/WebContent/META-INF/context.xml

    r2015 r2022  
    1 <Context path="/molgenis" docBase="molgenis4mpd" debug="5" reloadable="true" crossContext="true">                
     1<Context path="/molgenis4eb" docBase="molgenis4mpd" debug="5" reloadable="true" crossContext="true">             
    22        <Resource  
    3                 name="jdbc/molgenisdb"  
     3                name="jdbc/molgenis4eb"  
    44                auth="Container"  
    55                factory="org.apache.commons.dbcp.BasicDataSourceFactory"  
     
    88                password="molgenis"  
    99                driverClassName="com.mysql.jdbc.Driver"  
    10                 url="jdbc:mysql://localhost/molgenis?innodb_autoinc_lock_mode=2"  
     10                url="jdbc:mysql://localhost/molgenis4eb?innodb_autoinc_lock_mode=2"  
    1111                removeAbandoned="true" 
    1212                maxActive="8"  
  • molgenis4eb/WebContent/WEB-INF/web.xml

    r1990 r2022  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <web-app id="molgenis" version="2.4" 
     2<web-app id="molgenis4eb" version="2.4" 
    33        xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    44        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
    5         <display-name>molgenis</display-name> 
     5        <display-name>molgenis4eb</display-name> 
    66        <welcome-file-list> 
    77                <welcome-file>index.html</welcome-file> 
     
    4747                <url-pattern>/xref/*</url-pattern> 
    4848        </servlet-mapping> 
     49         
     50                <security-constraint> 
     51      <web-resource-collection> 
     52          <web-resource-name>MolgenisServlet</web-resource-name> 
     53          <url-pattern>*.do</url-pattern> 
     54      </web-resource-collection> 
     55      <auth-constraint> 
     56          <role-name>col7a1</role-name> 
     57      </auth-constraint> 
     58  </security-constraint> 
     59 
     60  <login-config> 
     61      <auth-method>BASIC</auth-method> 
     62      <realm-name>MOLGENIS</realm-name> 
     63  </login-config> 
     64 
     65  <security-role> 
     66      <description> 
     67      The role that is required to log in to the application 
     68      </description> 
     69      <role-name>col7a1</role-name> 
     70  </security-role> 
    4971</web-app> 
  • molgenis4eb/WebContent/doc/classmodel.html

    r2015 r2022  
    22 
    33<head> 
    4         <title>My First MOLGENIS Documentation</title> 
     4        <title>Col7A1 Database Documentation</title> 
    55         
    66        <meta name="keywords"                   content=""> 
     
    5757 
    5858<body> 
    59 <h1><a name="_top_of_page">My First MOLGENIS</a> documentation.</h1> 
    60  
    61 This is an minimal example database to show how 
    62                 MOLGENIS works. The purpose of this example database is to 
    63                 administrate experiment, samples, traits and measurements. The 
    64                 name='example' will result in a Java package 'example' being 
    65                 generated. 
     59<h1><a name="_top_of_page">Col7A1 Database</a> documentation.</h1> 
     60 
    6661 
    6762<h2>Table of contents</h2> 
    6863<table width="100%"><tr> 
     64<td> 
     65<b><a href="#original.col7a1database_package">original.col7a1database</a></b> package: 
     66<ul> 
     67<li><a href="#Role">Role</a></li> 
     68<li><a href="#User">User</a></li> 
     69<li><a href="#Entity">Entity</a></li> 
     70<li><a href="#RoleEntityPermission">RoleEntityPermission</a></li> 
     71<li><a href="#Statistics">Statistics</a></li> 
     72<li><a href="#RNA">RNA</a></li> 
     73<li><a href="#Amino_acid">Amino_acid</a></li> 
     74<li><a href="#Mutations">Mutations</a></li> 
     75<li><a href="#Contact">Contact</a></li> 
     76<li><a href="#Patient">Patient</a></li> 
     77<li><a href="#Gender">Gender</a></li> 
     78<li><a href="#Diagnosis">Diagnosis</a></li> 
     79<li><a href="#Phenotype">Phenotype</a></li> 
     80<li><a href="#E_M">E_M</a></li> 
     81<li><a href="#I_F">I_F</a></li> 
     82<li><a href="#Consequence">Consequence</a></li> 
     83<li><a href="#Pictures">Pictures</a></li> 
     84</ul> 
     85</td> 
     86<td> 
     87<b><a href="#fuge.xgap.components_package">fuge.xgap.components</a></b> package: 
     88<ul> 
     89<li><a href="#DataElement">DataElement</a></li> 
     90<li><a href="#DecimalDataElement">DecimalDataElement</a></li> 
     91<li><a href="#TextDataElement">TextDataElement</a></li> 
     92<li><a href="#Describable">Describable</a></li> 
     93<li><a href="#Identifiable">Identifiable</a></li> 
     94<li><a href="#FugeData">FugeData</a></li> 
     95<li><a href="#Data">Data</a></li> 
     96<li><a href="#FugeDimensionElement">FugeDimensionElement</a></li> 
     97<li><a href="#FugeInvestigation">FugeInvestigation</a></li> 
     98<li><a href="#Investigation">Investigation</a></li> 
     99<li><a href="#DimensionElement">DimensionElement</a></li> 
     100</ul> 
     101</td> 
    69102</tr></table> 
    70103<br/> 
     
    72105 
    73106 
     107<h1><a name="original.col7a1database_package">original.col7a1database package</a></h1> 
     108<p>This is an minimal example database to show how 
     109                        MOLGENIS works. The purpose of this example database is to administrate 
     110                        experiment, samples, traits and measurements. The name='example' will result 
     111                        in a Java package 'example' being generated. 
     112</p> 
     113<img src="entity-uml-diagram-original.col7a1database.dot.png" style="border: solid thin black;"> 
     114<a href="entity-uml-diagram-original.col7a1database.dot.png" target="_blank">show fullscreen</a> 
     115<h3><a name="Role">Role</a></h3> 
     116<p style="margin-top: 0px; margin-bottom: 0px;"> 
     117 
     118 
     119</p> 
     120<p>      
     121 
     122</p> 
     123<p> 
     124<u>Attributes:</u> 
     125<table>  
     126<tr> 
     127<td style="color:#333333;"> 
     128<b>id</b>: int  
     129(required) 
     130</td> 
     131</tr> 
     132 
     133<tr> 
     134<td style="color:#333333;"> 
     135<b>name</b>: string  
     136(required) 
     137</td> 
     138</tr> 
     139 
     140<tr> 
     141<td style="color:#333333;"> 
     142<b>superuser</b>: bool  
     143(required) 
     144</td> 
     145</tr> 
     146 
     147</table> 
     148<h3><a name="User">User</a></h3> 
     149<p style="margin-top: 0px; margin-bottom: 0px;"> 
     150 
     151 
     152</p> 
     153<p>      
     154 
     155</p> 
     156<p> 
     157<u>Attributes:</u> 
     158<table>  
     159<tr> 
     160<td style="color:#333333;"> 
     161<b>id</b>: int  
     162(required) 
     163</td> 
     164</tr> 
     165 
     166<tr> 
     167<td style="color:#333333;"> 
     168<b>name</b>: string  
     169(required) 
     170</td> 
     171</tr> 
     172 
     173<tr> 
     174<td style="color:#333333;"> 
     175<b>password</b>: string  
     176(required) 
     177</td> 
     178</tr> 
     179 
     180</table> 
     181<p> 
     182<u>Associations:</u> 
     183<table>  
     184<tr> 
     185<td style="color:#333333;"> 
     186<b>roles</b>: Role (0..n) 
     187</td> 
     188</tr> 
     189<tr><td style="padding-left: 50px;">Roles that this user has adopted. Its rights are inherited.</td></tr> 
     190</table> 
     191<h3><a name="Entity">Entity</a></h3> 
     192<p style="margin-top: 0px; margin-bottom: 0px;"> 
     193 
     194 
     195</p> 
     196<p>      
     197Catalog of entity names 
     198 
     199</p> 
     200<p> 
     201<u>Attributes:</u> 
     202<table>  
     203<tr> 
     204<td style="color:#333333;"> 
     205<b>id</b>: int  
     206(required) 
     207</td> 
     208</tr> 
     209 
     210<tr> 
     211<td style="color:#333333;"> 
     212<b>className</b>: string  
     213(required) 
     214</td> 
     215</tr> 
     216<tr><td style="padding-left: 50px;">Full name of the data type 
     217</td></tr> 
     218</table> 
     219<h3><a name="RoleEntityPermission">RoleEntityPermission</a></h3> 
     220<p style="margin-top: 0px; margin-bottom: 0px;"> 
     221 
     222 
     223</p> 
     224<p>      
     225Assign rights on entities to roles. 
     226 
     227</p> 
     228<p> 
     229<u>Attributes:</u> 
     230<table>  
     231<tr> 
     232<td style="color:#333333;"> 
     233<b>id</b>: int  
     234(required) 
     235</td> 
     236</tr> 
     237 
     238<tr> 
     239<td style="color:#333333;"> 
     240<b>permission</b>: enum  
     241(required) 
     242</td> 
     243</tr> 
     244 
     245</table> 
     246<p> 
     247<u>Associations:</u> 
     248<table>  
     249<tr> 
     250<td style="color:#333333;"> 
     251<b>role</b>:  
     252Role (1..1) 
     253 
     254</td> 
     255</tr> 
     256 
     257<tr> 
     258<td style="color:#333333;"> 
     259<b>entity</b>:  
     260Entity (1..1) 
     261 
     262</td> 
     263</tr> 
     264 
     265</table> 
     266<h3><a name="Statistics">Statistics</a></h3> 
     267<p style="margin-top: 0px; margin-bottom: 0px;"> 
     268 
     269 
     270</p> 
     271<p>      
     272 
     273</p> 
     274<p> 
     275<u>Attributes:</u> 
     276<table>  
     277<tr> 
     278<td style="color:#333333;"> 
     279<b>id</b>: int  
     280(required) 
     281</td> 
     282</tr> 
     283 
     284<tr> 
     285<td style="color:#333333;"> 
     286<b>value</b>: int  
     287(optional) 
     288</td> 
     289</tr> 
     290 
     291<tr> 
     292<td style="color:#333333;"> 
     293<b>date</b>: date  
     294(required) 
     295</td> 
     296</tr> 
     297 
     298</table> 
     299<p> 
     300<u>Associations:</u> 
     301<table>  
     302<tr> 
     303<td style="color:#333333;"> 
     304<b>mutation</b>:  
     305Mutations (1..1) 
     306 
     307</td> 
     308</tr> 
     309 
     310</table> 
     311<h3><a name="RNA">RNA</a></h3> 
     312<p style="margin-top: 0px; margin-bottom: 0px;"> 
     313 
     314 
     315</p> 
     316<p>      
     317 
     318</p> 
     319<p> 
     320<u>Attributes:</u> 
     321<table>  
     322<tr> 
     323<td style="color:#333333;"> 
     324<b>id</b>: int  
     325(required) 
     326</td> 
     327</tr> 
     328 
     329<tr> 
     330<td style="color:#333333;"> 
     331<b>nucleotides</b>: string  
     332(required) 
     333</td> 
     334</tr> 
     335 
     336<tr> 
     337<td style="color:#333333;"> 
     338<b>exon</b>: int  
     339(required) 
     340</td> 
     341</tr> 
     342 
     343</table> 
     344<p> 
     345<u>Associations:</u> 
     346<table>  
     347<tr> 
     348<td style="color:#333333;"> 
     349<b>Codon</b>:  
     350Amino_acid (1..1) 
     351 
     352</td> 
     353</tr> 
     354 
     355</table> 
     356<h3><a name="Amino_acid">Amino_acid</a></h3> 
     357<p style="margin-top: 0px; margin-bottom: 0px;"> 
     358 
     359 
     360</p> 
     361<p>      
     362 
     363</p> 
     364<p> 
     365<u>Attributes:</u> 
     366<table>  
     367<tr> 
     368<td style="color:#333333;"> 
     369<b>id</b>: int  
     370(required) 
     371</td> 
     372</tr> 
     373 
     374<tr> 
     375<td style="color:#333333;"> 
     376<b>codon</b>: string  
     377(required) 
     378</td> 
     379</tr> 
     380 
     381<tr> 
     382<td style="color:#333333;"> 
     383<b>amino_acid</b>: string  
     384(required) 
     385</td> 
     386</tr> 
     387 
     388</table> 
     389<h3><a name="Mutations">Mutations</a></h3> 
     390<p style="margin-top: 0px; margin-bottom: 0px;"> 
     391 
     392 
     393</p> 
     394<p>      
     395 Here are all mutations known 
     396 
     397</p> 
     398<p> 
     399<u>Attributes:</u> 
     400<table>  
     401<tr> 
     402<td style="color:#333333;"> 
     403<b>id</b>: int  
     404(required) 
     405</td> 
     406</tr> 
     407 
     408<tr> 
     409<td style="color:#333333;"> 
     410<b>nucleotide_change</b>: string  
     411(required) 
     412</td> 
     413</tr> 
     414 
     415<tr> 
     416<td style="color:#333333;"> 
     417<b>amino_acid</b>: string  
     418(required) 
     419</td> 
     420</tr> 
     421 
     422</table> 
     423<p> 
     424<u>Associations:</u> 
     425<table>  
     426<tr> 
     427<td style="color:#333333;"> 
     428<b>consequence</b>:  
     429Consequence (0..1) 
     430 
     431</td> 
     432</tr> 
     433 
     434</table> 
     435<h3><a name="Contact">Contact</a></h3> 
     436<p style="margin-top: 0px; margin-bottom: 0px;"> 
     437 
     438 
     439</p> 
     440<p>      
     441 
     442</p> 
     443<p> 
     444<u>Attributes:</u> 
     445<table>  
     446<tr> 
     447<td style="color:#333333;"> 
     448<b>id</b>: int  
     449(required) 
     450</td> 
     451</tr> 
     452 
     453<tr> 
     454<td style="color:#333333;"> 
     455<b>name</b>: string  
     456(required) 
     457</td> 
     458</tr> 
     459 
     460<tr> 
     461<td style="color:#333333;"> 
     462<b>address</b>: string  
     463(optional) 
     464</td> 
     465</tr> 
     466 
     467<tr> 
     468<td style="color:#333333;"> 
     469<b>tel</b>: string  
     470(optional) 
     471</td> 
     472</tr> 
     473 
     474</table> 
     475<h3><a name="Patient">Patient</a></h3> 
     476<p style="margin-top: 0px; margin-bottom: 0px;"> 
     477 
     478 
     479</p> 
     480<p>      
     481 
     482</p> 
     483<p> 
     484<u>Attributes:</u> 
     485<table>  
     486<tr> 
     487<td style="color:#333333;"> 
     488<b>id</b>: int  
     489(required) 
     490</td> 
     491</tr> 
     492 
     493<tr> 
     494<td style="color:#333333;"> 
     495<b>name</b>: string  
     496(required) 
     497</td> 
     498</tr> 
     499 
     500<tr> 
     501<td style="color:#333333;"> 
     502<b>age</b>: int  
     503(optional) 
     504</td> 
     505</tr> 
     506 
     507<tr> 
     508<td style="color:#333333;"> 
     509<b>alive</b>: bool  
     510(required) 
     511</td> 
     512</tr> 
     513 
     514</table> 
     515<p> 
     516<u>Associations:</u> 
     517<table>  
     518<tr> 
     519<td style="color:#333333;"> 
     520<b>gender</b>:  
     521Gender (1..1) 
     522 
     523</td> 
     524</tr> 
     525 
     526<tr> 
     527<td style="color:#333333;"> 
     528<b>id_mutation1</b>:  
     529Mutations (0..1) 
     530 
     531</td> 
     532</tr> 
     533 
     534<tr> 
     535<td style="color:#333333;"> 
     536<b>id_mutation2</b>:  
     537Mutations (0..1) 
     538 
     539</td> 
     540</tr> 
     541 
     542</table> 
     543<h3><a name="Gender">Gender</a></h3> 
     544<p style="margin-top: 0px; margin-bottom: 0px;"> 
     545 
     546 
     547</p> 
     548<p>      
     549 
     550</p> 
     551<p> 
     552<u>Attributes:</u> 
     553<table>  
     554<tr> 
     555<td style="color:#333333;"> 
     556<b>id</b>: int  
     557(required) 
     558</td> 
     559</tr> 
     560 
     561<tr> 
     562<td style="color:#333333;"> 
     563<b>name</b>: string  
     564(required) 
     565</td> 
     566</tr> 
     567 
     568</table> 
     569<h3><a name="Diagnosis">Diagnosis</a></h3> 
     570<p style="margin-top: 0px; margin-bottom: 0px;"> 
     571 
     572 
     573</p> 
     574<p>      
     575 
     576</p> 
     577<p> 
     578<u>Attributes:</u> 
     579<table>  
     580<tr> 
     581<td style="color:#333333;"> 
     582<b>id</b>: int  
     583(required) 
     584</td> 
     585</tr> 
     586 
     587<tr> 
     588<td style="color:#333333;"> 
     589<b>value</b>: text  
     590(required) 
     591</td> 
     592</tr> 
     593 
     594</table> 
     595<p> 
     596<u>Associations:</u> 
     597<table>  
     598<tr> 
     599<td style="color:#333333;"> 
     600<b>id_phenotype</b>:  
     601Phenotype (1..1) 
     602 
     603</td> 
     604</tr> 
     605 
     606<tr> 
     607<td style="color:#333333;"> 
     608<b>id_patient</b>:  
     609Patient (1..1) 
     610 
     611</td> 
     612</tr> 
     613 
     614</table> 
     615<h3><a name="Phenotype">Phenotype</a></h3> 
     616<p style="margin-top: 0px; margin-bottom: 0px;"> 
     617 
     618 
     619</p> 
     620<p>      
     621 
     622</p> 
     623<p> 
     624<u>Attributes:</u> 
     625<table>  
     626<tr> 
     627<td style="color:#333333;"> 
     628<b>id</b>: int  
     629(required) 
     630</td> 
     631</tr> 
     632 
     633<tr> 
     634<td style="color:#333333;"> 
     635<b>Description</b>: text  
     636(required) 
     637</td> 
     638</tr> 
     639 
     640<tr> 
     641<td style="color:#333333;"> 
     642<b>Date</b>: date  
     643(optional) 
     644</td> 
     645</tr> 
     646 
     647</table> 
     648<h3><a name="E_M">E_M</a></h3> 
     649<p style="margin-top: 0px; margin-bottom: 0px;"> 
     650 
     651 
     652</p> 
     653<p>      
     654 
     655</p> 
     656<p> 
     657<u>Attributes:</u> 
     658<table>  
     659<tr> 
     660<td style="color:#333333;"> 
     661<b>id</b>: int  
     662(required) 
     663</td> 
     664</tr> 
     665 
     666<tr> 
     667<td style="color:#333333;"> 
     668<b>value</b>: string  
     669(required) 
     670</td> 
     671</tr> 
     672 
     673<tr> 
     674<td style="color:#333333;"> 
     675<b>Anchoring_fibers</b>: string  
     676(optional) 
     677</td> 
     678</tr> 
     679 
     680<tr> 
     681<td style="color:#333333;"> 
     682<b>Hemi_desmosomes</b>: string  
     683(optional) 
     684</td> 
     685</tr> 
     686 
     687<tr> 
     688<td style="color:#333333;"> 
     689<b>description</b>: text  
     690(required) 
     691</td> 
     692</tr> 
     693 
     694</table> 
     695<p> 
     696<u>Associations:</u> 
     697<table>  
     698<tr> 
     699<td style="color:#333333;"> 
     700<b>patient</b>:  
     701Patient (1..1) 
     702 
     703</td> 
     704</tr> 
     705 
     706</table> 
     707<h3><a name="I_F">I_F</a></h3> 
     708<p style="margin-top: 0px; margin-bottom: 0px;"> 
     709 
     710 
     711</p> 
     712<p>      
     713 
     714</p> 
     715<p> 
     716<u>Attributes:</u> 
     717<table>  
     718<tr> 
     719<td style="color:#333333;"> 
     720<b>id</b>: int  
     721(required) 
     722</td> 
     723</tr> 
     724 
     725<tr> 
     726<td style="color:#333333;"> 
     727<b>test_LH72</b>: string  
     728(optional) 
     729</td> 
     730</tr> 
     731 
     732<tr> 
     733<td style="color:#333333;"> 
     734<b>test_2Q633</b>: string  
     735(optional) 
     736</td> 
     737</tr> 
     738 
     739<tr> 
     740<td style="color:#333333;"> 
     741<b>keratine_14</b>: string  
     742(optional) 
     743</td> 
     744</tr> 
     745 
     746<tr> 
     747<td style="color:#333333;"> 
     748<b>BP180_1D1</b>: string  
     749(optional) 
     750</td> 
     751</tr> 
     752 
     753<tr> 
     754<td style="color:#333333;"> 
     755<b>Niceine_GB3</b>: string  
     756(optional) 
     757</td> 
     758</tr> 
     759 
     760<tr> 
     761<td style="color:#333333;"> 
     762<b>Collagen</b>: string  
     763(optional) 
     764</td> 
     765</tr> 
     766 
     767<tr> 
     768<td style="color:#333333;"> 
     769<b>description</b>: text  
     770(required) 
     771</td> 
     772</tr> 
     773 
     774</table> 
     775<p> 
     776<u>Associations:</u> 
     777<table>  
     778<tr> 
     779<td style="color:#333333;"> 
     780<b>patient</b>:  
     781Patient (0..1) 
     782 
     783</td> 
     784</tr> 
     785 
     786</table> 
     787<h3><a name="Consequence">Consequence</a></h3> 
     788<p style="margin-top: 0px; margin-bottom: 0px;"> 
     789 
     790 
     791</p> 
     792<p>      
     793 
     794</p> 
     795<p> 
     796<u>Attributes:</u> 
     797<table>  
     798<tr> 
     799<td style="color:#333333;"> 
     800<b>id</b>: int  
     801(required) 
     802</td> 
     803</tr> 
     804 
     805<tr> 
     806<td style="color:#333333;"> 
     807<b>consequence</b>: string  
     808(required) 
     809</td> 
     810</tr> 
     811 
     812</table> 
     813<h3><a name="Pictures">Pictures</a></h3> 
     814<p style="margin-top: 0px; margin-bottom: 0px;"> 
     815 
     816 
     817</p> 
     818<p>      
     819 
     820</p> 
     821<p> 
     822<u>Attributes:</u> 
     823<table>  
     824<tr> 
     825<td style="color:#333333;"> 
     826<b>id</b>: int  
     827(required) 
     828</td> 
     829</tr> 
     830 
     831<tr> 
     832<td style="color:#333333;"> 
     833<b>small</b>: file  
     834(required) 
     835</td> 
     836</tr> 
     837 
     838<tr> 
     839<td style="color:#333333;"> 
     840<b>large</b>: file  
     841(required) 
     842</td> 
     843</tr> 
     844 
     845</table> 
     846<p> 
     847<u>Associations:</u> 
     848<table>  
     849<tr> 
     850<td style="color:#333333;"> 
     851<b>id_patient</b>:  
     852Patient (1..1) 
     853 
     854</td> 
     855</tr> 
     856 
     857</table> 
     858<br/> 
     859<br/> 
     860<h1><a name="fuge.xgap.components_package">fuge.xgap.components package</a></h1> 
     861 
     862<img src="entity-uml-diagram-fuge.xgap.components.dot.png" style="border: solid thin black;"> 
     863<a href="entity-uml-diagram-fuge.xgap.components.dot.png" target="_blank">show fullscreen</a> 
     864<h3><a name="DataElement">DataElement</a> (interface).</h3> 
     865<p style="margin-top: 0px; margin-bottom: 0px;"> 
     866 
     867 
     868</p> 
     869<p>      
     870 
     871                                Generic data structure for aiming the values of a data 
     872                                set as described in Data. Each DataElement describes a 
     873                                cell in a data matrix of rows (from) and columns (to), 
     874                                e.g., in "dataset X" it was measured that geneX (col) 
     875                                relates to geneZ (row). 
     876                         
     877 
     878</p> 
     879<p> 
     880<u>Attributes:</u> 
     881<table>  
     882<tr> 
     883<td style="color:#333333;"> 
     884<b>id</b>: int  
     885(required) 
     886</td> 
     887</tr> 
     888<tr><td style="padding-left: 50px;">automatically generated id-field 
     889</td></tr> 
     890<tr> 
     891<td style="color:#333333;"> 
     892<b>RowIndex</b>: int  
     893(required) 
     894</td> 
     895</tr> 
     896<tr><td style="padding-left: 50px;">Row position in the matrix. 
     897</td></tr> 
     898<tr> 
     899<td style="color:#333333;"> 
     900<b>ColIndex</b>: int  
     901(required) 
     902</td> 
     903</tr> 
     904<tr><td style="padding-left: 50px;">Col position in the matrix. 
     905</td></tr> 
     906</table> 
     907<p> 
     908<u>Associations:</u> 
     909<table>  
     910<tr> 
     911<td style="color:#333333;"> 
     912<b>Data</b>:  
     913Data (1..1) 
     914 
     915</td> 
     916</tr> 
     917<tr><td style="padding-left: 50px;">Reference to the data this entity belongs to.</td></tr> 
     918<tr> 
     919<td style="color:#333333;"> 
     920<b>Col</b>:  
     921DimensionElement (1..1) 
     922 
     923</td> 
     924</tr> 
     925<tr><td style="padding-left: 50px;">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td></tr> 
     926<tr> 
     927<td style="color:#333333;"> 
     928<b>Row</b>:  
     929DimensionElement (1..1) 
     930 
     931</td> 
     932</tr> 
     933<tr><td style="padding-left: 50px;">References the DimensionElement on the other end of the relation.</td></tr> 
     934</table> 
     935<h3><a name="DecimalDataElement">DecimalDataElement</a></h3> 
     936<p style="margin-top: 0px; margin-bottom: 0px;"> 
     937 
     938<i> implements DataElement</i><br/> 
     939</p> 
     940<p>      
     941 
     942                                A DataElement for storing decimal data. 
     943                         
     944 
     945</p> 
     946<p> 
     947<u>Attributes:</u> 
     948<table>  
     949<tr> 
     950<td style="color:#333333;"> 
     951<b>Value</b>: decimal  
     952(optional) 
     953</td> 
     954</tr> 
     955<tr><td style="padding-left: 50px;">The value, e.g., correlation. 
     956</td></tr> 
     957</table> 
     958<h3><a name="TextDataElement">TextDataElement</a></h3> 
     959<p style="margin-top: 0px; margin-bottom: 0px;"> 
     960 
     961<i> implements DataElement</i><br/> 
     962</p> 
     963<p>      
     964Store text data 
     965 
     966</p> 
     967<p> 
     968<u>Attributes:</u> 
     969<table>  
     970<tr> 
     971<td style="color:#333333;"> 
     972<b>Value</b>: text  
     973(optional) 
     974</td> 
     975</tr> 
     976<tr><td style="padding-left: 50px;">The value, e.g., genotype strings like AA, BA, BB. 
     977</td></tr> 
     978</table> 
     979<h3><a name="Describable">Describable</a></h3> 
     980<p style="margin-top: 0px; margin-bottom: 0px;"> 
     981 
     982 
     983</p> 
     984<p>      
     985 
     986</p> 
     987<p> 
     988<u>Attributes:</u> 
     989<table>  
     990<tr> 
     991<td style="color:#333333;"> 
     992<b>id</b>: int  
     993(required) 
     994</td> 
     995</tr> 
     996<tr><td style="padding-left: 50px;">automatically generated id-field 
     997</td></tr> 
     998</table> 
     999<h3><a name="Identifiable">Identifiable</a></h3> 
     1000<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1001<i> extends Describable</i><br/> 
     1002 
     1003</p> 
     1004<p>      
     1005 
     1006</p> 
     1007<p> 
     1008<u>Attributes:</u> 
     1009<table>  
     1010<tr> 
     1011<td style="color:#333333;"> 
     1012<b>name</b>: string  
     1013(required) 
     1014</td> 
     1015</tr> 
     1016<tr><td style="padding-left: 50px;">The potentially ambiguous common identifier, such as a human-readable name for the instance. 
     1017</td></tr> 
     1018</table> 
     1019<h3><a name="FugeData">FugeData</a></h3> 
     1020<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1021<i> extends Identifiable</i><br/> 
     1022 
     1023</p> 
     1024<p>      
     1025 
     1026</p> 
     1027<h3><a name="Data">Data</a></h3> 
     1028<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1029<i> extends FugeData</i><br/> 
     1030 
     1031</p> 
     1032<p>      
     1033 
     1034                                Generic structure for describing data matrices such as 
     1035                                genotype result, gene expression measurement, QTL 
     1036                                calculation, etc. 
     1037                         
     1038 
     1039</p> 
     1040<p> 
     1041<u>Attributes:</u> 
     1042<table>  
     1043<tr> 
     1044<td style="color:#333333;"> 
     1045<b>RowType</b>: enum  
     1046(required) 
     1047</td> 
     1048</tr> 
     1049<tr><td style="padding-left: 50px;">Type of the columns of this matrix. Each column refers to a Trait or Subject (DimensionElement). 
     1050<br/>enum_options: 'Patient', 'Phenotype' 
     1051</td></tr> 
     1052<tr> 
     1053<td style="color:#333333;"> 
     1054<b>ColType</b>: enum  
     1055(required) 
     1056</td> 
     1057</tr> 
     1058<tr><td style="padding-left: 50px;">Type of the rows of this matrix. Each row refers to a Trait or Subject (DimensionElement) 
     1059<br/>enum_options: 'Patient', 'Phenotype' 
     1060</td></tr> 
     1061<tr> 
     1062<td style="color:#333333;"> 
     1063<b>ValueType</b>: enum  
     1064(required) 
     1065</td> 
     1066</tr> 
     1067<tr><td style="padding-left: 50px;">Type of the values of this matrix. E.g. text strings or decimal numbers. 
     1068<br/>enum_options: 'Text', 'Decimal' 
     1069</td></tr> 
     1070<tr> 
     1071<td style="color:#333333;"> 
     1072<b>TotalRows</b>: int  
     1073(required) 
     1074</td> 
     1075</tr> 
     1076 
     1077<tr> 
     1078<td style="color:#333333;"> 
     1079<b>TotalCols</b>: int  
     1080(required) 
     1081</td> 
     1082</tr> 
     1083 
     1084</table> 
     1085<h3><a name="FugeDimensionElement">FugeDimensionElement</a></h3> 
     1086<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1087<i> extends Identifiable</i><br/> 
     1088 
     1089</p> 
     1090<p>      
     1091 
     1092</p> 
     1093<h3><a name="FugeInvestigation">FugeInvestigation</a></h3> 
     1094<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1095<i> extends Identifiable</i><br/> 
     1096 
     1097</p> 
     1098<p>      
     1099 
     1100</p> 
     1101<p> 
     1102<u>Attributes:</u> 
     1103<table>  
     1104<tr> 
     1105<td style="color:#333333;"> 
     1106<b>start</b>: datetime  
     1107(optional) 
     1108</td> 
     1109</tr> 
     1110<tr><td style="padding-left: 50px;">The start point of the investigation. (n.b. removed null constraint) 
     1111</td></tr> 
     1112<tr> 
     1113<td style="color:#333333;"> 
     1114<b>end</b>: datetime  
     1115(optional) 
     1116</td> 
     1117</tr> 
     1118<tr><td style="padding-left: 50px;">The end point of the investigation. (n.b. removed null constraint) 
     1119</td></tr> 
     1120</table> 
     1121<h3><a name="Investigation">Investigation</a></h3> 
     1122<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1123<i> extends FugeInvestigation</i><br/> 
     1124 
     1125</p> 
     1126<p>      
     1127 
     1128</p> 
     1129<h3><a name="DimensionElement">DimensionElement</a></h3> 
     1130<p style="margin-top: 0px; margin-bottom: 0px;"> 
     1131<i> extends FugeDimensionElement</i><br/> 
     1132 
     1133</p> 
     1134<p>      
     1135 
     1136</p> 
     1137<p> 
     1138<u>Associations:</u> 
     1139<table>  
     1140<tr> 
     1141<td style="color:#333333;"> 
     1142<b>Investigation</b>:  
     1143Investigation (1..1) 
     1144 
     1145</td> 
     1146</tr> 
     1147<tr><td style="padding-left: 50px;">Reference to the investigation this belongs to.</td></tr> 
     1148</table> 
     1149<br/> 
     1150<br/> 
    741151 
    751152<h1>Supplementary figure: complete data model</h1> 
     
    791156<a href="#_top_of_page">go to top</a> 
    801157 
    81 <div align="center">Documentation generated on July 17, 2009 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 
     1158<div align="center">Documentation generated on July 21, 2009 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 
    821159</body></html> 
    831160 
  • molgenis4eb/WebContent/doc/entity-uml-diagram.dot

    r2015 r2022  
    2727 
    2828/* entities outside modules*/ 
    29                 "Identifiable" [ 
     29                "Role" [ 
     30                            style = "filled" 
     31                                    fillcolor = "white" 
     32                                        fontname = "Arial" 
     33                                        fontcolor = "black" 
     34                                        color = "black" 
     35                 
     36                        label = "{Role|id : int\lname : string\lsuperuser : bool\l}" 
     37                ] 
     38                "User" [ 
     39                            style = "filled" 
     40                                    fillcolor = "white" 
     41                                        fontname = "Arial" 
     42                                        fontcolor = "black" 
     43                                        color = "black" 
     44                 
     45                        label = "{User|id : int\lname : string\lpassword : string\lroles : mref(Role.id)\l}" 
     46                ] 
     47                "Entity" [ 
     48                            style = "filled" 
     49                                    fillcolor = "white" 
     50                                        fontname = "Arial" 
     51                                        fontcolor = "black" 
     52                                        color = "black" 
     53                 
     54                        label = "{Entity|id : int\lclassName : string\l}" 
     55                ] 
     56                "RoleEntityPermission" [ 
     57                            style = "filled" 
     58                                    fillcolor = "white" 
     59                                        fontname = "Arial" 
     60                                        fontcolor = "black" 
     61                                        color = "black" 
     62                 
     63                        label = "{RoleEntityPermission|id : int\lrole : xref(Role.id)\lentity : xref(Entity.id)\lpermission : enum\l}" 
     64                ] 
     65                "Statistics" [ 
     66                            style = "filled" 
     67                                    fillcolor = "white" 
     68                                        fontname = "Arial" 
     69                                        fontcolor = "black" 
     70                                        color = "black" 
     71                 
     72                        label = "{Statistics|id : int\lmutation : xref(Mutations.id)\lvalue : int\ldate : date\l}" 
     73                ] 
     74                "RNA" [ 
     75                            style = "filled" 
     76                                    fillcolor = "white" 
     77                                        fontname = "Arial" 
     78                                        fontcolor = "black" 
     79                                        color = "black" 
     80                 
     81                        label = "{RNA|id : int\lnucleotides : string\lexon : int\lCodon : xref(Amino_acid.id)\l}" 
     82                ] 
     83                "Amino_acid" [ 
     84                            style = "filled" 
     85                                    fillcolor = "white" 
     86                                        fontname = "Arial" 
     87                                        fontcolor = "black" 
     88                                        color = "black" 
     89                 
     90                        label = "{Amino_acid|id : int\lcodon : string\lamino_acid : string\l}" 
     91                ] 
     92                "Mutations" [ 
     93                            style = "filled" 
     94                                    fillcolor = "white" 
     95                                        fontname = "Arial" 
     96                                        fontcolor = "black" 
     97                                        color = "black" 
     98                 
     99                        label = "{Mutations|id : int\lnucleotide_change : string\lamino_acid : string\lconsequence : xref(Consequence.id)\l}" 
     100                ] 
     101                "Contact" [ 
     102                            style = "filled" 
     103                                    fillcolor = "white" 
     104                                        fontname = "Arial" 
     105                                        fontcolor = "black" 
     106                                        color = "black" 
     107                 
     108                        label = "{Contact|id : int\lname : string\laddress : string\ltel : string\l}" 
     109                ] 
     110                "Patient" [ 
     111                            style = "filled" 
     112                                    fillcolor = "white" 
     113                                        fontname = "Arial" 
     114                                        fontcolor = "black" 
     115                                        color = "black" 
     116                 
     117                        label = "{Patient|id : int\lname : string\lage : int\lalive : bool\lgender : xref(Gender.id)\lid_mutation1 : xref(Mutations.id)\lid_mutation2 : xref(Mutations.id)\l}" 
     118                ] 
     119                "Gender" [ 
     120                            style = "filled" 
     121                                    fillcolor = "white" 
     122                                        fontname = "Arial" 
     123                                        fontcolor = "black" 
     124                                        color = "black" 
     125                 
     126                        label = "{Gender|id : int\lname : string\l}" 
     127                ] 
     128                "Diagnosis" [ 
     129                            style = "filled" 
     130                                    fillcolor = "white" 
     131                                        fontname = "Arial" 
     132                                        fontcolor = "black" 
     133                                        color = "black" 
     134                 
     135                        label = "{Diagnosis|id : int\lvalue : text\lid_phenotype : xref(Phenotype.id)\lid_patient : xref(Patient.id)\l}" 
     136                ] 
     137                "Phenotype" [ 
     138                            style = "filled" 
     139                                    fillcolor = "white" 
     140                                        fontname = "Arial" 
     141                                        fontcolor = "black" 
     142                                        color = "black" 
     143                 
     144                        label = "{Phenotype|id : int\lDescription : text\lDate : date\l}" 
     145                ] 
     146                "E_M" [ 
     147                            style = "filled" 
     148                                    fillcolor = "white" 
     149                                        fontname = "Arial" 
     150                                        fontcolor = "black" 
     151                                        color = "black" 
     152                 
     153                        label = "{E_M|id : int\lpatient : xref(Patient.id)\lvalue : string\lAnchoring_fibers : string\lHemi_desmosomes : string\ldescription : text\l}" 
     154                ] 
     155                "I_F" [ 
     156                            style = "filled" 
     157                                    fillcolor = "white" 
     158                                        fontname = "Arial" 
     159                                        fontcolor = "black" 
     160                                        color = "black" 
     161                 
     162                        label = "{I_F|id : int\lpatient : xref(Patient.id)\ltest_LH72 : string\ltest_2Q633 : string\lkeratine_14 : string\lBP180_1D1 : string\lNiceine_GB3 : string\lCollagen : string\ldescription : text\l}" 
     163                ] 
     164                "Consequence" [ 
     165                            style = "filled" 
     166                                    fillcolor = "white" 
     167                                        fontname = "Arial" 
     168                                        fontcolor = "black" 
     169                                        color = "black" 
     170                 
     171                        label = "{Consequence|id : int\lconsequence : string\l}" 
     172                ] 
     173                "Pictures" [ 
     174                            style = "filled" 
     175                                    fillcolor = "white" 
     176                                        fontname = "Arial" 
     177                                        fontcolor = "black" 
     178                                        color = "black" 
     179                 
     180                        label = "{Pictures|id : int\lsmall : file\llarge : file\lid_patient : xref(Patient.id)\l}" 
     181                ] 
     182                "DataElement" [ 
    30183                            style = "filled" 
    31184                                    fillcolor = "white" 
     
    34187                                        color = "dimgrey" 
    35188                 
    36                         label = "{Interface:Identifiable|Id : int\lName : string\l}" 
    37                 ] 
    38                 "Experiment" [ 
    39                             style = "filled" 
    40                                     fillcolor = "white" 
    41                                         fontname = "Arial" 
    42                                         fontcolor = "black" 
    43                                         color = "black" 
    44                  
    45                         label = "{Experiment\n implements Identifiable|Description : text\lDate : date\l}" 
    46                 ] 
    47                 "Sample" [ 
    48                             style = "filled" 
    49                                     fillcolor = "white" 
    50                                         fontname = "Arial" 
    51                                         fontcolor = "black" 
    52                                         color = "black" 
    53                  
    54                         label = "{Sample\n implements Identifiable|Species : string\lTissue : string\lSex : enum\lExperiment : xref(Experiment.Id)\l}" 
    55                 ] 
    56                 "SpecialSample" [ 
    57                             style = "filled" 
    58                                     fillcolor = "white" 
    59                                         fontname = "Arial" 
    60                                         fontcolor = "black" 
    61                                         color = "black" 
    62                  
    63                         label = "{SpecialSample\n extends Sample|detail : string\l}" 
    64                 ] 
    65                 "Trait" [ 
    66                             style = "filled" 
    67                                     fillcolor = "white" 
    68                                         fontname = "Arial" 
    69                                         fontcolor = "black" 
    70                                         color = "black" 
    71                  
    72                         label = "{Trait\n implements Identifiable|Molcular : bool\lExperiment : xref(Experiment.Id)\l}" 
    73                 ] 
    74                 "Measurement" [ 
    75                             style = "filled" 
    76                                     fillcolor = "white" 
    77                                         fontname = "Arial" 
    78                                         fontcolor = "black" 
    79                                         color = "black" 
    80                  
    81                         label = "{Measurement\n implements Identifiable|Experiment : xref(Experiment.Id)\lDataFile : file\l}" 
     189                        label = "{Interface:DataElement|id : int\lData : xref(Data.id)\lCol : xref(DimensionElement.id)\lRow : xref(DimensionElement.id)\lRowIndex : int\lColIndex : int\l}" 
     190                ] 
     191                "DecimalDataElement" [ 
     192                            style = "filled" 
     193                                    fillcolor = "white" 
     194                                        fontname = "Arial" 
     195                                        fontcolor = "black" 
     196                                        color = "black" 
     197                 
     198                        label = "{DecimalDataElement\n implements DataElement|Value : decimal\l}" 
     199                ] 
     200                "TextDataElement" [ 
     201                            style = "filled" 
     202                                    fillcolor = "white" 
     203                                        fontname = "Arial" 
     204                                        fontcolor = "black" 
     205                                        color = "black" 
     206                 
     207                        label = "{TextDataElement\n implements DataElement|Value : text\l}" 
     208                ] 
     209                "Describable" [ 
     210                            style = "filled" 
     211                                    fillcolor = "white" 
     212                                        fontname = "Arial" 
     213                                        fontcolor = "black" 
     214                                        color = "black" 
     215                 
     216                        label = "{Describable|id : int\l}" 
     217                ] 
     218                "Identifiable" [ 
     219                            style = "filled" 
     220                                    fillcolor = "white" 
     221                                        fontname = "Arial" 
     222                                        fontcolor = "black" 
     223                                        color = "black" 
     224                 
     225                        label = "{Identifiable\n extends Describable|name : string\l}" 
     226                ] 
     227                "FugeData" [ 
     228                            style = "filled" 
     229                                    fillcolor = "white" 
     230                                        fontname = "Arial" 
     231                                        fontcolor = "black" 
     232                                        color = "black" 
     233                 
     234                        label = "{FugeData\n extends Identifiable|}" 
    82235                ] 
    83236                "Data" [ 
     
    88241                                        color = "black" 
    89242                 
    90                         label = "{Data|Id : int\lMeasurement : xref(Measurement.Id)\lSample : xref(Sample.Id)\lTrait : xref(Trait.Id)\lValue : string\l}" 
    91                 ] 
     243                        label = "{Data\n extends FugeData|RowType : enum\lColType : enum\lValueType : enum\lTotalRows : int\lTotalCols : int\l}" 
     244                ] 
     245                "FugeDimensionElement" [ 
     246                            style = "filled" 
     247                                    fillcolor = "white" 
     248                                        fontname = "Arial" 
     249                                        fontcolor = "black" 
     250                                        color = "black" 
     251                 
     252                        label = "{FugeDimensionElement\n extends Identifiable|}" 
     253                ] 
     254                "FugeInvestigation" [ 
     255                            style = "filled" 
     256                                    fillcolor = "white" 
     257                                        fontname = "Arial" 
     258                                        fontcolor = "black" 
     259                                        color = "black" 
     260                 
     261                        label = "{FugeInvestigation\n extends Identifiable|start : datetime\lend : datetime\l}" 
     262                ] 
     263                "Investigation" [ 
     264                            style = "filled" 
     265                                    fillcolor = "white" 
     266                                        fontname = "Arial" 
     267                                        fontcolor = "black" 
     268                                        color = "black" 
     269                 
     270                        label = "{Investigation\n extends FugeInvestigation|}" 
     271                ] 
     272                "DimensionElement" [ 
     273                            style = "filled" 
     274                                    fillcolor = "white" 
     275                                        fontname = "Arial" 
     276                                        fontcolor = "black" 
     277                                        color = "black" 
     278                 
     279                        label = "{DimensionElement\n extends FugeDimensionElement|Investigation : xref(Investigation.id)\l}" 
     280                ] 
     281/*entities inside modules*/ 
     282        subgraph cluster0 { 
     283                label = "Package original.col7a1database" 
     284                labelloc = bottom 
     285                fillcolor = "lightyellow" 
     286                rank = "min" 
     287                 
     288 
    92289                "Role" [ 
    93290                            style = "filled" 
     
    97294                                        color = "black" 
    98295                 
    99                         label = "{Role|id : int\lname : string\lsuperuser : bool\l}" 
     296                        label = "{Role|id : int*\lname : string*\lsuperuser : bool*\l}" 
    100297                ] 
    101298                "User" [ 
     
    106303                                        color = "black" 
    107304                 
    108                         label = "{User|id : int\lname : string\lpassword : string\lroles : mref(Role.id)\l}" 
     305                        label = "{User|id : int*\lname : string*\lpassword : string*\lroles : mref(Role)\l}" 
    109306                ] 
    110307                "Entity" [ 
     
    115312                                        color = "black" 
    116313                 
    117                         label = "{Entity|id : int\lclassName : string\l}" 
     314                        label = "{Entity|id : int*\lclassName : string*\l}" 
    118315                ] 
    119316                "RoleEntityPermission" [ 
     
    124321                                        color = "black" 
    125322                 
    126                         label = "{RoleEntityPermission|id : int\lrole : xref(Role.id)\lentity : xref(Entity.id)\lpermission : enum\l}" 
    127                 ] 
    128 /*entities inside modules*/ 
     323                        label = "{RoleEntityPermission|id : int*\lrole : xref(Role)*\lentity : xref(Entity)*\lpermission : enum*\l}" 
     324                ] 
     325                "Statistics" [ 
     326                            style = "filled" 
     327                                    fillcolor = "white" 
     328                                        fontname = "Arial" 
     329                                        fontcolor = "black" 
     330                                        color = "black" 
     331                 
     332                        label = "{Statistics|id : int*\lmutation : xref(Mutations)*\lvalue : int\ldate : date*\l}" 
     333                ] 
     334                "RNA" [ 
     335                            style = "filled" 
     336                                    fillcolor = "white" 
     337                                        fontname = "Arial" 
     338                                        fontcolor = "black" 
     339                                        color = "black" 
     340                 
     341                        label = "{RNA|id : int*\lnucleotides : string*\lexon : int*\lCodon : xref(Amino_acid)*\l}" 
     342                ] 
     343                "Amino_acid" [ 
     344                            style = "filled" 
     345                                    fillcolor = "white" 
     346                                        fontname = "Arial" 
     347                                        fontcolor = "black" 
     348                                        color = "black" 
     349                 
     350                        label = "{Amino_acid|id : int*\lcodon : string*\lamino_acid : string*\l}" 
     351                ] 
     352                "Mutations" [ 
     353                            style = "filled" 
     354                                    fillcolor = "white" 
     355                                        fontname = "Arial" 
     356                                        fontcolor = "black" 
     357                                        color = "black" 
     358                 
     359                        label = "{Mutations|id : int*\lnucleotide_change : string*\lamino_acid : string*\lconsequence : xref(Consequence)\l}" 
     360                ] 
     361                "Contact" [ 
     362                            style = "filled" 
     363                                    fillcolor = "white" 
     364                                        fontname = "Arial" 
     365                                        fontcolor = "black" 
     366                                        color = "black" 
     367                 
     368                        label = "{Contact|id : int*\lname : string*\laddress : string\ltel : string\l}" 
     369                ] 
     370                "Patient" [ 
     371                            style = "filled" 
     372                                    fillcolor = "white" 
     373                                        fontname = "Arial" 
     374                                        fontcolor = "black" 
     375                                        color = "black" 
     376                 
     377                        label = "{Patient|id : int*\lname : string*\lage : int\lalive : bool*\lgender : xref(Gender)*\lid_mutation1 : xref(Mutations)\lid_mutation2 : xref(Mutations)\l}" 
     378                ] 
     379                "Gender" [ 
     380                            style = "filled" 
     381                                    fillcolor = "white" 
     382                                        fontname = "Arial" 
     383                                        fontcolor = "black" 
     384                                        color = "black" 
     385                 
     386                        label = "{Gender|id : int*\lname : string*\l}" 
     387                ] 
     388                "Diagnosis" [ 
     389                            style = "filled" 
     390                                    fillcolor = "white" 
     391                                        fontname = "Arial" 
     392                                        fontcolor = "black" 
     393                                        color = "black" 
     394                 
     395                        label = "{Diagnosis|id : int*\lvalue : text*\lid_phenotype : xref(Phenotype)*\lid_patient : xref(Patient)*\l}" 
     396                ] 
     397                "Phenotype" [ 
     398                            style = "filled" 
     399                                    fillcolor = "white" 
     400                                        fontname = "Arial" 
     401                                        fontcolor = "black" 
     402                                        color = "black" 
     403                 
     404                        label = "{Phenotype|id : int*\lDescription : text*\lDate : date\l}" 
     405                ] 
     406                "E_M" [ 
     407                            style = "filled" 
     408                                    fillcolor = "white" 
     409                                        fontname = "Arial" 
     410                                        fontcolor = "black" 
     411                                        color = "black" 
     412                 
     413                        label = "{E_M|id : int*\lpatient : xref(Patient)*\lvalue : string*\lAnchoring_fibers : string\lHemi_desmosomes : string\ldescription : text*\l}" 
     414                ] 
     415                "I_F" [ 
     416                            style = "filled" 
     417                                    fillcolor = "white" 
     418                                        fontname = "Arial" 
     419                                        fontcolor = "black" 
     420                                        color = "black" 
     421                 
     422                        label = "{I_F|id : int*\lpatient : xref(Patient)\ltest_LH72 : string\ltest_2Q633 : string\lkeratine_14 : string\lBP180_1D1 : string\lNiceine_GB3 : string\lCollagen : string\ldescription : text*\l}" 
     423                ] 
     424                "Consequence" [ 
     425                            style = "filled" 
     426                                    fillcolor = "white" 
     427                                        fontname = "Arial" 
     428                                        fontcolor = "black" 
     429                                        color = "black" 
     430                 
     431                        label = "{Consequence|id : int*\lconsequence : string*\l}" 
     432                ] 
     433                "Pictures" [ 
     434                            style = "filled" 
     435                                    fillcolor = "white" 
     436                                        fontname = "Arial" 
     437                                        fontcolor = "black" 
     438                                        color = "black" 
     439                 
     440                        label = "{Pictures|id : int*\lsmall : file*\llarge : file*\lid_patient : xref(Patient)*\l}" 
     441                ] 
     442        } 
     443        subgraph cluster1 { 
     444                label = "Package fuge.xgap.components" 
     445                labelloc = bottom 
     446                fillcolor = "lightyellow" 
     447                rank = "min" 
     448                 
     449 
     450                "DataElement" [ 
     451                            style = "filled" 
     452                                    fillcolor = "white" 
     453                                        fontname = "Arial-Italic" 
     454                                        fontcolor = "dimgrey" 
     455                                        color = "dimgrey" 
     456                 
     457                        label = "{Interface:DataElement|id : int*\lData : xref(Data)*\lCol : xref(DimensionElement)*\lRow : xref(DimensionElement)*\lRowIndex : int*\lColIndex : int*\l}" 
     458                ] 
     459                "DecimalDataElement" [ 
     460                            style = "filled" 
     461                                    fillcolor = "white" 
     462                                        fontname = "Arial" 
     463                                        fontcolor = "black" 
     464                                        color = "black" 
     465                 
     466                        label = "{DecimalDataElement\n implements DataElement|Value : decimal\l}" 
     467                ] 
     468                "TextDataElement" [ 
     469                            style = "filled" 
     470                                    fillcolor = "white" 
     471                                        fontname = "Arial" 
     472                                        fontcolor = "black" 
     473                                        color = "black" 
     474                 
     475                        label = "{TextDataElement\n implements DataElement|Value : text\l}" 
     476                ] 
     477                "Describable" [ 
     478                            style = "filled" 
     479                                    fillcolor = "white" 
     480                                        fontname = "Arial" 
     481                                        fontcolor = "black" 
     482                                        color = "black" 
     483                 
     484                        label = "{Describable|id : int*\l}" 
     485                ] 
     486                "Identifiable" [ 
     487                            style = "filled" 
     488                                    fillcolor = "white" 
     489                                        fontname = "Arial" 
     490                                        fontcolor = "black" 
     491                                        color = "black" 
     492                 
     493                        label = "{Identifiable\n extends Describable|name : string*\l}" 
     494                ] 
     495                "FugeData" [ 
     496                            style = "filled" 
     497                                    fillcolor = "white" 
     498                                        fontname = "Arial" 
     499                                        fontcolor = "black" 
     500                                        color = "black" 
     501                 
     502                        label = "{FugeData\n extends Identifiable|}" 
     503                ] 
     504                "Data" [ 
     505                            style = "filled" 
     506                                    fillcolor = "white" 
     507                                        fontname = "Arial" 
     508                                        fontcolor = "black" 
     509                                        color = "black" 
     510                 
     511                        label = "{Data\n extends FugeData|RowType : enum*\lColType : enum*\lValueType : enum*\lTotalRows : int*\lTotalCols : int*\l}" 
     512                ] 
     513                "FugeDimensionElement" [ 
     514                            style = "filled" 
     515                                    fillcolor = "white" 
     516                                        fontname = "Arial" 
     517                                        fontcolor = "black" 
     518                                        color = "black" 
     519                 
     520                        label = "{FugeDimensionElement\n extends Identifiable|}" 
     521                ] 
     522                "FugeInvestigation" [ 
     523                            style = "filled" 
     524                                    fillcolor = "white" 
     525                                        fontname = "Arial" 
     526                                        fontcolor = "black" 
     527                                        color = "black" 
     528                 
     529                        label = "{FugeInvestigation\n extends Identifiable|start : datetime\lend : datetime\l}" 
     530                ] 
     531                "Investigation" [ 
     532                            style = "filled" 
     533                                    fillcolor = "white" 
     534                                        fontname = "Arial" 
     535                                        fontcolor = "black" 
     536                                        color = "black" 
     537                 
     538                        label = "{Investigation\n extends FugeInvestigation|}" 
     539                ] 
     540                "DimensionElement" [ 
     541                            style = "filled" 
     542                                    fillcolor = "white" 
     543                                        fontname = "Arial" 
     544                                        fontcolor = "black" 
     545                                        color = "black" 
     546                 
     547                        label = "{DimensionElement\n extends FugeDimensionElement|Investigation : xref(Investigation)*\l}" 
     548                ] 
     549        } 
    129550 
    130551/*interface relationships*/ 
     
    138559                color = "black" 
    139560        ] 
    140         "SpecialSample" -> "Sample" 
     561        "Identifiable" -> "Describable" 
     562        "FugeData" -> "Identifiable" 
     563        "Data" -> "FugeData" 
     564        "FugeDimensionElement" -> "Identifiable" 
     565        "FugeInvestigation" -> "Identifiable" 
     566        "Investigation" -> "FugeInvestigation" 
     567        "DimensionElement" -> "FugeDimensionElement" 
    141568 
    142569/*one to many 'xref' foreign key relationships*/ 
     
    145572                arrowsize = 0.6 
    146573        ] 
    147                 "Sample" -> "Experiment" [ 
    148                         headlabel = "1" 
    149                         taillabel = "*" 
    150                 ] 
    151                 "Trait" -> "Experiment" [ 
    152                         headlabel = "1" 
    153                         taillabel = "*" 
    154                 ] 
    155                 "Measurement" -> "Experiment" [ 
    156                         headlabel = "1" 
    157                         taillabel = "*" 
    158                 ] 
    159                 "Data" -> "Measurement" [ 
    160                         headlabel = "1" 
    161                         taillabel = "*" 
    162                 ] 
    163                 "Data" -> "Sample" [ 
    164                         headlabel = "1" 
    165                         taillabel = "*" 
    166                 ] 
    167                 "Data" -> "Trait" [ 
    168                         headlabel = "1" 
    169                         taillabel = "*" 
    170                 ] 
    171574                "RoleEntityPermission" -> "Role" [ 
    172575                        headlabel = "1" 
     
    174577                ] 
    175578                "RoleEntityPermission" -> "Entity" [ 
     579                        headlabel = "1" 
     580                        taillabel = "*" 
     581                ] 
     582                "Statistics" -> "Mutations" [ 
     583                        headlabel = "1" 
     584                        taillabel = "*" 
     585                ] 
     586                "RNA" -> "Amino_acid" [ 
     587                        headlabel = "1" 
     588                        taillabel = "*" 
     589                ] 
     590                "Mutations" -> "Consequence" [ 
     591                        headlabel = "0..1" 
     592                        taillabel = "*" 
     593                ] 
     594                "Patient" -> "Gender" [ 
     595                        headlabel = "1" 
     596                        taillabel = "*" 
     597                ] 
     598                "Patient" -> "Mutations" [ 
     599                        headlabel = "0..1" 
     600                        taillabel = "*" 
     601                ] 
     602                "Patient" -> "Mutations" [ 
     603                        headlabel = "0..1" 
     604                        taillabel = "*" 
     605                ] 
     606                "Diagnosis" -> "Phenotype" [ 
     607                        headlabel = "1" 
     608                        taillabel = "*" 
     609                ] 
     610                "Diagnosis" -> "Patient" [ 
     611                        headlabel = "1" 
     612                        taillabel = "*" 
     613                ] 
     614                "E_M" -> "Patient" [ 
     615                        headlabel = "1" 
     616                        taillabel = "*" 
     617                ] 
     618                "I_F" -> "Patient" [ 
     619                        headlabel = "0..1" 
     620                        taillabel = "*" 
     621                ] 
     622                "Pictures" -> "Patient" [ 
     623                        headlabel = "1" 
     624                        taillabel = "*" 
     625                ] 
     626                "DataElement" -> "Data" [ 
     627                        headlabel = "1" 
     628                        taillabel = "*" 
     629                ] 
     630                "DataElement" -> "DimensionElement" [ 
     631                        headlabel = "1" 
     632                        taillabel = "*" 
     633                ] 
     634                "DataElement" -> "DimensionElement" [ 
     635                        headlabel = "1" 
     636                        taillabel = "*" 
     637                ] 
     638                "DimensionElement" -> "Investigation" [ 
    176639                        headlabel = "1" 
    177640                        taillabel = "*" 
  • molgenis4eb/WebContent/doc/entity-uml-minimal-diagram.dot

    r2015 r2022  
    2222 
    2323/* entities outside modules*/ 
    24                 "Identifiable" [ 
     24                "Role" [ 
     25                            style = "filled" 
     26                                    fillcolor = "white" 
     27                                        fontname = "Arial" 
     28                                        fontcolor = "black" 
     29                                        color = "black" 
     30                 
     31                        label = "{Role}" 
     32                ] 
     33                "User" [ 
     34                            style = "filled" 
     35                                    fillcolor = "white" 
     36                                        fontname = "Arial" 
     37                                        fontcolor = "black" 
     38                                        color = "black" 
     39                 
     40                        label = "{User}" 
     41                ] 
     42                "Entity" [ 
     43                            style = "filled" 
     44                                    fillcolor = "white" 
     45                                        fontname = "Arial" 
     46                                        fontcolor = "black" 
     47                                        color = "black" 
     48                 
     49                        label = "{Entity}" 
     50                ] 
     51                "RoleEntityPermission" [ 
     52                            style = "filled" 
     53                                    fillcolor = "white" 
     54                                        fontname = "Arial" 
     55                                        fontcolor = "black" 
     56                                        color = "black" 
     57                 
     58                        label = "{RoleEntityPermission}" 
     59                ] 
     60                "Statistics" [ 
     61                            style = "filled" 
     62                                    fillcolor = "white" 
     63                                        fontname = "Arial" 
     64                                        fontcolor = "black" 
     65                                        color = "black" 
     66                 
     67                        label = "{Statistics}" 
     68                ] 
     69                "RNA" [ 
     70                            style = "filled" 
     71                                    fillcolor = "white" 
     72                                        fontname = "Arial" 
     73                                        fontcolor = "black" 
     74                                        color = "black" 
     75                 
     76                        label = "{RNA}" 
     77                ] 
     78                "Amino_acid" [ 
     79                            style = "filled" 
     80                                    fillcolor = "white" 
     81                                        fontname = "Arial" 
     82                                        fontcolor = "black" 
     83                                        color = "black" 
     84                 
     85                        label = "{Amino_acid}" 
     86                ] 
     87                "Mutations" [ 
     88                            style = "filled" 
     89                                    fillcolor = "white" 
     90                                        fontname = "Arial" 
     91                                        fontcolor = "black" 
     92                                        color = "black" 
     93                 
     94                        label = "{Mutations}" 
     95                ] 
     96                "Contact" [ 
     97                            style = "filled" 
     98                                    fillcolor = "white" 
     99                                        fontname = "Arial" 
     100                                        fontcolor = "black" 
     101                                        color = "black" 
     102                 
     103                        label = "{Contact}" 
     104                ] 
     105                "Patient" [ 
     106                            style = "filled" 
     107                                    fillcolor = "white" 
     108                                        fontname = "Arial" 
     109                                        fontcolor = "black" 
     110                                        color = "black" 
     111                 
     112                        label = "{Patient}" 
     113                ] 
     114                "Gender" [ 
     115                            style = "filled" 
     116                                    fillcolor = "white" 
     117                                        fontname = "Arial" 
     118                                        fontcolor = "black" 
     119                                        color = "black" 
     120                 
     121                        label = "{Gender}" 
     122                ] 
     123                "Diagnosis" [ 
     124                            style = "filled" 
     125                                    fillcolor = "white" 
     126                                        fontname = "Arial" 
     127                                        fontcolor = "black" 
     128                                        color = "black" 
     129                 
     130                        label = "{Diagnosis}" 
     131                ] 
     132                "Phenotype" [ 
     133                            style = "filled" 
     134                                    fillcolor = "white" 
     135                                        fontname = "Arial" 
     136                                        fontcolor = "black" 
     137                                        color = "black" 
     138                 
     139                        label = "{Phenotype}" 
     140                ] 
     141                "E_M" [ 
     142                            style = "filled" 
     143                                    fillcolor = "white" 
     144                                        fontname = "Arial" 
     145                                        fontcolor = "black" 
     146                                        color = "black" 
     147                 
     148                        label = "{E_M}" 
     149                ] 
     150                "I_F" [ 
     151                            style = "filled" 
     152                                    fillcolor = "white" 
     153                                        fontname = "Arial" 
     154                                        fontcolor = "black" 
     155                                        color = "black" 
     156                 
     157                        label = "{I_F}" 
     158                ] 
     159                "Consequence" [ 
     160                            style = "filled" 
     161                                    fillcolor = "white" 
     162                                        fontname = "Arial" 
     163                                        fontcolor = "black" 
     164                                        color = "black" 
     165                 
     166                        label = "{Consequence}" 
     167                ] 
     168                "Pictures" [ 
     169                            style = "filled" 
     170                                    fillcolor = "white" 
     171                                        fontname = "Arial" 
     172                                        fontcolor = "black" 
     173                                        color = "black" 
     174                 
     175                        label = "{Pictures}" 
     176                ] 
     177                "DataElement" [ 
    25178                            style = "filled" 
    26179                                    fillcolor = "white" 
     
    29182                                        color = "dimgrey" 
    30183                 
    31                         label = "{Interface:Identifiable}" 
    32                 ] 
    33                 "Experiment" [ 
    34                             style = "filled" 
    35                                     fillcolor = "white" 
    36                                         fontname = "Arial" 
    37                                         fontcolor = "black" 
    38                                         color = "black" 
    39                  
    40                         label = "{Experiment\n implements Identifiable}" 
    41                 ] 
    42                 "Sample" [ 
    43                             style = "filled" 
    44                                     fillcolor = "white" 
    45                                         fontname = "Arial" 
    46                                         fontcolor = "black" 
    47                                         color = "black" 
    48                  
    49                         label = "{Sample\n implements Identifiable}" 
    50                 ] 
    51                 "SpecialSample" [ 
    52                             style = "filled" 
    53                                     fillcolor = "white" 
    54                                         fontname = "Arial" 
    55                                         fontcolor = "black" 
    56                                         color = "black" 
    57                  
    58                         label = "{SpecialSample\n extends Sample}" 
    59                 ] 
    60                 "Trait" [ 
    61                             style = "filled" 
    62                                     fillcolor = "white" 
    63                                         fontname = "Arial" 
    64                                         fontcolor = "black" 
    65                                         color = "black" 
    66                  
    67                         label = "{Trait\n implements Identifiable}" 
    68                 ] 
    69                 "Measurement" [ 
    70                             style = "filled" 
    71                                     fillcolor = "white" 
    72                                         fontname = "Arial" 
    73                                         fontcolor = "black" 
    74                                         color = "black" 
    75                  
    76                         label = "{Measurement\n implements Identifiable}" 
     184                        label = "{Interface:DataElement}" 
     185                ] 
     186                "DecimalDataElement" [ 
     187                            style = "filled" 
     188                                    fillcolor = "white" 
     189                                        fontname = "Arial" 
     190                                        fontcolor = "black" 
     191                                        color = "black" 
     192                 
     193                        label = "{DecimalDataElement\n implements DataElement}" 
     194                ] 
     195                "TextDataElement" [ 
     196                            style = "filled" 
     197                                    fillcolor = "white" 
     198                                        fontname = "Arial" 
     199                                        fontcolor = "black" 
     200                                        color = "black" 
     201                 
     202                        label = "{TextDataElement\n implements DataElement}" 
     203                ] 
     204                "Describable" [ 
     205                            style = "filled" 
     206                                    fillcolor = "white" 
     207                                        fontname = "Arial" 
     208                                        fontcolor = "black" 
     209                                        color = "black" 
     210                 
     211                        label = "{Describable}" 
     212                ] 
     213                "Identifiable" [ 
     214                            style = "filled" 
     215                                    fillcolor = "white" 
     216                                        fontname = "Arial" 
     217                                        fontcolor = "black" 
     218                                        color = "black" 
     219                 
     220                        label = "{Identifiable\n extends Describable}" 
     221                ] 
     222                "FugeData" [ 
     223                            style = "filled" 
     224                                    fillcolor = "white" 
     225                                        fontname = "Arial" 
     226                                        fontcolor = "black" 
     227                                        color = "black" 
     228                 
     229                        label = "{FugeData\n extends Identifiable}" 
    77230                ] 
    78231                "Data" [ 
     
    83236                                        color = "black" 
    84237                 
    85                         label = "{Data}" 
    86                 ] 
     238                        label = "{Data\n extends FugeData}" 
     239                ] 
     240                "FugeDimensionElement" [ 
     241                            style = "filled" 
     242                                    fillcolor = "white" 
     243                                        fontname = "Arial" 
     244                                        fontcolor = "black" 
     245                                        color = "black" 
     246                 
     247                        label = "{FugeDimensionElement\n extends Identifiable}" 
     248                ] 
     249                "FugeInvestigation" [ 
     250                            style = "filled" 
     251                                    fillcolor = "white" 
     252                                        fontname = "Arial" 
     253                                        fontcolor = "black" 
     254                                        color = "black" 
     255                 
     256                        label = "{FugeInvestigation\n extends Identifiable}" 
     257                ] 
     258                "Investigation" [ 
     259                            style = "filled" 
     260                                    fillcolor = "white" 
     261                                        fontname = "Arial" 
     262                                        fontcolor = "black" 
     263                                        color = "black" 
     264                 
     265                        label = "{Investigation\n extends FugeInvestigation}" 
     266                ] 
     267                "DimensionElement" [ 
     268                            style = "filled" 
     269                                    fillcolor = "white" 
     270                                        fontname = "Arial" 
     271                                        fontcolor = "black" 
     272                                        color = "black" 
     273                 
     274                        label = "{DimensionElement\n extends FugeDimensionElement}" 
     275                ] 
     276/*entities inside modules*/ 
     277        subgraph cluster0 { 
     278                label = "Package original.col7a1database" 
     279                labelloc = bottom 
     280                fillcolor = "lightyellow" 
     281                nodesep = "1.0" 
     282 
    87283                "Role" [ 
    88284                            style = "filled" 
     
    92288                                        color = "black" 
    93289                 
    94                         label = "{Role}" 
     290                        label = "Role" 
    95291                ] 
    96292                "User" [ 
     
    101297                                        color = "black" 
    102298                 
    103                         label = "{User}" 
     299                        label = "User" 
    104300                ] 
    105301                "Entity" [ 
     
    110306                                        color = "black" 
    111307                 
    112                         label = "{Entity}" 
     308                        label = "Entity" 
    113309                ] 
    114310                "RoleEntityPermission" [ 
     
    119315                                        color = "black" 
    120316                 
    121                         label = "{RoleEntityPermission}" 
    122                 ] 
    123 /*entities inside modules*/ 
     317                        label = "RoleEntityPermission" 
     318                ] 
     319                "Statistics" [ 
     320                            style = "filled" 
     321                                    fillcolor = "white" 
     322                                        fontname = "Arial" 
     323                                        fontcolor = "black" 
     324                                        color = "black" 
     325                 
     326                        label = "Statistics" 
     327                ] 
     328                "RNA" [ 
     329                            style = "filled" 
     330                                    fillcolor = "white" 
     331                                        fontname = "Arial" 
     332                                        fontcolor = "black" 
     333                                        color = "black" 
     334                 
     335                        label = "RNA" 
     336                ] 
     337                "Amino_acid" [ 
     338                            style = "filled" 
     339                                    fillcolor = "white" 
     340                                        fontname = "Arial" 
     341                                        fontcolor = "black" 
     342                                        color = "black" 
     343                 
     344                        label = "Amino_acid" 
     345                ] 
     346                "Mutations" [ 
     347                            style = "filled" 
     348                                    fillcolor = "white" 
     349                                        fontname = "Arial" 
     350                                        fontcolor = "black" 
     351                                        color = "black" 
     352                 
     353                        label = "Mutations" 
     354                ] 
     355                "Contact" [ 
     356                            style = "filled" 
     357                                    fillcolor = "white" 
     358                                        fontname = "Arial" 
     359                                        fontcolor = "black" 
     360                                        color = "black" 
     361                 
     362                        label = "Contact" 
     363                ] 
     364                "Patient" [ 
     365                            style = "filled" 
     366                                    fillcolor = "white" 
     367                                        fontname = "Arial" 
     368                                        fontcolor = "black" 
     369                                        color = "black" 
     370                 
     371                        label = "Patient" 
     372                ] 
     373                "Gender" [ 
     374                            style = "filled" 
     375                                    fillcolor = "white" 
     376                                        fontname = "Arial" 
     377                                        fontcolor = "black" 
     378                                        color = "black" 
     379                 
     380                        label = "Gender" 
     381                ] 
     382                "Diagnosis" [ 
     383                            style = "filled" 
     384                                    fillcolor = "white" 
     385                                        fontname = "Arial" 
     386                                        fontcolor = "black" 
     387                                        color = "black" 
     388                 
     389                        label = "Diagnosis" 
     390                ] 
     391                "Phenotype" [ 
     392                            style = "filled" 
     393                                    fillcolor = "white" 
     394                                        fontname = "Arial" 
     395                                        fontcolor = "black" 
     396                                        color = "black" 
     397                 
     398                        label = "Phenotype" 
     399                ] 
     400                "E_M" [ 
     401                            style = "filled" 
     402                                    fillcolor = "white" 
     403                                        fontname = "Arial" 
     404                                        fontcolor = "black" 
     405                                        color = "black" 
     406                 
     407                        label = "E_M" 
     408                ] 
     409                "I_F" [ 
     410                            style = "filled" 
     411                                    fillcolor = "white" 
     412                                        fontname = "Arial" 
     413                                        fontcolor = "black" 
     414                                        color = "black" 
     415                 
     416                        label = "I_F" 
     417                ] 
     418                "Consequence" [ 
     419                            style = "filled" 
     420                                    fillcolor = "white" 
     421                                        fontname = "Arial" 
     422                                        fontcolor = "black" 
     423                                        color = "black" 
     424                 
     425                        label = "Consequence" 
     426                ] 
     427                "Pictures" [ 
     428                            style = "filled" 
     429                                    fillcolor = "white" 
     430                                        fontname = "Arial" 
     431                                        fontcolor = "black" 
     432                                        color = "black" 
     433                 
     434                        label = "Pictures" 
     435                ] 
     436        } 
     437        subgraph cluster1 { 
     438                label = "Package fuge.xgap.components" 
     439                labelloc = bottom 
     440                fillcolor = "lightyellow" 
     441                nodesep = "1.0" 
     442 
     443                "DataElement" [ 
     444                            style = "filled" 
     445                                    fillcolor = "white" 
     446                                        fontname = "Arial-Italic" 
     447                                        fontcolor = "dimgrey" 
     448                                        color = "dimgrey" 
     449                 
     450                        label = "DataElement" 
     451                ] 
     452                "DecimalDataElement" [ 
     453                            style = "filled" 
     454                                    fillcolor = "white" 
     455                                        fontname = "Arial" 
     456                                        fontcolor = "black" 
     457                                        color = "black" 
     458                 
     459                        label = "DecimalDataElement" 
     460                ] 
     461                "TextDataElement" [ 
     462                            style = "filled" 
     463                                    fillcolor = "white" 
     464                                        fontname = "Arial" 
     465                                        fontcolor = "black" 
     466                                        color = "black" 
     467                 
     468                        label = "TextDataElement" 
     469                ] 
     470                "Describable" [ 
     471                            style = "filled" 
     472                                    fillcolor = "white" 
     473                                        fontname = "Arial" 
     474                                        fontcolor = "black" 
     475                                        color = "black" 
     476                 
     477                        label = "Describable" 
     478                ] 
     479                "Identifiable" [ 
     480                            style = "filled" 
     481                                    fillcolor = "white" 
     482                                        fontname = "Arial" 
     483                                        fontcolor = "black" 
     484                                        color = "black" 
     485                 
     486                        label = "Identifiable" 
     487                ] 
     488                "FugeData" [ 
     489                            style = "filled" 
     490                                    fillcolor = "white" 
     491                                        fontname = "Arial" 
     492                                        fontcolor = "black" 
     493                                        color = "black" 
     494                 
     495                        label = "FugeData" 
     496                ] 
     497                "Data" [ 
     498                            style = "filled" 
     499                                    fillcolor = "white" 
     500                                        fontname = "Arial" 
     501                                        fontcolor = "black" 
     502                                        color = "black" 
     503                 
     504                        label = "Data" 
     505                ] 
     506                "FugeDimensionElement" [ 
     507                            style = "filled" 
     508                                    fillcolor = "white" 
     509                                        fontname = "Arial" 
     510                                        fontcolor = "black" 
     511                                        color = "black" 
     512                 
     513                        label = "FugeDimensionElement" 
     514                ] 
     515                "FugeInvestigation" [ 
     516                            style = "filled" 
     517                                    fillcolor = "white" 
     518                                        fontname = "Arial" 
     519                                        fontcolor = "black" 
     520                                        color = "black" 
     521                 
     522                        label = "FugeInvestigation" 
     523                ] 
     524                "Investigation" [ 
     525                            style = "filled" 
     526                                    fillcolor = "white" 
     527                                        fontname = "Arial" 
     528                                        fontcolor = "black" 
     529                                        color = "black" 
     530                 
     531                        label = "Investigation" 
     532                ] 
     533                "DimensionElement" [ 
     534                            style = "filled" 
     535                                    fillcolor = "white" 
     536                                        fontname = "Arial" 
     537                                        fontcolor = "black" 
     538                                        color = "black" 
     539                 
     540                        label = "DimensionElement" 
     541                ] 
     542        } 
    124543 
    125544/*interface relationships*/ 
     
    127546                color = "#808080" 
    128547        ] 
    129         "Experiment" -> "Identifiable" 
    130         "Sample" -> "Identifiable" 
    131         "Trait" -> "Identifiable" 
    132         "Measurement" -> "Identifiable" 
     548        "DecimalDataElement" -> "DataElement" 
     549        "TextDataElement" -> "DataElement" 
    133550 
    134551/*inheritance relationships*/ 
     
    137554                color = "black" 
    138555        ] 
    139         "SpecialSample" -> "Sample" 
     556        "Identifiable" -> "Describable" 
     557        "FugeData" -> "Identifiable" 
     558        "Data" -> "FugeData" 
     559        "FugeDimensionElement" -> "Identifiable" 
     560        "FugeInvestigation" -> "Identifiable" 
     561        "Investigation" -> "FugeInvestigation" 
     562        "DimensionElement" -> "FugeDimensionElement" 
    140563 
    141564/*one to many 'xref' foreign key relationships*/ 
     
    144567                taillabel = "*" 
    145568        ] 
    146                 "Sample" -> "Experiment" 
    147                 "Trait" -> "Experiment" 
    148                 "Measurement" -> "Experiment" 
    149                 "Data" -> "Measurement" 
    150                 "Data" -> "Sample" 
    151                 "Data" -> "Trait" 
    152569                "RoleEntityPermission" -> "Role" 
    153570                "RoleEntityPermission" -> "Entity" 
     571                "Statistics" -> "Mutations" 
     572                "RNA" -> "Amino_acid" 
     573                "Mutations" -> "Consequence" 
     574                "Patient" -> "Gender" 
     575                "Patient" -> "Mutations" 
     576                "Patient" -> "Mutations" 
     577                "Diagnosis" -> "Phenotype" 
     578                "Diagnosis" -> "Patient" 
     579                "E_M" -> "Patient" 
     580                "I_F" -> "Patient" 
     581                "Pictures" -> "Patient" 
     582                "DataElement" -> "Data" 
     583                "DataElement" -> "DimensionElement" 
     584                "DataElement" -> "DimensionElement" 
     585                "DimensionElement" -> "Investigation" 
    154586         
    155587         
  • molgenis4eb/WebContent/doc/objectmodel.html

    r2015 r2022  
    22 
    33<head> 
    4         <title>My First MOLGENIS Documentation</title> 
     4        <title>Col7A1 Database Documentation</title> 
    55         
    66        <meta name="keywords"                   content=""> 
     
    5555 
    5656<body> 
    57 <h1><a name="_top_of_page">My First MOLGENIS</a> documentation.</h1> 
    58 This is an minimal example database to show how 
    59                 MOLGENIS works. The purpose of this example database is to 
    60                 administrate experiment, samples, traits and measurements. The 
    61                 name='example' will result in a Java package 'example' being 
    62                 generated. 
     57<h1><a name="_top_of_page">Col7A1 Database</a> documentation.</h1> 
    6358 
    6459<h2>Table of contents</h2> 
    6560<table><tr> 
     61<td> 
     62<b><a href="#original.col7a1database_package">original.col7a1database</a></b> package: 
     63<ul> 
     64<li><a href="#Role">Role</a></li> 
     65<li><a href="#User">User</a></li> 
     66<li><a href="#Entity">Entity</a></li> 
     67<li><a href="#RoleEntityPermission">RoleEntityPermission</a></li> 
     68<li><a href="#Statistics">Statistics</a></li> 
     69<li><a href="#RNA">RNA</a></li> 
     70<li><a href="#Amino_acid">Amino_acid</a></li> 
     71<li><a href="#Mutations">Mutations</a></li> 
     72<li><a href="#Contact">Contact</a></li> 
     73<li><a href="#Patient">Patient</a></li> 
     74<li><a href="#Gender">Gender</a></li> 
     75<li><a href="#Diagnosis">Diagnosis</a></li> 
     76<li><a href="#Phenotype">Phenotype</a></li> 
     77<li><a href="#E_M">E_M</a></li> 
     78<li><a href="#I_F">I_F</a></li> 
     79<li><a href="#Consequence">Consequence</a></li> 
     80<li><a href="#Pictures">Pictures</a></li> 
     81</ul> 
     82</td> 
     83<td> 
     84<b><a href="#fuge.xgap.components_package">fuge.xgap.components</a></b> package: 
     85<ul> 
     86<li><a href="#DataElement">DataElement</a></li> 
     87<li><a href="#DecimalDataElement">DecimalDataElement</a></li> 
     88<li><a href="#TextDataElement">TextDataElement</a></li> 
     89<li><a href="#Describable">Describable</a></li> 
     90<li><a href="#Identifiable">Identifiable</a></li> 
     91<li><a href="#FugeData">FugeData</a></li> 
     92<li><a href="#Data">Data</a></li> 
     93<li><a href="#FugeDimensionElement">FugeDimensionElement</a></li> 
     94<li><a href="#FugeInvestigation">FugeInvestigation</a></li> 
     95<li><a href="#Investigation">Investigation</a></li> 
     96<li><a href="#DimensionElement">DimensionElement</a></li> 
     97</ul> 
     98</td> 
    6699</tr></table> 
    67100<br/> 
     
    69102 
    70103 
    71  
    72 <h1>Entities:</h1> 
    73 <a href="#Identifiable">Identifiable</a><br/> 
    74 <a href="#Experiment">Experiment</a><br/> 
    75 <a href="#Sample">Sample</a><br/> 
    76 <a href="#SpecialSample">SpecialSample</a><br/> 
    77 <a href="#Trait">Trait</a><br/> 
    78 <a href="#Measurement">Measurement</a><br/> 
    79 <a href="#Data">Data</a><br/> 
    80 <a href="#Role">Role</a><br/> 
    81 <a href="#User">User</a><br/> 
    82 <a href="#Entity">Entity</a><br/> 
    83 <a href="#RoleEntityPermission">RoleEntityPermission</a><br/> 
    84 <h3><a name="Identifiable">Identifiable</a> (interface).  
    85 </h3> 
    86 <p>For modeling purposes only (denoted by 
    87                         abstract='true', this entity defines fields id and name centrally. 
    88                  
     104<h1><a name="original.col7a1database_package">original.col7a1database package</a></h1> 
     105<p>This is an minimal example database to show how 
     106                        MOLGENIS works. The purpose of this example database is to administrate 
     107                        experiment, samples, traits and measurements. The name='example' will result 
     108                        in a Java package 'example' being generated. 
    89109</p> 
    90 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    91         <!-- table header --> 
    92         <tr><th class="tablehead" colspan="7">Identifiable 
    93 </th></tr>       
    94         <!-- column headers --> 
    95         <tr> 
    96                 <th>field</th> 
    97                 <th>type</th> 
    98                 <th>description</th> 
    99                 <th>constraints</th> 
    100         </tr> 
    101          
    102         <!-- all the fields --> 
    103         <tr  > 
    104                 <td style="color:#333333; font-style:italic;">Id*</td> 
    105                 <td style="color:#333333; font-style:italic;">int</td> 
    106                 <td style="color:#333333; font-style:italic;">autogenerated id number (autoid)</td> 
    107                 <td style="color:#333333; font-style:italic;"> 
    108  
    109 not null,  
    110 auto,           </td> 
    111         </tr> 
    112         <tr  > 
    113                 <td style="color:#333333; font-style:italic;">Name*</td> 
    114                 <td style="color:#333333; font-style:italic;">string</td> 
    115                 <td style="color:#333333; font-style:italic;">unique, user provided name string</td> 
    116                 <td style="color:#333333; font-style:italic;"> 
    117  
    118 not null,  
    119                 </td> 
    120         </tr> 
    121          
    122         <!-- all the uniques --> 
    123         <tr> 
    124                 <td colspan="2">primary key(Id)</td> 
    125                 <td colspan="2">&nbsp;</td> 
    126         </tr> 
    127         <tr> 
    128                 <td colspan="2">key(Name)</td> 
    129                 <td colspan="2">&nbsp;</td> 
    130         </tr> 
    131         <!-- all the indices --> 
    132          
    133 </table> 
    134 *inherited field<br/> 
    135 <a href="#_top_of_page">go to top</a> 
    136 <p /> 
    137 <h3><a name="Experiment">Experiment</a>  
    138 </h3> 
    139 <p>Summary of an experiment. 
    140 </p> 
    141 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    142         <!-- table header --> 
    143         <tr><th class="tablehead" colspan="7">Experiment 
    144 <br/><i> implements Identifiable</i></th></tr>   
    145         <!-- column headers --> 
    146         <tr> 
    147                 <th>field</th> 
    148                 <th>type</th> 
    149                 <th>description</th> 
    150                 <th>constraints</th> 
    151         </tr> 
    152          
    153         <!-- all the fields --> 
    154         <tr  > 
    155                 <td style="color:#000000">Name</td> 
    156                 <td style="color:#000000">string</td> 
    157                 <td style="color:#000000">unique, user provided name string</td> 
    158                 <td style="color:#000000"> 
    159  
    160 not null,  
    161                 </td> 
    162         </tr> 
    163         <tr  > 
    164                 <td style="color:#000000">Description</td> 
    165                 <td style="color:#000000">text</td> 
    166                 <td style="color:#000000">Optional description text</td> 
    167                 <td style="color:#000000"> 
    168  
    169  
    170                 </td> 
    171         </tr> 
    172         <tr  > 
    173                 <td style="color:#000000">Date</td> 
    174                 <td style="color:#000000">date</td> 
    175                 <td style="color:#000000">Creation date, with an automatic default to 'today'</td> 
    176                 <td style="color:#000000"> 
    177  
    178 not null,  
    179 auto,           </td> 
    180         </tr> 
    181          
    182         <!-- all the uniques --> 
    183         <tr> 
    184                 <td colspan="2">primary key(Id)</td> 
    185                 <td colspan="2">&nbsp;</td> 
    186         </tr> 
    187         <tr> 
    188                 <td colspan="2">key(Name)</td> 
    189                 <td colspan="2">&nbsp;</td> 
    190         </tr> 
    191         <tr> 
    192                 <td colspan="2">key(Id)</td> 
    193                 <td colspan="2">&nbsp;</td> 
    194         </tr> 
    195         <!-- all the indices --> 
    196          
    197 </table> 
    198 *inherited field<br/> 
    199 <a href="#_top_of_page">go to top</a> 
    200 <p /> 
    201 <h3><a name="Sample">Sample</a>  
    202 </h3> 
    203 <p>Samples that are part of an experiment. 
    204                  
    205 </p> 
    206 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    207         <!-- table header --> 
    208         <tr><th class="tablehead" colspan="7">Sample 
    209 <br/><i> implements Identifiable</i></th></tr>   
    210         <!-- column headers --> 
    211         <tr> 
    212                 <th>field</th> 
    213                 <th>type</th> 
    214                 <th>description</th> 
    215                 <th>constraints</th> 
    216         </tr> 
    217          
    218         <!-- all the fields --> 
    219         <tr  > 
    220                 <td style="color:#000000">Name</td> 
    221                 <td style="color:#000000">string</td> 
    222                 <td style="color:#000000">unique, user provided name string</td> 
    223                 <td style="color:#000000"> 
    224  
    225 not null,  
    226                 </td> 
    227         </tr> 
    228         <tr  > 
    229                 <td style="color:#000000">Species</td> 
    230                 <td style="color:#000000">string</td> 
    231                 <td style="color:#000000">Species, default to Arabidopsis</td> 
    232                 <td style="color:#000000"> 
    233  
    234 not null,  
    235                 </td> 
    236         </tr> 
    237         <tr  > 
    238                 <td style="color:#000000">Tissue</td> 
    239                 <td style="color:#000000">string</td> 
    240                 <td style="color:#000000">Optional specification of tissue</td> 
    241                 <td style="color:#000000"> 
    242  
    243  
    244                 </td> 
    245         </tr> 
    246         <tr  > 
    247                 <td style="color:#000000">Sex</td> 
    248                 <td style="color:#000000">enum</td> 
    249                 <td style="color:#000000">Fixed choice on Sex</td> 
    250                 <td style="color:#000000"> 
    251  
    252 not null,  
    253                 enum_options: 'male', 'female', 'unknown' 
    254                 </td> 
    255         </tr> 
    256         <tr  > 
    257                 <td style="color:#000000">Experiment</td> 
    258                 <td style="color:#000000">xref</td> 
    259                 <td style="color:#000000">Samples are part-of one experiment (by cross reference to Experiment.id)</td> 
    260                 <td style="color:#000000"> 
    261 references(Experiment.Id), 
    262  
    263 not null,  
    264                 </td> 
    265         </tr> 
    266          
    267         <!-- all the uniques --> 
    268         <tr> 
    269                 <td colspan="2">primary key(Id)</td> 
    270                 <td colspan="2">&nbsp;</td> 
    271         </tr> 
    272         <tr> 
    273                 <td colspan="2">key(Name)</td> 
    274                 <td colspan="2">&nbsp;</td> 
    275         </tr> 
    276         <tr> 
    277                 <td colspan="2">key(Id)</td> 
    278                 <td colspan="2">&nbsp;</td> 
    279         </tr> 
    280         <!-- all the indices --> 
    281          
    282 </table> 
    283 *inherited field<br/> 
    284 <a href="#_top_of_page">go to top</a> 
    285 <p /> 
    286 <h3><a name="SpecialSample">SpecialSample</a>  
    287 </h3> 
    288 <p></p> 
    289 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    290         <!-- table header --> 
    291         <tr><th class="tablehead" colspan="7">SpecialSample<br/><i> extends Sample</i> 
    292 </th></tr>       
    293         <!-- column headers --> 
    294         <tr> 
    295                 <th>field</th> 
    296                 <th>type</th> 
    297                 <th>description</th> 
    298                 <th>constraints</th> 
    299         </tr> 
    300          
    301         <!-- all the fields --> 
    302         <tr  > 
    303                 <td style="color:#333333; font-style:italic;">Name*</td> 
    304                 <td style="color:#333333; font-style:italic;">string</td> 
    305                 <td style="color:#333333; font-style:italic;">unique, user provided name string</td> 
    306                 <td style="color:#333333; font-style:italic;"> 
    307  
    308 not null,  
    309                 </td> 
    310         </tr> 
    311         <tr  > 
    312                 <td style="color:#333333; font-style:italic;">Species*</td> 
    313                 <td style="color:#333333; font-style:italic;">string</td> 
    314                 <td style="color:#333333; font-style:italic;">Species, default to Arabidopsis</td> 
    315                 <td style="color:#333333; font-style:italic;"> 
    316  
    317 not null,  
    318                 </td> 
    319         </tr> 
    320         <tr  > 
    321                 <td style="color:#333333; font-style:italic;">Tissue*</td> 
    322                 <td style="color:#333333; font-style:italic;">string</td> 
    323                 <td style="color:#333333; font-style:italic;">Optional specification of tissue</td> 
    324                 <td style="color:#333333; font-style:italic;"> 
    325  
    326  
    327                 </td> 
    328         </tr> 
    329         <tr  > 
    330                 <td style="color:#333333; font-style:italic;">Sex*</td> 
    331                 <td style="color:#333333; font-style:italic;">enum</td> 
    332                 <td style="color:#333333; font-style:italic;">Fixed choice on Sex</td> 
    333                 <td style="color:#333333; font-style:italic;"> 
    334  
    335 not null,  
    336                 enum_options: 'male', 'female', 'unknown' 
    337                 </td> 
    338         </tr> 
    339         <tr  > 
    340                 <td style="color:#333333; font-style:italic;">Experiment*</td> 
    341                 <td style="color:#333333; font-style:italic;">xref</td> 
    342                 <td style="color:#333333; font-style:italic;">Samples are part-of one experiment (by cross reference to Experiment.id)</td> 
    343                 <td style="color:#333333; font-style:italic;"> 
    344 references(Experiment.Id), 
    345  
    346 not null,  
    347                 </td> 
    348         </tr> 
    349         <tr  > 
    350                 <td style="color:#000000">detail</td> 
    351                 <td style="color:#000000">string</td> 
    352                 <td style="color:#000000">&nbsp;</td> 
    353                 <td style="color:#000000"> 
    354  
    355 not null,  
    356                 </td> 
    357         </tr> 
    358          
    359         <!-- all the uniques --> 
    360         <tr> 
    361                 <td colspan="2">primary key(Id)</td> 
    362                 <td colspan="2">&nbsp;</td> 
    363         </tr> 
    364         <!-- all the indices --> 
    365          
    366 </table> 
    367 *inherited field<br/> 
    368 <a href="#_top_of_page">go to top</a> 
    369 <p /> 
    370 <h3><a name="Trait">Trait</a>  
    371 </h3> 
    372 <p>Traits that are studied in this experiment. 
    373                  
    374 </p> 
    375 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    376         <!-- table header --> 
    377         <tr><th class="tablehead" colspan="7">Trait 
    378 <br/><i> implements Identifiable</i></th></tr>   
    379         <!-- column headers --> 
    380         <tr> 
    381                 <th>field</th> 
    382                 <th>type</th> 
    383                 <th>description</th> 
    384                 <th>constraints</th> 
    385         </tr> 
    386          
    387         <!-- all the fields --> 
    388         <tr  > 
    389                 <td style="color:#000000">Name</td> 
    390                 <td style="color:#000000">string</td> 
    391                 <td style="color:#000000">unique, user provided name string</td> 
    392                 <td style="color:#000000"> 
    393  
    394 not null,  
    395                 </td> 
    396         </tr> 
    397         <tr  > 
    398                 <td style="color:#000000">Molcular</td> 
    399                 <td style="color:#000000">bool</td> 
    400                 <td style="color:#000000">Indication whether this is a molecular trait</td> 
    401                 <td style="color:#000000"> 
    402  
    403 not null,  
    404                 </td> 
    405         </tr> 
    406         <tr  > 
    407                 <td style="color:#000000">Experiment</td> 
    408                 <td style="color:#000000">xref</td> 
    409                 <td style="color:#000000">Traits are defined per experiment (by cross reference to Experiment.id)</td> 
    410                 <td style="color:#000000"> 
    411 references(Experiment.Id), 
    412  
    413 not null,  
    414                 </td> 
    415         </tr> 
    416          
    417         <!-- all the uniques --> 
    418         <tr> 
    419                 <td colspan="2">primary key(Id)</td> 
    420                 <td colspan="2">&nbsp;</td> 
    421         </tr> 
    422         <tr> 
    423                 <td colspan="2">key(Name)</td> 
    424                 <td colspan="2">&nbsp;</td> 
    425         </tr> 
    426         <tr> 
    427                 <td colspan="2">key(Id)</td> 
    428                 <td colspan="2">&nbsp;</td> 
    429         </tr> 
    430         <!-- all the indices --> 
    431          
    432 </table> 
    433 *inherited field<br/> 
    434 <a href="#_top_of_page">go to top</a> 
    435 <p /> 
    436 <h3><a name="Measurement">Measurement</a>  
    437 </h3> 
    438 <p>Measurements (i.e. set of trait observations 
    439                         per sample) that are part of an experiment. 
    440 </p> 
    441 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    442         <!-- table header --> 
    443         <tr><th class="tablehead" colspan="7">Measurement 
    444 <br/><i> implements Identifiable</i></th></tr>   
    445         <!-- column headers --> 
    446         <tr> 
    447                 <th>field</th> 
    448                 <th>type</th> 
    449                 <th>description</th> 
    450                 <th>constraints</th> 
    451         </tr> 
    452          
    453         <!-- all the fields --> 
    454         <tr  > 
    455                 <td style="color:#000000">Name</td> 
    456                 <td style="color:#000000">string</td> 
    457                 <td style="color:#000000">unique, user provided name string</td> 
    458                 <td style="color:#000000"> 
    459  
    460 not null,  
    461                 </td> 
    462         </tr> 
    463         <tr  > 
    464                 <td style="color:#000000">Experiment</td> 
    465                 <td style="color:#000000">xref</td> 
    466                 <td style="color:#000000">Measurements are part-of one experiment</td> 
    467                 <td style="color:#000000"> 
    468 references(Experiment.Id), 
    469  
    470 not null,  
    471                 </td> 
    472         </tr> 
    473         <tr  > 
    474                 <td style="color:#000000">DataFile</td> 
    475                 <td style="color:#000000">file</td> 
    476                 <td style="color:#000000">A file attachment that summarizes the results</td> 
    477                 <td style="color:#000000"> 
    478  
    479 not null,  
    480                 </td> 
    481         </tr> 
    482          
    483         <!-- all the uniques --> 
    484         <tr> 
    485                 <td colspan="2">primary key(Id)</td> 
    486                 <td colspan="2">&nbsp;</td> 
    487         </tr> 
    488         <tr> 
    489                 <td colspan="2">key(Name)</td> 
    490                 <td colspan="2">&nbsp;</td> 
    491         </tr> 
    492         <tr> 
    493                 <td colspan="2">key(Id)</td> 
    494                 <td colspan="2">&nbsp;</td> 
    495         </tr> 
    496         <!-- all the indices --> 
    497          
    498 </table> 
    499 *inherited field<br/> 
    500 <a href="#_top_of_page">go to top</a> 
    501 <p /> 
    502 <h3><a name="Data">Data</a>  
    503 </h3> 
    504 <p>Data values (observations) of a measurement. Note: 
    505                         Data doesn't inherit from Identifiable because it has no unique name. 
    506                  
    507 </p> 
    508 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    509         <!-- table header --> 
    510         <tr><th class="tablehead" colspan="7">Data 
    511 </th></tr>       
    512         <!-- column headers --> 
    513         <tr> 
    514                 <th>field</th> 
    515                 <th>type</th> 
    516                 <th>description</th> 
    517                 <th>constraints</th> 
    518         </tr> 
    519          
    520         <!-- all the fields --> 
    521         <tr  > 
    522                 <td style="color:#000000">Id</td> 
    523                 <td style="color:#000000">int</td> 
    524                 <td style="color:#000000">autogenerated id number</td> 
    525                 <td style="color:#000000"> 
    526  
    527 not null,  
    528 auto,           </td> 
    529         </tr> 
    530         <tr  > 
    531                 <td style="color:#000000">Measurement</td> 
    532                 <td style="color:#000000">xref</td> 
    533                 <td style="color:#000000">Data values are part-of one Measurement</td> 
    534                 <td style="color:#000000"> 
    535 references(Measurement.Id), 
    536  
    537 not null,  
    538                 </td> 
    539         </tr> 
    540         <tr  > 
    541                 <td style="color:#000000">Sample</td> 
    542                 <td style="color:#000000">xref</td> 
    543                 <td style="color:#000000">The sample this measurement is on</td> 
    544                 <td style="color:#000000"> 
    545 references(Sample.Id), 
    546  
    547 not null,  
    548                 </td> 
    549         </tr> 
    550         <tr  > 
    551                 <td style="color:#000000">Trait</td> 
    552                 <td style="color:#000000">xref</td> 
    553                 <td style="color:#000000">The trait this measurement is on</td> 
    554                 <td style="color:#000000"> 
    555 references(Trait.Id), 
    556  
    557 not null,  
    558                 </td> 
    559         </tr> 
    560         <tr  > 
    561                 <td style="color:#000000">Value</td> 
    562                 <td style="color:#000000">string</td> 
    563                 <td style="color:#000000">The value measured/calculated</td> 
    564                 <td style="color:#000000"> 
    565  
    566 not null,  
    567                 </td> 
    568         </tr> 
    569          
    570         <!-- all the uniques --> 
    571         <tr> 
    572                 <td colspan="2">primary key(Id)</td> 
    573                 <td colspan="2">&nbsp;</td> 
    574         </tr> 
    575         <tr> 
    576                 <td colspan="2">key(Measurement, Sample, Trait)</td> 
    577                 <td colspan="2">&nbsp;</td> 
    578         </tr> 
    579         <!-- all the indices --> 
    580          
    581 </table> 
    582 *inherited field<br/> 
    583 <a href="#_top_of_page">go to top</a> 
    584 <p /> 
     110<img src="entity-uml-diagram-original.col7a1database.dot.png" style="border: solid thin black;"> 
     111<a href="entity-uml-diagram-original.col7a1database.dot.png" target="_blank">show fullscreen</a> 
    585112<h3><a name="Role">Role</a>  
    586113</h3> 
     
    817344        <tr> 
    818345                <td colspan="2">primary key(id)</td> 
     346                <td colspan="2">&nbsp;</td> 
     347        </tr> 
     348        <!-- all the indices --> 
     349         
     350</table> 
     351*inherited field<br/> 
     352<a href="#_top_of_page">go to top</a> 
     353<p /> 
     354<h3><a name="Statistics">Statistics</a>  
     355</h3> 
     356<p></p> 
     357<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     358        <!-- table header --> 
     359        <tr><th class="tablehead" colspan="7">Statistics 
     360</th></tr>       
     361        <!-- column headers --> 
     362        <tr> 
     363                <th>field</th> 
     364                <th>type</th> 
     365                <th>description</th> 
     366                <th>constraints</th> 
     367        </tr> 
     368         
     369        <!-- all the fields --> 
     370        <tr  > 
     371                <td style="color:#000000">id</td> 
     372                <td style="color:#000000">int</td> 
     373                <td style="color:#000000">&nbsp;</td> 
     374                <td style="color:#000000"> 
     375 
     376not null,  
     377auto,           </td> 
     378        </tr> 
     379        <tr  > 
     380                <td style="color:#000000">mutation</td> 
     381                <td style="color:#000000">xref</td> 
     382                <td style="color:#000000">&nbsp;</td> 
     383                <td style="color:#000000"> 
     384references(Mutations.id), 
     385 
     386not null,  
     387                </td> 
     388        </tr> 
     389        <tr  > 
     390                <td style="color:#000000">value</td> 
     391                <td style="color:#000000">int</td> 
     392                <td style="color:#000000">&nbsp;</td> 
     393                <td style="color:#000000"> 
     394 
     395 
     396                </td> 
     397        </tr> 
     398        <tr  > 
     399                <td style="color:#000000">date</td> 
     400                <td style="color:#000000">date</td> 
     401                <td style="color:#000000">&nbsp;</td> 
     402                <td style="color:#000000"> 
     403 
     404not null,  
     405                </td> 
     406        </tr> 
     407         
     408        <!-- all the uniques --> 
     409        <tr> 
     410                <td colspan="2">primary key(id)</td> 
     411                <td colspan="2">&nbsp;</td> 
     412        </tr> 
     413        <!-- all the indices --> 
     414         
     415</table> 
     416*inherited field<br/> 
     417<a href="#_top_of_page">go to top</a> 
     418<p /> 
     419<h3><a name="RNA">RNA</a>  
     420</h3> 
     421<p></p> 
     422<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     423        <!-- table header --> 
     424        <tr><th class="tablehead" colspan="7">RNA 
     425</th></tr>       
     426        <!-- column headers --> 
     427        <tr> 
     428                <th>field</th> 
     429                <th>type</th> 
     430                <th>description</th> 
     431                <th>constraints</th> 
     432        </tr> 
     433         
     434        <!-- all the fields --> 
     435        <tr  > 
     436                <td style="color:#000000">id</td> 
     437                <td style="color:#000000">int</td> 
     438                <td style="color:#000000">&nbsp;</td> 
     439                <td style="color:#000000"> 
     440 
     441not null,  
     442auto,           </td> 
     443        </tr> 
     444        <tr  > 
     445                <td style="color:#000000">nucleotides</td> 
     446                <td style="color:#000000">string</td> 
     447                <td style="color:#000000">&nbsp;</td> 
     448                <td style="color:#000000"> 
     449 
     450not null,  
     451                </td> 
     452        </tr> 
     453        <tr  > 
     454                <td style="color:#000000">exon</td> 
     455                <td style="color:#000000">int</td> 
     456                <td style="color:#000000">&nbsp;</td> 
     457                <td style="color:#000000"> 
     458 
     459not null,  
     460                </td> 
     461        </tr> 
     462        <tr  > 
     463                <td style="color:#000000">Codon</td> 
     464                <td style="color:#000000">xref</td> 
     465                <td style="color:#000000">&nbsp;</td> 
     466                <td style="color:#000000"> 
     467references(Amino_acid.id), 
     468 
     469not null,  
     470                </td> 
     471        </tr> 
     472         
     473        <!-- all the uniques --> 
     474        <tr> 
     475                <td colspan="2">primary key(id)</td> 
     476                <td colspan="2">&nbsp;</td> 
     477        </tr> 
     478        <!-- all the indices --> 
     479         
     480</table> 
     481*inherited field<br/> 
     482<a href="#_top_of_page">go to top</a> 
     483<p /> 
     484<h3><a name="Amino_acid">Amino_acid</a>  
     485</h3> 
     486<p></p> 
     487<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     488        <!-- table header --> 
     489        <tr><th class="tablehead" colspan="7">Amino_acid 
     490</th></tr>       
     491        <!-- column headers --> 
     492        <tr> 
     493                <th>field</th> 
     494                <th>type</th> 
     495                <th>description</th> 
     496                <th>constraints</th> 
     497        </tr> 
     498         
     499        <!-- all the fields --> 
     500        <tr  > 
     501                <td style="color:#000000">id</td> 
     502                <td style="color:#000000">int</td> 
     503                <td style="color:#000000">&nbsp;</td> 
     504                <td style="color:#000000"> 
     505 
     506not null,  
     507auto,           </td> 
     508        </tr> 
     509        <tr  > 
     510                <td style="color:#000000">codon</td> 
     511                <td style="color:#000000">string</td> 
     512                <td style="color:#000000">&nbsp;</td> 
     513                <td style="color:#000000"> 
     514 
     515not null,  
     516                </td> 
     517        </tr> 
     518        <tr  > 
     519                <td style="color:#000000">amino_acid</td> 
     520                <td style="color:#000000">string</td> 
     521                <td style="color:#000000">&nbsp;</td> 
     522                <td style="color:#000000"> 
     523 
     524not null,  
     525                </td> 
     526        </tr> 
     527         
     528        <!-- all the uniques --> 
     529        <tr> 
     530                <td colspan="2">primary key(id)</td> 
     531                <td colspan="2">&nbsp;</td> 
     532        </tr> 
     533        <!-- all the indices --> 
     534         
     535</table> 
     536*inherited field<br/> 
     537<a href="#_top_of_page">go to top</a> 
     538<p /> 
     539<h3><a name="Mutations">Mutations</a>  
     540</h3> 
     541<p> Here are all mutations known 
     542</p> 
     543<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     544        <!-- table header --> 
     545        <tr><th class="tablehead" colspan="7">Mutations 
     546</th></tr>       
     547        <!-- column headers --> 
     548        <tr> 
     549                <th>field</th> 
     550                <th>type</th> 
     551                <th>description</th> 
     552                <th>constraints</th> 
     553        </tr> 
     554         
     555        <!-- all the fields --> 
     556        <tr  > 
     557                <td style="color:#000000">id</td> 
     558                <td style="color:#000000">int</td> 
     559                <td style="color:#000000">&nbsp;</td> 
     560                <td style="color:#000000"> 
     561 
     562not null,  
     563auto,           </td> 
     564        </tr> 
     565        <tr  > 
     566                <td style="color:#000000">nucleotide_change</td> 
     567                <td style="color:#000000">string</td> 
     568                <td style="color:#000000">&nbsp;</td> 
     569                <td style="color:#000000"> 
     570 
     571not null,  
     572                </td> 
     573        </tr> 
     574        <tr  > 
     575                <td style="color:#000000">amino_acid</td> 
     576                <td style="color:#000000">string</td> 
     577                <td style="color:#000000">&nbsp;</td> 
     578                <td style="color:#000000"> 
     579 
     580not null,  
     581                </td> 
     582        </tr> 
     583        <tr  > 
     584                <td style="color:#000000">consequence</td> 
     585                <td style="color:#000000">xref</td> 
     586                <td style="color:#000000">&nbsp;</td> 
     587                <td style="color:#000000"> 
     588references(Consequence.id), 
     589 
     590 
     591                </td> 
     592        </tr> 
     593         
     594        <!-- all the uniques --> 
     595        <tr> 
     596                <td colspan="2">primary key(id)</td> 
     597                <td colspan="2">&nbsp;</td> 
     598        </tr> 
     599        <tr> 
     600                <td colspan="2">key(nucleotide_change)</td> 
     601                <td colspan="2">&nbsp;</td> 
     602        </tr> 
     603        <!-- all the indices --> 
     604         
     605</table> 
     606*inherited field<br/> 
     607<a href="#_top_of_page">go to top</a> 
     608<p /> 
     609<h3><a name="Contact">Contact</a>  
     610</h3> 
     611<p></p> 
     612<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     613        <!-- table header --> 
     614        <tr><th class="tablehead" colspan="7">Contact 
     615</th></tr>       
     616        <!-- column headers --> 
     617        <tr> 
     618                <th>field</th> 
     619                <th>type</th> 
     620                <th>description</th> 
     621                <th>constraints</th> 
     622        </tr> 
     623         
     624        <!-- all the fields --> 
     625        <tr  > 
     626                <td style="color:#000000">id</td> 
     627                <td style="color:#000000">int</td> 
     628                <td style="color:#000000">&nbsp;</td> 
     629                <td style="color:#000000"> 
     630 
     631not null,  
     632auto,           </td> 
     633        </tr> 
     634        <tr  > 
     635                <td style="color:#000000">name</td> 
     636                <td style="color:#000000">string</td> 
     637                <td style="color:#000000">&nbsp;</td> 
     638                <td style="color:#000000"> 
     639 
     640not null,  
     641                </td> 
     642        </tr> 
     643        <tr  > 
     644                <td style="color:#000000">address</td> 
     645                <td style="color:#000000">string</td> 
     646                <td style="color:#000000">&nbsp;</td> 
     647                <td style="color:#000000"> 
     648 
     649 
     650                </td> 
     651        </tr> 
     652        <tr  > 
     653                <td style="color:#000000">tel</td> 
     654                <td style="color:#000000">string</td> 
     655                <td style="color:#000000">&nbsp;</td> 
     656                <td style="color:#000000"> 
     657 
     658 
     659                </td> 
     660        </tr> 
     661         
     662        <!-- all the uniques --> 
     663        <tr> 
     664                <td colspan="2">primary key(id)</td> 
     665                <td colspan="2">&nbsp;</td> 
     666        </tr> 
     667        <tr> 
     668                <td colspan="2">key(name)</td> 
     669                <td colspan="2">&nbsp;</td> 
     670        </tr> 
     671        <!-- all the indices --> 
     672         
     673</table> 
     674*inherited field<br/> 
     675<a href="#_top_of_page">go to top</a> 
     676<p /> 
     677<h3><a name="Patient">Patient</a>  
     678</h3> 
     679<p></p> 
     680<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     681        <!-- table header --> 
     682        <tr><th class="tablehead" colspan="7">Patient 
     683</th></tr>       
     684        <!-- column headers --> 
     685        <tr> 
     686                <th>field</th> 
     687                <th>type</th> 
     688                <th>description</th> 
     689                <th>constraints</th> 
     690        </tr> 
     691         
     692        <!-- all the fields --> 
     693        <tr  > 
     694                <td style="color:#000000">id</td> 
     695                <td style="color:#000000">int</td> 
     696                <td style="color:#000000">&nbsp;</td> 
     697                <td style="color:#000000"> 
     698 
     699not null,  
     700auto,           </td> 
     701        </tr> 
     702        <tr  > 
     703                <td style="color:#000000">name</td> 
     704                <td style="color:#000000">string</td> 
     705                <td style="color:#000000">&nbsp;</td> 
     706                <td style="color:#000000"> 
     707 
     708not null,  
     709                </td> 
     710        </tr> 
     711        <tr  > 
     712                <td style="color:#000000">age</td> 
     713                <td style="color:#000000">int</td> 
     714                <td style="color:#000000">&nbsp;</td> 
     715                <td style="color:#000000"> 
     716 
     717 
     718                </td> 
     719        </tr> 
     720        <tr  > 
     721                <td style="color:#000000">alive</td> 
     722                <td style="color:#000000">bool</td> 
     723                <td style="color:#000000">&nbsp;</td> 
     724                <td style="color:#000000"> 
     725 
     726not null,  
     727                </td> 
     728        </tr> 
     729        <tr  > 
     730                <td style="color:#000000">gender</td> 
     731                <td style="color:#000000">xref</td> 
     732                <td style="color:#000000">&nbsp;</td> 
     733                <td style="color:#000000"> 
     734references(Gender.id), 
     735 
     736not null,  
     737                </td> 
     738        </tr> 
     739        <tr  > 
     740                <td style="color:#000000">id_mutation1</td> 
     741                <td style="color:#000000">xref</td> 
     742                <td style="color:#000000">&nbsp;</td> 
     743                <td style="color:#000000"> 
     744references(Mutations.id), 
     745 
     746 
     747                </td> 
     748        </tr> 
     749        <tr  > 
     750                <td style="color:#000000">id_mutation2</td> 
     751                <td style="color:#000000">xref</td> 
     752                <td style="color:#000000">&nbsp;</td> 
     753                <td style="color:#000000"> 
     754references(Mutations.id), 
     755 
     756 
     757                </td> 
     758        </tr> 
     759         
     760        <!-- all the uniques --> 
     761        <tr> 
     762                <td colspan="2">primary key(id)</td> 
     763                <td colspan="2">&nbsp;</td> 
     764        </tr> 
     765        <!-- all the indices --> 
     766         
     767</table> 
     768*inherited field<br/> 
     769<a href="#_top_of_page">go to top</a> 
     770<p /> 
     771<h3><a name="Gender">Gender</a>  
     772</h3> 
     773<p></p> 
     774<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     775        <!-- table header --> 
     776        <tr><th class="tablehead" colspan="7">Gender 
     777</th></tr>       
     778        <!-- column headers --> 
     779        <tr> 
     780                <th>field</th> 
     781                <th>type</th> 
     782                <th>description</th> 
     783                <th>constraints</th> 
     784        </tr> 
     785         
     786        <!-- all the fields --> 
     787        <tr  > 
     788                <td style="color:#000000">id</td> 
     789                <td style="color:#000000">int</td> 
     790                <td style="color:#000000">&nbsp;</td> 
     791                <td style="color:#000000"> 
     792 
     793not null,  
     794auto,           </td> 
     795        </tr> 
     796        <tr  > 
     797                <td style="color:#000000">name</td> 
     798                <td style="color:#000000">string</td> 
     799                <td style="color:#000000">&nbsp;</td> 
     800                <td style="color:#000000"> 
     801 
     802not null,  
     803                </td> 
     804        </tr> 
     805         
     806        <!-- all the uniques --> 
     807        <tr> 
     808                <td colspan="2">primary key(id)</td> 
     809                <td colspan="2">&nbsp;</td> 
     810        </tr> 
     811        <!-- all the indices --> 
     812         
     813</table> 
     814*inherited field<br/> 
     815<a href="#_top_of_page">go to top</a> 
     816<p /> 
     817<h3><a name="Diagnosis">Diagnosis</a>  
     818</h3> 
     819<p></p> 
     820<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     821        <!-- table header --> 
     822        <tr><th class="tablehead" colspan="7">Diagnosis 
     823</th></tr>       
     824        <!-- column headers --> 
     825        <tr> 
     826                <th>field</th> 
     827                <th>type</th> 
     828                <th>description</th> 
     829                <th>constraints</th> 
     830        </tr> 
     831         
     832        <!-- all the fields --> 
     833        <tr  > 
     834                <td style="color:#000000">id</td> 
     835                <td style="color:#000000">int</td> 
     836                <td style="color:#000000">&nbsp;</td> 
     837                <td style="color:#000000"> 
     838 
     839not null,  
     840auto,           </td> 
     841        </tr> 
     842        <tr  > 
     843                <td style="color:#000000">value</td> 
     844                <td style="color:#000000">text</td> 
     845                <td style="color:#000000">&nbsp;</td> 
     846                <td style="color:#000000"> 
     847 
     848not null,  
     849                </td> 
     850        </tr> 
     851        <tr  > 
     852                <td style="color:#000000">id_phenotype</td> 
     853                <td style="color:#000000">xref</td> 
     854                <td style="color:#000000">&nbsp;</td> 
     855                <td style="color:#000000"> 
     856references(Phenotype.id), 
     857 
     858not null,  
     859                </td> 
     860        </tr> 
     861        <tr  > 
     862                <td style="color:#000000">id_patient</td> 
     863                <td style="color:#000000">xref</td> 
     864                <td style="color:#000000">&nbsp;</td> 
     865                <td style="color:#000000"> 
     866references(Patient.id), 
     867 
     868not null,  
     869                </td> 
     870        </tr> 
     871         
     872        <!-- all the uniques --> 
     873        <tr> 
     874                <td colspan="2">primary key(id)</td> 
     875                <td colspan="2">&nbsp;</td> 
     876        </tr> 
     877        <!-- all the indices --> 
     878         
     879</table> 
     880*inherited field<br/> 
     881<a href="#_top_of_page">go to top</a> 
     882<p /> 
     883<h3><a name="Phenotype">Phenotype</a>  
     884</h3> 
     885<p></p> 
     886<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     887        <!-- table header --> 
     888        <tr><th class="tablehead" colspan="7">Phenotype 
     889</th></tr>       
     890        <!-- column headers --> 
     891        <tr> 
     892                <th>field</th> 
     893                <th>type</th> 
     894                <th>description</th> 
     895                <th>constraints</th> 
     896        </tr> 
     897         
     898        <!-- all the fields --> 
     899        <tr  > 
     900                <td style="color:#000000">id</td> 
     901                <td style="color:#000000">int</td> 
     902                <td style="color:#000000">&nbsp;</td> 
     903                <td style="color:#000000"> 
     904 
     905not null,  
     906auto,           </td> 
     907        </tr> 
     908        <tr  > 
     909                <td style="color:#000000">Description</td> 
     910                <td style="color:#000000">text</td> 
     911                <td style="color:#000000">&nbsp;</td> 
     912                <td style="color:#000000"> 
     913 
     914not null,  
     915                </td> 
     916        </tr> 
     917        <tr  > 
     918                <td style="color:#000000">Date</td> 
     919                <td style="color:#000000">date</td> 
     920                <td style="color:#000000">&nbsp;</td> 
     921                <td style="color:#000000"> 
     922 
     923 
     924                </td> 
     925        </tr> 
     926         
     927        <!-- all the uniques --> 
     928        <tr> 
     929                <td colspan="2">primary key(id)</td> 
     930                <td colspan="2">&nbsp;</td> 
     931        </tr> 
     932        <!-- all the indices --> 
     933         
     934</table> 
     935*inherited field<br/> 
     936<a href="#_top_of_page">go to top</a> 
     937<p /> 
     938<h3><a name="E_M">E_M</a>  
     939</h3> 
     940<p></p> 
     941<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     942        <!-- table header --> 
     943        <tr><th class="tablehead" colspan="7">E_M 
     944</th></tr>       
     945        <!-- column headers --> 
     946        <tr> 
     947                <th>field</th> 
     948                <th>type</th> 
     949                <th>description</th> 
     950                <th>constraints</th> 
     951        </tr> 
     952         
     953        <!-- all the fields --> 
     954        <tr  > 
     955                <td style="color:#000000">id</td> 
     956                <td style="color:#000000">int</td> 
     957                <td style="color:#000000">&nbsp;</td> 
     958                <td style="color:#000000"> 
     959 
     960not null,  
     961auto,           </td> 
     962        </tr> 
     963        <tr  > 
     964                <td style="color:#000000">patient</td> 
     965                <td style="color:#000000">xref</td> 
     966                <td style="color:#000000">&nbsp;</td> 
     967                <td style="color:#000000"> 
     968references(Patient.id), 
     969 
     970not null,  
     971                </td> 
     972        </tr> 
     973        <tr  > 
     974                <td style="color:#000000">value</td> 
     975                <td style="color:#000000">string</td> 
     976                <td style="color:#000000">&nbsp;</td> 
     977                <td style="color:#000000"> 
     978 
     979not null,  
     980                </td> 
     981        </tr> 
     982        <tr  > 
     983                <td style="color:#000000">Anchoring_fibers</td> 
     984                <td style="color:#000000">string</td> 
     985                <td style="color:#000000">&nbsp;</td> 
     986                <td style="color:#000000"> 
     987 
     988 
     989                </td> 
     990        </tr> 
     991        <tr  > 
     992                <td style="color:#000000">Hemi_desmosomes</td> 
     993                <td style="color:#000000">string</td> 
     994                <td style="color:#000000">&nbsp;</td> 
     995                <td style="color:#000000"> 
     996 
     997 
     998                </td> 
     999        </tr> 
     1000        <tr  > 
     1001                <td style="color:#000000">description</td> 
     1002                <td style="color:#000000">text</td> 
     1003                <td style="color:#000000">&nbsp;</td> 
     1004                <td style="color:#000000"> 
     1005 
     1006not null,  
     1007                </td> 
     1008        </tr> 
     1009         
     1010        <!-- all the uniques --> 
     1011        <tr> 
     1012                <td colspan="2">primary key(id)</td> 
     1013                <td colspan="2">&nbsp;</td> 
     1014        </tr> 
     1015        <!-- all the indices --> 
     1016         
     1017</table> 
     1018*inherited field<br/> 
     1019<a href="#_top_of_page">go to top</a> 
     1020<p /> 
     1021<h3><a name="I_F">I_F</a>  
     1022</h3> 
     1023<p></p> 
     1024<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1025        <!-- table header --> 
     1026        <tr><th class="tablehead" colspan="7">I_F 
     1027</th></tr>       
     1028        <!-- column headers --> 
     1029        <tr> 
     1030                <th>field</th> 
     1031                <th>type</th> 
     1032                <th>description</th> 
     1033                <th>constraints</th> 
     1034        </tr> 
     1035         
     1036        <!-- all the fields --> 
     1037        <tr  > 
     1038                <td style="color:#000000">id</td> 
     1039                <td style="color:#000000">int</td> 
     1040                <td style="color:#000000">&nbsp;</td> 
     1041                <td style="color:#000000"> 
     1042 
     1043not null,  
     1044auto,           </td> 
     1045        </tr> 
     1046        <tr  > 
     1047                <td style="color:#000000">patient</td> 
     1048                <td style="color:#000000">xref</td> 
     1049                <td style="color:#000000">&nbsp;</td> 
     1050                <td style="color:#000000"> 
     1051references(Patient.id), 
     1052 
     1053 
     1054                </td> 
     1055        </tr> 
     1056        <tr  > 
     1057                <td style="color:#000000">test_LH72</td> 
     1058                <td style="color:#000000">string</td> 
     1059                <td style="color:#000000">&nbsp;</td> 
     1060                <td style="color:#000000"> 
     1061 
     1062 
     1063                </td> 
     1064        </tr> 
     1065        <tr  > 
     1066                <td style="color:#000000">test_2Q633</td> 
     1067                <td style="color:#000000">string</td> 
     1068                <td style="color:#000000">&nbsp;</td> 
     1069                <td style="color:#000000"> 
     1070 
     1071 
     1072                </td> 
     1073        </tr> 
     1074        <tr  > 
     1075                <td style="color:#000000">keratine_14</td> 
     1076                <td style="color:#000000">string</td> 
     1077                <td style="color:#000000">&nbsp;</td> 
     1078                <td style="color:#000000"> 
     1079 
     1080 
     1081                </td> 
     1082        </tr> 
     1083        <tr  > 
     1084                <td style="color:#000000">BP180_1D1</td> 
     1085                <td style="color:#000000">string</td> 
     1086                <td style="color:#000000">&nbsp;</td> 
     1087                <td style="color:#000000"> 
     1088 
     1089 
     1090                </td> 
     1091        </tr> 
     1092        <tr  > 
     1093                <td style="color:#000000">Niceine_GB3</td> 
     1094                <td style="color:#000000">string</td> 
     1095                <td style="color:#000000">&nbsp;</td> 
     1096                <td style="color:#000000"> 
     1097 
     1098 
     1099                </td> 
     1100        </tr> 
     1101        <tr  > 
     1102                <td style="color:#000000">Collagen</td> 
     1103                <td style="color:#000000">string</td> 
     1104                <td style="color:#000000">&nbsp;</td> 
     1105                <td style="color:#000000"> 
     1106 
     1107 
     1108                </td> 
     1109        </tr> 
     1110        <tr  > 
     1111                <td style="color:#000000">description</td> 
     1112                <td style="color:#000000">text</td> 
     1113                <td style="color:#000000">&nbsp;</td> 
     1114                <td style="color:#000000"> 
     1115 
     1116not null,  
     1117                </td> 
     1118        </tr> 
     1119         
     1120        <!-- all the uniques --> 
     1121        <tr> 
     1122                <td colspan="2">primary key(id)</td> 
     1123                <td colspan="2">&nbsp;</td> 
     1124        </tr> 
     1125        <!-- all the indices --> 
     1126         
     1127</table> 
     1128*inherited field<br/> 
     1129<a href="#_top_of_page">go to top</a> 
     1130<p /> 
     1131<h3><a name="Consequence">Consequence</a>  
     1132</h3> 
     1133<p></p> 
     1134<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1135        <!-- table header --> 
     1136        <tr><th class="tablehead" colspan="7">Consequence 
     1137</th></tr>       
     1138        <!-- column headers --> 
     1139        <tr> 
     1140                <th>field</th> 
     1141                <th>type</th> 
     1142                <th>description</th> 
     1143                <th>constraints</th> 
     1144        </tr> 
     1145         
     1146        <!-- all the fields --> 
     1147        <tr  > 
     1148                <td style="color:#000000">id</td> 
     1149                <td style="color:#000000">int</td> 
     1150                <td style="color:#000000">&nbsp;</td> 
     1151                <td style="color:#000000"> 
     1152 
     1153not null,  
     1154auto,           </td> 
     1155        </tr> 
     1156        <tr  > 
     1157                <td style="color:#000000">consequence</td> 
     1158                <td style="color:#000000">string</td> 
     1159                <td style="color:#000000">&nbsp;</td> 
     1160                <td style="color:#000000"> 
     1161 
     1162not null,  
     1163                </td> 
     1164        </tr> 
     1165         
     1166        <!-- all the uniques --> 
     1167        <tr> 
     1168                <td colspan="2">primary key(id)</td> 
     1169                <td colspan="2">&nbsp;</td> 
     1170        </tr> 
     1171        <!-- all the indices --> 
     1172         
     1173</table> 
     1174*inherited field<br/> 
     1175<a href="#_top_of_page">go to top</a> 
     1176<p /> 
     1177<h3><a name="Pictures">Pictures</a>  
     1178</h3> 
     1179<p></p> 
     1180<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1181        <!-- table header --> 
     1182        <tr><th class="tablehead" colspan="7">Pictures 
     1183</th></tr>       
     1184        <!-- column headers --> 
     1185        <tr> 
     1186                <th>field</th> 
     1187                <th>type</th> 
     1188                <th>description</th> 
     1189                <th>constraints</th> 
     1190        </tr> 
     1191         
     1192        <!-- all the fields --> 
     1193        <tr  > 
     1194                <td style="color:#000000">id</td> 
     1195                <td style="color:#000000">int</td> 
     1196                <td style="color:#000000">&nbsp;</td> 
     1197                <td style="color:#000000"> 
     1198 
     1199not null,  
     1200auto,           </td> 
     1201        </tr> 
     1202        <tr  > 
     1203                <td style="color:#000000">small</td> 
     1204                <td style="color:#000000">file</td> 
     1205                <td style="color:#000000">&nbsp;</td> 
     1206                <td style="color:#000000"> 
     1207 
     1208not null,  
     1209                </td> 
     1210        </tr> 
     1211        <tr  > 
     1212                <td style="color:#000000">large</td> 
     1213                <td style="color:#000000">file</td> 
     1214                <td style="color:#000000">&nbsp;</td> 
     1215                <td style="color:#000000"> 
     1216 
     1217not null,  
     1218                </td> 
     1219        </tr> 
     1220        <tr  > 
     1221                <td style="color:#000000">id_patient</td> 
     1222                <td style="color:#000000">xref</td> 
     1223                <td style="color:#000000">&nbsp;</td> 
     1224                <td style="color:#000000"> 
     1225references(Patient.id), 
     1226 
     1227not null,  
     1228                </td> 
     1229        </tr> 
     1230         
     1231        <!-- all the uniques --> 
     1232        <tr> 
     1233                <td colspan="2">primary key(id)</td> 
     1234                <td colspan="2">&nbsp;</td> 
     1235        </tr> 
     1236        <!-- all the indices --> 
     1237         
     1238</table> 
     1239*inherited field<br/> 
     1240<a href="#_top_of_page">go to top</a> 
     1241<p /> 
     1242<br/> 
     1243<br/> 
     1244<h1><a name="fuge.xgap.components_package">fuge.xgap.components package</a></h1> 
     1245 
     1246<img src="entity-uml-diagram-fuge.xgap.components.dot.png" style="border: solid thin black;"> 
     1247<a href="entity-uml-diagram-fuge.xgap.components.dot.png" target="_blank">show fullscreen</a> 
     1248<h3><a name="DataElement">DataElement</a> (interface).  
     1249</h3> 
     1250<p> 
     1251                                Generic data structure for aiming the values of a data 
     1252                                set as described in Data. Each DataElement describes a 
     1253                                cell in a data matrix of rows (from) and columns (to), 
     1254                                e.g., in "dataset X" it was measured that geneX (col) 
     1255                                relates to geneZ (row). 
     1256                         
     1257</p> 
     1258<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1259        <!-- table header --> 
     1260        <tr><th class="tablehead" colspan="7">DataElement 
     1261</th></tr>       
     1262        <!-- column headers --> 
     1263        <tr> 
     1264                <th>field</th> 
     1265                <th>type</th> 
     1266                <th>description</th> 
     1267                <th>constraints</th> 
     1268        </tr> 
     1269         
     1270        <!-- all the fields --> 
     1271        <tr  > 
     1272                <td style="color:#333333; font-style:italic;">id*</td> 
     1273                <td style="color:#333333; font-style:italic;">int</td> 
     1274                <td style="color:#333333; font-style:italic;">automatically generated id-field</td> 
     1275                <td style="color:#333333; font-style:italic;"> 
     1276 
     1277not null,  
     1278auto,           </td> 
     1279        </tr> 
     1280        <tr  > 
     1281                <td style="color:#333333; font-style:italic;">Data*</td> 
     1282                <td style="color:#333333; font-style:italic;">xref</td> 
     1283                <td style="color:#333333; font-style:italic;">Reference to the data this entity belongs to.</td> 
     1284                <td style="color:#333333; font-style:italic;"> 
     1285references(Data.id), 
     1286 
     1287not null,  
     1288                </td> 
     1289        </tr> 
     1290        <tr  > 
     1291                <td style="color:#333333; font-style:italic;">Col*</td> 
     1292                <td style="color:#333333; font-style:italic;">xref</td> 
     1293                <td style="color:#333333; font-style:italic;">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     1294                <td style="color:#333333; font-style:italic;"> 
     1295references(DimensionElement.id), 
     1296 
     1297not null,  
     1298                </td> 
     1299        </tr> 
     1300        <tr  > 
     1301                <td style="color:#333333; font-style:italic;">Row*</td> 
     1302                <td style="color:#333333; font-style:italic;">xref</td> 
     1303                <td style="color:#333333; font-style:italic;">References the DimensionElement on the other end of the relation.</td> 
     1304                <td style="color:#333333; font-style:italic;"> 
     1305references(DimensionElement.id), 
     1306 
     1307not null,  
     1308                </td> 
     1309        </tr> 
     1310        <tr  > 
     1311                <td style="color:#333333; font-style:italic;">RowIndex*</td> 
     1312                <td style="color:#333333; font-style:italic;">int</td> 
     1313                <td style="color:#333333; font-style:italic;">Row position in the matrix.</td> 
     1314                <td style="color:#333333; font-style:italic;"> 
     1315 
     1316not null,  
     1317                </td> 
     1318        </tr> 
     1319        <tr  > 
     1320                <td style="color:#333333; font-style:italic;">ColIndex*</td> 
     1321                <td style="color:#333333; font-style:italic;">int</td> 
     1322                <td style="color:#333333; font-style:italic;">Col position in the matrix.</td> 
     1323                <td style="color:#333333; font-style:italic;"> 
     1324 
     1325not null,  
     1326                </td> 
     1327        </tr> 
     1328         
     1329        <!-- all the uniques --> 
     1330        <tr> 
     1331                <td colspan="2">primary key(id)</td> 
     1332                <td colspan="2">&nbsp;</td> 
     1333        </tr> 
     1334        <tr> 
     1335                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     1336                <td colspan="2">&nbsp;</td> 
     1337        </tr> 
     1338        <tr> 
     1339                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     1340                <td colspan="2">&nbsp;</td> 
     1341        </tr> 
     1342        <!-- all the indices --> 
     1343         
     1344</table> 
     1345*inherited field<br/> 
     1346<a href="#_top_of_page">go to top</a> 
     1347<p /> 
     1348<h3><a name="DecimalDataElement">DecimalDataElement</a>  
     1349</h3> 
     1350<p> 
     1351                                A DataElement for storing decimal data. 
     1352                         
     1353</p> 
     1354<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1355        <!-- table header --> 
     1356        <tr><th class="tablehead" colspan="7">DecimalDataElement 
     1357<br/><i> implements DataElement</i></th></tr>    
     1358        <!-- column headers --> 
     1359        <tr> 
     1360                <th>field</th> 
     1361                <th>type</th> 
     1362                <th>description</th> 
     1363                <th>constraints</th> 
     1364        </tr> 
     1365         
     1366        <!-- all the fields --> 
     1367        <tr  > 
     1368                <td style="color:#000000">Data</td> 
     1369                <td style="color:#000000">xref</td> 
     1370                <td style="color:#000000">Reference to the data this entity belongs to.</td> 
     1371                <td style="color:#000000"> 
     1372references(Data.id), 
     1373 
     1374not null,  
     1375                </td> 
     1376        </tr> 
     1377        <tr  > 
     1378                <td style="color:#000000">Col</td> 
     1379                <td style="color:#000000">xref</td> 
     1380                <td style="color:#000000">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     1381                <td style="color:#000000"> 
     1382references(DimensionElement.id), 
     1383 
     1384not null,  
     1385                </td> 
     1386        </tr> 
     1387        <tr  > 
     1388                <td style="color:#000000">Row</td> 
     1389                <td style="color:#000000">xref</td> 
     1390                <td style="color:#000000">References the DimensionElement on the other end of the relation.</td> 
     1391                <td style="color:#000000"> 
     1392references(DimensionElement.id), 
     1393 
     1394not null,  
     1395                </td> 
     1396        </tr> 
     1397        <tr  > 
     1398                <td style="color:#000000">RowIndex</td> 
     1399                <td style="color:#000000">int</td> 
     1400                <td style="color:#000000">Row position in the matrix.</td> 
     1401                <td style="color:#000000"> 
     1402 
     1403not null,  
     1404                </td> 
     1405        </tr> 
     1406        <tr  > 
     1407                <td style="color:#000000">ColIndex</td> 
     1408                <td style="color:#000000">int</td> 
     1409                <td style="color:#000000">Col position in the matrix.</td> 
     1410                <td style="color:#000000"> 
     1411 
     1412not null,  
     1413                </td> 
     1414        </tr> 
     1415        <tr  > 
     1416                <td style="color:#000000">Value</td> 
     1417                <td style="color:#000000">decimal</td> 
     1418                <td style="color:#000000">The value, e.g., correlation.</td> 
     1419                <td style="color:#000000"> 
     1420 
     1421 
     1422                </td> 
     1423        </tr> 
     1424         
     1425        <!-- all the uniques --> 
     1426        <tr> 
     1427                <td colspan="2">primary key(id)</td> 
     1428                <td colspan="2">&nbsp;</td> 
     1429        </tr> 
     1430        <tr> 
     1431                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     1432                <td colspan="2">&nbsp;</td> 
     1433        </tr> 
     1434        <tr> 
     1435                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     1436                <td colspan="2">&nbsp;</td> 
     1437        </tr> 
     1438        <tr> 
     1439                <td colspan="2">key(id)</td> 
     1440                <td colspan="2">&nbsp;</td> 
     1441        </tr> 
     1442        <!-- all the indices --> 
     1443         
     1444</table> 
     1445*inherited field<br/> 
     1446<a href="#_top_of_page">go to top</a> 
     1447<p /> 
     1448<h3><a name="TextDataElement">TextDataElement</a>  
     1449</h3> 
     1450<p>Store text data 
     1451</p> 
     1452<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1453        <!-- table header --> 
     1454        <tr><th class="tablehead" colspan="7">TextDataElement 
     1455<br/><i> implements DataElement</i></th></tr>    
     1456        <!-- column headers --> 
     1457        <tr> 
     1458                <th>field</th> 
     1459                <th>type</th> 
     1460                <th>description</th> 
     1461                <th>constraints</th> 
     1462        </tr> 
     1463         
     1464        <!-- all the fields --> 
     1465        <tr  > 
     1466                <td style="color:#000000">Data</td> 
     1467                <td style="color:#000000">xref</td> 
     1468                <td style="color:#000000">Reference to the data this entity belongs to.</td> 
     1469                <td style="color:#000000"> 
     1470references(Data.id), 
     1471 
     1472not null,  
     1473                </td> 
     1474        </tr> 
     1475        <tr  > 
     1476                <td style="color:#000000">Col</td> 
     1477                <td style="color:#000000">xref</td> 
     1478                <td style="color:#000000">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     1479                <td style="color:#000000"> 
     1480references(DimensionElement.id), 
     1481 
     1482not null,  
     1483                </td> 
     1484        </tr> 
     1485        <tr  > 
     1486                <td style="color:#000000">Row</td> 
     1487                <td style="color:#000000">xref</td> 
     1488                <td style="color:#000000">References the DimensionElement on the other end of the relation.</td> 
     1489                <td style="color:#000000"> 
     1490references(DimensionElement.id), 
     1491 
     1492not null,  
     1493                </td> 
     1494        </tr> 
     1495        <tr  > 
     1496                <td style="color:#000000">RowIndex</td> 
     1497                <td style="color:#000000">int</td> 
     1498                <td style="color:#000000">Row position in the matrix.</td> 
     1499                <td style="color:#000000"> 
     1500 
     1501not null,  
     1502                </td> 
     1503        </tr> 
     1504        <tr  > 
     1505                <td style="color:#000000">ColIndex</td> 
     1506                <td style="color:#000000">int</td> 
     1507                <td style="color:#000000">Col position in the matrix.</td> 
     1508                <td style="color:#000000"> 
     1509 
     1510not null,  
     1511                </td> 
     1512        </tr> 
     1513        <tr  > 
     1514                <td style="color:#000000">Value</td> 
     1515                <td style="color:#000000">text</td> 
     1516                <td style="color:#000000">The value, e.g., genotype strings like AA, BA, BB.</td> 
     1517                <td style="color:#000000"> 
     1518 
     1519 
     1520                </td> 
     1521        </tr> 
     1522         
     1523        <!-- all the uniques --> 
     1524        <tr> 
     1525                <td colspan="2">primary key(id)</td> 
     1526                <td colspan="2">&nbsp;</td> 
     1527        </tr> 
     1528        <tr> 
     1529                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     1530                <td colspan="2">&nbsp;</td> 
     1531        </tr> 
     1532        <tr> 
     1533                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     1534                <td colspan="2">&nbsp;</td> 
     1535        </tr> 
     1536        <tr> 
     1537                <td colspan="2">key(id)</td> 
     1538                <td colspan="2">&nbsp;</td> 
     1539        </tr> 
     1540        <!-- all the indices --> 
     1541         
     1542</table> 
     1543*inherited field<br/> 
     1544<a href="#_top_of_page">go to top</a> 
     1545<p /> 
     1546<h3><a name="Describable">Describable</a>  
     1547</h3> 
     1548<p></p> 
     1549<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1550        <!-- table header --> 
     1551        <tr><th class="tablehead" colspan="7">Describable 
     1552</th></tr>       
     1553        <!-- column headers --> 
     1554        <tr> 
     1555                <th>field</th> 
     1556                <th>type</th> 
     1557                <th>description</th> 
     1558                <th>constraints</th> 
     1559        </tr> 
     1560         
     1561        <!-- all the fields --> 
     1562        <tr  > 
     1563                <td style="color:#000000">id</td> 
     1564                <td style="color:#000000">int</td> 
     1565                <td style="color:#000000">automatically generated id-field</td> 
     1566                <td style="color:#000000"> 
     1567 
     1568not null,  
     1569auto,           </td> 
     1570        </tr> 
     1571         
     1572        <!-- all the uniques --> 
     1573        <tr> 
     1574                <td colspan="2">primary key(id)</td> 
     1575                <td colspan="2">&nbsp;</td> 
     1576        </tr> 
     1577        <!-- all the indices --> 
     1578         
     1579</table> 
     1580*inherited field<br/> 
     1581<a href="#_top_of_page">go to top</a> 
     1582<p /> 
     1583<h3><a name="Identifiable">Identifiable</a>  
     1584</h3> 
     1585<p></p> 
     1586<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1587        <!-- table header --> 
     1588        <tr><th class="tablehead" colspan="7">Identifiable<br/><i> extends Describable</i> 
     1589</th></tr>       
     1590        <!-- column headers --> 
     1591        <tr> 
     1592                <th>field</th> 
     1593                <th>type</th> 
     1594                <th>description</th> 
     1595                <th>constraints</th> 
     1596        </tr> 
     1597         
     1598        <!-- all the fields --> 
     1599        <tr  > 
     1600                <td style="color:#000000">name</td> 
     1601                <td style="color:#000000">string</td> 
     1602                <td style="color:#000000">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1603                <td style="color:#000000"> 
     1604 
     1605not null,  
     1606                </td> 
     1607        </tr> 
     1608         
     1609        <!-- all the uniques --> 
     1610        <tr> 
     1611                <td colspan="2">primary key(id)</td> 
     1612                <td colspan="2">&nbsp;</td> 
     1613        </tr> 
     1614        <!-- all the indices --> 
     1615         
     1616</table> 
     1617*inherited field<br/> 
     1618<a href="#_top_of_page">go to top</a> 
     1619<p /> 
     1620<h3><a name="FugeData">FugeData</a>  
     1621</h3> 
     1622<p></p> 
     1623<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1624        <!-- table header --> 
     1625        <tr><th class="tablehead" colspan="7">FugeData<br/><i> extends Identifiable</i> 
     1626</th></tr>       
     1627        <!-- column headers --> 
     1628        <tr> 
     1629                <th>field</th> 
     1630                <th>type</th> 
     1631                <th>description</th> 
     1632                <th>constraints</th> 
     1633        </tr> 
     1634         
     1635        <!-- all the fields --> 
     1636        <tr  > 
     1637                <td style="color:#333333; font-style:italic;">name*</td> 
     1638                <td style="color:#333333; font-style:italic;">string</td> 
     1639                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1640                <td style="color:#333333; font-style:italic;"> 
     1641 
     1642not null,  
     1643                </td> 
     1644        </tr> 
     1645         
     1646        <!-- all the uniques --> 
     1647        <tr> 
     1648                <td colspan="2">primary key(id)</td> 
     1649                <td colspan="2">&nbsp;</td> 
     1650        </tr> 
     1651        <!-- all the indices --> 
     1652         
     1653</table> 
     1654*inherited field<br/> 
     1655<a href="#_top_of_page">go to top</a> 
     1656<p /> 
     1657<h3><a name="Data">Data</a>  
     1658</h3> 
     1659<p> 
     1660                                Generic structure for describing data matrices such as 
     1661                                genotype result, gene expression measurement, QTL 
     1662                                calculation, etc. 
     1663                         
     1664</p> 
     1665<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1666        <!-- table header --> 
     1667        <tr><th class="tablehead" colspan="7">Data<br/><i> extends FugeData</i> 
     1668</th></tr>       
     1669        <!-- column headers --> 
     1670        <tr> 
     1671                <th>field</th> 
     1672                <th>type</th> 
     1673                <th>description</th> 
     1674                <th>constraints</th> 
     1675        </tr> 
     1676         
     1677        <!-- all the fields --> 
     1678        <tr  > 
     1679                <td style="color:#000000">RowType</td> 
     1680                <td style="color:#000000">enum</td> 
     1681                <td style="color:#000000">Type of the columns of this matrix. Each column refers to a Trait or Subject (DimensionElement).</td> 
     1682                <td style="color:#000000"> 
     1683 
     1684not null,  
     1685                enum_options: 'Patient', 'Phenotype' 
     1686                </td> 
     1687        </tr> 
     1688        <tr  > 
     1689                <td style="color:#000000">ColType</td> 
     1690                <td style="color:#000000">enum</td> 
     1691                <td style="color:#000000">Type of the rows of this matrix. Each row refers to a Trait or Subject (DimensionElement)</td> 
     1692                <td style="color:#000000"> 
     1693 
     1694not null,  
     1695                enum_options: 'Patient', 'Phenotype' 
     1696                </td> 
     1697        </tr> 
     1698        <tr  > 
     1699                <td style="color:#000000">ValueType</td> 
     1700                <td style="color:#000000">enum</td> 
     1701                <td style="color:#000000">Type of the values of this matrix. E.g. text strings or decimal numbers.</td> 
     1702                <td style="color:#000000"> 
     1703 
     1704not null,  
     1705                enum_options: 'Text', 'Decimal' 
     1706                </td> 
     1707        </tr> 
     1708        <tr  > 
     1709                <td style="color:#000000">TotalRows</td> 
     1710                <td style="color:#000000">int</td> 
     1711                <td style="color:#000000">&nbsp;</td> 
     1712                <td style="color:#000000"> 
     1713 
     1714not null,  
     1715                </td> 
     1716        </tr> 
     1717        <tr  > 
     1718                <td style="color:#000000">TotalCols</td> 
     1719                <td style="color:#000000">int</td> 
     1720                <td style="color:#000000">&nbsp;</td> 
     1721                <td style="color:#000000"> 
     1722 
     1723not null,  
     1724                </td> 
     1725        </tr> 
     1726         
     1727        <!-- all the uniques --> 
     1728        <tr> 
     1729                <td colspan="2">primary key(id)</td> 
     1730                <td colspan="2">&nbsp;</td> 
     1731        </tr> 
     1732        <tr> 
     1733                <td colspan="2">key(name)</td> 
     1734                <td colspan="2">&nbsp;</td> 
     1735        </tr> 
     1736        <!-- all the indices --> 
     1737         
     1738</table> 
     1739*inherited field<br/> 
     1740<a href="#_top_of_page">go to top</a> 
     1741<p /> 
     1742<h3><a name="FugeDimensionElement">FugeDimensionElement</a>  
     1743</h3> 
     1744<p></p> 
     1745<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1746        <!-- table header --> 
     1747        <tr><th class="tablehead" colspan="7">FugeDimensionElement<br/><i> extends Identifiable</i> 
     1748</th></tr>       
     1749        <!-- column headers --> 
     1750        <tr> 
     1751                <th>field</th> 
     1752                <th>type</th> 
     1753                <th>description</th> 
     1754                <th>constraints</th> 
     1755        </tr> 
     1756         
     1757        <!-- all the fields --> 
     1758        <tr  > 
     1759                <td style="color:#333333; font-style:italic;">name*</td> 
     1760                <td style="color:#333333; font-style:italic;">string</td> 
     1761                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1762                <td style="color:#333333; font-style:italic;"> 
     1763 
     1764not null,  
     1765                </td> 
     1766        </tr> 
     1767         
     1768        <!-- all the uniques --> 
     1769        <tr> 
     1770                <td colspan="2">primary key(id)</td> 
     1771                <td colspan="2">&nbsp;</td> 
     1772        </tr> 
     1773        <!-- all the indices --> 
     1774         
     1775</table> 
     1776*inherited field<br/> 
     1777<a href="#_top_of_page">go to top</a> 
     1778<p /> 
     1779<h3><a name="FugeInvestigation">FugeInvestigation</a>  
     1780</h3> 
     1781<p></p> 
     1782<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1783        <!-- table header --> 
     1784        <tr><th class="tablehead" colspan="7">FugeInvestigation<br/><i> extends Identifiable</i> 
     1785</th></tr>       
     1786        <!-- column headers --> 
     1787        <tr> 
     1788                <th>field</th> 
     1789                <th>type</th> 
     1790                <th>description</th> 
     1791                <th>constraints</th> 
     1792        </tr> 
     1793         
     1794        <!-- all the fields --> 
     1795        <tr  > 
     1796                <td style="color:#333333; font-style:italic;">name*</td> 
     1797                <td style="color:#333333; font-style:italic;">string</td> 
     1798                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1799                <td style="color:#333333; font-style:italic;"> 
     1800 
     1801not null,  
     1802                </td> 
     1803        </tr> 
     1804        <tr  > 
     1805                <td style="color:#000000">start</td> 
     1806                <td style="color:#000000">datetime</td> 
     1807                <td style="color:#000000">The start point of the investigation. (n.b. removed null constraint)</td> 
     1808                <td style="color:#000000"> 
     1809 
     1810 
     1811                </td> 
     1812        </tr> 
     1813        <tr  > 
     1814                <td style="color:#000000">end</td> 
     1815                <td style="color:#000000">datetime</td> 
     1816                <td style="color:#000000">The end point of the investigation. (n.b. removed null constraint)</td> 
     1817                <td style="color:#000000"> 
     1818 
     1819 
     1820                </td> 
     1821        </tr> 
     1822         
     1823        <!-- all the uniques --> 
     1824        <tr> 
     1825                <td colspan="2">primary key(id)</td> 
     1826                <td colspan="2">&nbsp;</td> 
     1827        </tr> 
     1828        <!-- all the indices --> 
     1829         
     1830</table> 
     1831*inherited field<br/> 
     1832<a href="#_top_of_page">go to top</a> 
     1833<p /> 
     1834<h3><a name="Investigation">Investigation</a>  
     1835</h3> 
     1836<p></p> 
     1837<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1838        <!-- table header --> 
     1839        <tr><th class="tablehead" colspan="7">Investigation<br/><i> extends FugeInvestigation</i> 
     1840</th></tr>       
     1841        <!-- column headers --> 
     1842        <tr> 
     1843                <th>field</th> 
     1844                <th>type</th> 
     1845                <th>description</th> 
     1846                <th>constraints</th> 
     1847        </tr> 
     1848         
     1849        <!-- all the fields --> 
     1850        <tr  > 
     1851                <td style="color:#333333; font-style:italic;">start*</td> 
     1852                <td style="color:#333333; font-style:italic;">datetime</td> 
     1853                <td style="color:#333333; font-style:italic;">The start point of the investigation. (n.b. removed null constraint)</td> 
     1854                <td style="color:#333333; font-style:italic;"> 
     1855 
     1856 
     1857                </td> 
     1858        </tr> 
     1859        <tr  > 
     1860                <td style="color:#333333; font-style:italic;">end*</td> 
     1861                <td style="color:#333333; font-style:italic;">datetime</td> 
     1862                <td style="color:#333333; font-style:italic;">The end point of the investigation. (n.b. removed null constraint)</td> 
     1863                <td style="color:#333333; font-style:italic;"> 
     1864 
     1865 
     1866                </td> 
     1867        </tr> 
     1868         
     1869        <!-- all the uniques --> 
     1870        <tr> 
     1871                <td colspan="2">primary key(id)</td> 
     1872                <td colspan="2">&nbsp;</td> 
     1873        </tr> 
     1874        <tr> 
     1875                <td colspan="2">key(name)</td> 
     1876                <td colspan="2">&nbsp;</td> 
     1877        </tr> 
     1878        <!-- all the indices --> 
     1879         
     1880</table> 
     1881*inherited field<br/> 
     1882<a href="#_top_of_page">go to top</a> 
     1883<p /> 
     1884<h3><a name="DimensionElement">DimensionElement</a>  
     1885</h3> 
     1886<p></p> 
     1887<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1888        <!-- table header --> 
     1889        <tr><th class="tablehead" colspan="7">DimensionElement<br/><i> extends FugeDimensionElement</i> 
     1890</th></tr>       
     1891        <!-- column headers --> 
     1892        <tr> 
     1893                <th>field</th> 
     1894                <th>type</th> 
     1895                <th>description</th> 
     1896                <th>constraints</th> 
     1897        </tr> 
     1898         
     1899        <!-- all the fields --> 
     1900        <tr  > 
     1901                <td style="color:#000000">Investigation</td> 
     1902                <td style="color:#000000">xref</td> 
     1903                <td style="color:#000000">Reference to the investigation this belongs to.</td> 
     1904                <td style="color:#000000"> 
     1905references(Investigation.id), 
     1906 
     1907not null,  
     1908                </td> 
     1909        </tr> 
     1910         
     1911        <!-- all the uniques --> 
     1912        <tr> 
     1913                <td colspan="2">primary key(id)</td> 
     1914                <td colspan="2">&nbsp;</td> 
     1915        </tr> 
     1916        <tr> 
     1917                <td colspan="2">key(name, Investigation, Type)</td> 
     1918                <td colspan="2">&nbsp;</td> 
     1919        </tr> 
     1920        <!-- all the indices --> 
     1921         
     1922</table> 
     1923*inherited field<br/> 
     1924<a href="#_top_of_page">go to top</a> 
     1925<p /> 
     1926<br/> 
     1927<br/> 
     1928 
     1929<h1>Entities:</h1> 
     1930<h3><a name="Role">Role</a>  
     1931</h3> 
     1932<p></p> 
     1933<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1934        <!-- table header --> 
     1935        <tr><th class="tablehead" colspan="7">Role 
     1936</th></tr>       
     1937        <!-- column headers --> 
     1938        <tr> 
     1939                <th>field</th> 
     1940                <th>type</th> 
     1941                <th>description</th> 
     1942                <th>constraints</th> 
     1943        </tr> 
     1944         
     1945        <!-- all the fields --> 
     1946        <tr  > 
     1947                <td style="color:#000000">id</td> 
     1948                <td style="color:#000000">int</td> 
     1949                <td style="color:#000000">&nbsp;</td> 
     1950                <td style="color:#000000"> 
     1951 
     1952not null,  
     1953auto,           </td> 
     1954        </tr> 
     1955        <tr  > 
     1956                <td style="color:#000000">name</td> 
     1957                <td style="color:#000000">string</td> 
     1958                <td style="color:#000000">&nbsp;</td> 
     1959                <td style="color:#000000"> 
     1960 
     1961not null,  
     1962                </td> 
     1963        </tr> 
     1964        <tr  > 
     1965                <td style="color:#000000">superuser</td> 
     1966                <td style="color:#000000">bool</td> 
     1967                <td style="color:#000000">&nbsp;</td> 
     1968                <td style="color:#000000"> 
     1969 
     1970not null,  
     1971                </td> 
     1972        </tr> 
     1973         
     1974        <!-- all the uniques --> 
     1975        <tr> 
     1976                <td colspan="2">primary key(id)</td> 
     1977                <td colspan="2">&nbsp;</td> 
     1978        </tr> 
     1979        <tr> 
     1980                <td colspan="2">key(name)</td> 
     1981                <td colspan="2">&nbsp;</td> 
     1982        </tr> 
     1983        <!-- all the indices --> 
     1984         
     1985</table> 
     1986*inherited field<br/> 
     1987<a href="#_top_of_page">go to top</a> 
     1988<p /> 
     1989<h3><a name="User">User</a>  
     1990</h3> 
     1991<p></p> 
     1992<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1993        <!-- table header --> 
     1994        <tr><th class="tablehead" colspan="7">User 
     1995</th></tr>       
     1996        <!-- column headers --> 
     1997        <tr> 
     1998                <th>field</th> 
     1999                <th>type</th> 
     2000                <th>description</th> 
     2001                <th>constraints</th> 
     2002        </tr> 
     2003         
     2004        <!-- all the fields --> 
     2005        <tr  > 
     2006                <td style="color:#000000">id</td> 
     2007                <td style="color:#000000">int</td> 
     2008                <td style="color:#000000">&nbsp;</td> 
     2009                <td style="color:#000000"> 
     2010 
     2011not null,  
     2012auto,           </td> 
     2013        </tr> 
     2014        <tr  > 
     2015                <td style="color:#000000">name</td> 
     2016                <td style="color:#000000">string</td> 
     2017                <td style="color:#000000">&nbsp;</td> 
     2018                <td style="color:#000000"> 
     2019 
     2020not null,  
     2021                </td> 
     2022        </tr> 
     2023        <tr  > 
     2024                <td style="color:#000000">password</td> 
     2025                <td style="color:#000000">string</td> 
     2026                <td style="color:#000000">&nbsp;</td> 
     2027                <td style="color:#000000"> 
     2028 
     2029not null,  
     2030                </td> 
     2031        </tr> 
     2032        <tr  > 
     2033                <td style="color:#000000">roles</td> 
     2034                <td style="color:#000000">mref</td> 
     2035                <td style="color:#000000">Roles that this user has adopted. Its rights are inherited.</td> 
     2036                <td style="color:#000000"> 
     2037references-many(Role.id), 
     2038 
     2039                </td> 
     2040        </tr> 
     2041         
     2042        <!-- all the uniques --> 
     2043        <tr> 
     2044                <td colspan="2">primary key(id)</td> 
     2045                <td colspan="2">&nbsp;</td> 
     2046        </tr> 
     2047        <tr> 
     2048                <td colspan="2">key(name)</td> 
     2049                <td colspan="2">&nbsp;</td> 
     2050        </tr> 
     2051        <!-- all the indices --> 
     2052         
     2053</table> 
     2054*inherited field<br/> 
     2055<a href="#_top_of_page">go to top</a> 
     2056<p /> 
     2057<h3><a name="Entity">Entity</a>  
     2058</h3> 
     2059<p>Catalog of entity names 
     2060</p> 
     2061<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2062        <!-- table header --> 
     2063        <tr><th class="tablehead" colspan="7">Entity 
     2064</th></tr>       
     2065        <!-- column headers --> 
     2066        <tr> 
     2067                <th>field</th> 
     2068                <th>type</th> 
     2069                <th>description</th> 
     2070                <th>constraints</th> 
     2071        </tr> 
     2072         
     2073        <!-- all the fields --> 
     2074        <tr  > 
     2075                <td style="color:#000000">id</td> 
     2076                <td style="color:#000000">int</td> 
     2077                <td style="color:#000000">&nbsp;</td> 
     2078                <td style="color:#000000"> 
     2079 
     2080not null,  
     2081auto,           </td> 
     2082        </tr> 
     2083        <tr  > 
     2084                <td style="color:#000000">className</td> 
     2085                <td style="color:#000000">string</td> 
     2086                <td style="color:#000000">Full name of the data type</td> 
     2087                <td style="color:#000000"> 
     2088 
     2089not null,  
     2090                </td> 
     2091        </tr> 
     2092         
     2093        <!-- all the uniques --> 
     2094        <tr> 
     2095                <td colspan="2">primary key(id)</td> 
     2096                <td colspan="2">&nbsp;</td> 
     2097        </tr> 
     2098        <!-- all the indices --> 
     2099         
     2100</table> 
     2101*inherited field<br/> 
     2102<a href="#_top_of_page">go to top</a> 
     2103<p /> 
     2104<h3><a name="RoleEntityPermission">RoleEntityPermission</a>  
     2105</h3> 
     2106<p>Assign rights on entities to roles. 
     2107</p> 
     2108<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2109        <!-- table header --> 
     2110        <tr><th class="tablehead" colspan="7">RoleEntityPermission 
     2111</th></tr>       
     2112        <!-- column headers --> 
     2113        <tr> 
     2114                <th>field</th> 
     2115                <th>type</th> 
     2116                <th>description</th> 
     2117                <th>constraints</th> 
     2118        </tr> 
     2119         
     2120        <!-- all the fields --> 
     2121        <tr  > 
     2122                <td style="color:#000000">id</td> 
     2123                <td style="color:#000000">int</td> 
     2124                <td style="color:#000000">&nbsp;</td> 
     2125                <td style="color:#000000"> 
     2126 
     2127not null,  
     2128auto,           </td> 
     2129        </tr> 
     2130        <tr  > 
     2131                <td style="color:#000000">role</td> 
     2132                <td style="color:#000000">xref</td> 
     2133                <td style="color:#000000">&nbsp;</td> 
     2134                <td style="color:#000000"> 
     2135references(Role.id), 
     2136 
     2137not null,  
     2138                </td> 
     2139        </tr> 
     2140        <tr  > 
     2141                <td style="color:#000000">entity</td> 
     2142                <td style="color:#000000">xref</td> 
     2143                <td style="color:#000000">&nbsp;</td> 
     2144                <td style="color:#000000"> 
     2145references(Entity.id), 
     2146 
     2147not null,  
     2148                </td> 
     2149        </tr> 
     2150        <tr  > 
     2151                <td style="color:#000000">permission</td> 
     2152                <td style="color:#000000">enum</td> 
     2153                <td style="color:#000000">&nbsp;</td> 
     2154                <td style="color:#000000"> 
     2155 
     2156not null,  
     2157                enum_options: 'read', 'edit' 
     2158                </td> 
     2159        </tr> 
     2160         
     2161        <!-- all the uniques --> 
     2162        <tr> 
     2163                <td colspan="2">primary key(id)</td> 
     2164                <td colspan="2">&nbsp;</td> 
     2165        </tr> 
     2166        <!-- all the indices --> 
     2167         
     2168</table> 
     2169*inherited field<br/> 
     2170<a href="#_top_of_page">go to top</a> 
     2171<p /> 
     2172<h3><a name="Consequence">Consequence</a>  
     2173</h3> 
     2174<p></p> 
     2175<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2176        <!-- table header --> 
     2177        <tr><th class="tablehead" colspan="7">Consequence 
     2178</th></tr>       
     2179        <!-- column headers --> 
     2180        <tr> 
     2181                <th>field</th> 
     2182                <th>type</th> 
     2183                <th>description</th> 
     2184                <th>constraints</th> 
     2185        </tr> 
     2186         
     2187        <!-- all the fields --> 
     2188        <tr  > 
     2189                <td style="color:#000000">id</td> 
     2190                <td style="color:#000000">int</td> 
     2191                <td style="color:#000000">&nbsp;</td> 
     2192                <td style="color:#000000"> 
     2193 
     2194not null,  
     2195auto,           </td> 
     2196        </tr> 
     2197        <tr  > 
     2198                <td style="color:#000000">consequence</td> 
     2199                <td style="color:#000000">string</td> 
     2200                <td style="color:#000000">&nbsp;</td> 
     2201                <td style="color:#000000"> 
     2202 
     2203not null,  
     2204                </td> 
     2205        </tr> 
     2206         
     2207        <!-- all the uniques --> 
     2208        <tr> 
     2209                <td colspan="2">primary key(id)</td> 
     2210                <td colspan="2">&nbsp;</td> 
     2211        </tr> 
     2212        <!-- all the indices --> 
     2213         
     2214</table> 
     2215*inherited field<br/> 
     2216<a href="#_top_of_page">go to top</a> 
     2217<p /> 
     2218<h3><a name="Amino_acid">Amino_acid</a>  
     2219</h3> 
     2220<p></p> 
     2221<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2222        <!-- table header --> 
     2223        <tr><th class="tablehead" colspan="7">Amino_acid 
     2224</th></tr>       
     2225        <!-- column headers --> 
     2226        <tr> 
     2227                <th>field</th> 
     2228                <th>type</th> 
     2229                <th>description</th> 
     2230                <th>constraints</th> 
     2231        </tr> 
     2232         
     2233        <!-- all the fields --> 
     2234        <tr  > 
     2235                <td style="color:#000000">id</td> 
     2236                <td style="color:#000000">int</td> 
     2237                <td style="color:#000000">&nbsp;</td> 
     2238                <td style="color:#000000"> 
     2239 
     2240not null,  
     2241auto,           </td> 
     2242        </tr> 
     2243        <tr  > 
     2244                <td style="color:#000000">codon</td> 
     2245                <td style="color:#000000">string</td> 
     2246                <td style="color:#000000">&nbsp;</td> 
     2247                <td style="color:#000000"> 
     2248 
     2249not null,  
     2250                </td> 
     2251        </tr> 
     2252        <tr  > 
     2253                <td style="color:#000000">amino_acid</td> 
     2254                <td style="color:#000000">string</td> 
     2255                <td style="color:#000000">&nbsp;</td> 
     2256                <td style="color:#000000"> 
     2257 
     2258not null,  
     2259                </td> 
     2260        </tr> 
     2261         
     2262        <!-- all the uniques --> 
     2263        <tr> 
     2264                <td colspan="2">primary key(id)</td> 
     2265                <td colspan="2">&nbsp;</td> 
     2266        </tr> 
     2267        <!-- all the indices --> 
     2268         
     2269</table> 
     2270*inherited field<br/> 
     2271<a href="#_top_of_page">go to top</a> 
     2272<p /> 
     2273<h3><a name="RNA">RNA</a>  
     2274</h3> 
     2275<p></p> 
     2276<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2277        <!-- table header --> 
     2278        <tr><th class="tablehead" colspan="7">RNA 
     2279</th></tr>       
     2280        <!-- column headers --> 
     2281        <tr> 
     2282                <th>field</th> 
     2283                <th>type</th> 
     2284                <th>description</th> 
     2285                <th>constraints</th> 
     2286        </tr> 
     2287         
     2288        <!-- all the fields --> 
     2289        <tr  > 
     2290                <td style="color:#000000">id</td> 
     2291                <td style="color:#000000">int</td> 
     2292                <td style="color:#000000">&nbsp;</td> 
     2293                <td style="color:#000000"> 
     2294 
     2295not null,  
     2296auto,           </td> 
     2297        </tr> 
     2298        <tr  > 
     2299                <td style="color:#000000">nucleotides</td> 
     2300                <td style="color:#000000">string</td> 
     2301                <td style="color:#000000">&nbsp;</td> 
     2302                <td style="color:#000000"> 
     2303 
     2304not null,  
     2305                </td> 
     2306        </tr> 
     2307        <tr  > 
     2308                <td style="color:#000000">exon</td> 
     2309                <td style="color:#000000">int</td> 
     2310                <td style="color:#000000">&nbsp;</td> 
     2311                <td style="color:#000000"> 
     2312 
     2313not null,  
     2314                </td> 
     2315        </tr> 
     2316        <tr  > 
     2317                <td style="color:#000000">Codon</td> 
     2318                <td style="color:#000000">xref</td> 
     2319                <td style="color:#000000">&nbsp;</td> 
     2320                <td style="color:#000000"> 
     2321references(Amino_acid.id), 
     2322 
     2323not null,  
     2324                </td> 
     2325        </tr> 
     2326         
     2327        <!-- all the uniques --> 
     2328        <tr> 
     2329                <td colspan="2">primary key(id)</td> 
     2330                <td colspan="2">&nbsp;</td> 
     2331        </tr> 
     2332        <!-- all the indices --> 
     2333         
     2334</table> 
     2335*inherited field<br/> 
     2336<a href="#_top_of_page">go to top</a> 
     2337<p /> 
     2338<h3><a name="Mutations">Mutations</a>  
     2339</h3> 
     2340<p> Here are all mutations known 
     2341</p> 
     2342<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2343        <!-- table header --> 
     2344        <tr><th class="tablehead" colspan="7">Mutations 
     2345</th></tr>       
     2346        <!-- column headers --> 
     2347        <tr> 
     2348                <th>field</th> 
     2349                <th>type</th> 
     2350                <th>description</th> 
     2351                <th>constraints</th> 
     2352        </tr> 
     2353         
     2354        <!-- all the fields --> 
     2355        <tr  > 
     2356                <td style="color:#000000">id</td> 
     2357                <td style="color:#000000">int</td> 
     2358                <td style="color:#000000">&nbsp;</td> 
     2359                <td style="color:#000000"> 
     2360 
     2361not null,  
     2362auto,           </td> 
     2363        </tr> 
     2364        <tr  > 
     2365                <td style="color:#000000">nucleotide_change</td> 
     2366                <td style="color:#000000">string</td> 
     2367                <td style="color:#000000">&nbsp;</td> 
     2368                <td style="color:#000000"> 
     2369 
     2370not null,  
     2371                </td> 
     2372        </tr> 
     2373        <tr  > 
     2374                <td style="color:#000000">amino_acid</td> 
     2375                <td style="color:#000000">string</td> 
     2376                <td style="color:#000000">&nbsp;</td> 
     2377                <td style="color:#000000"> 
     2378 
     2379not null,  
     2380                </td> 
     2381        </tr> 
     2382        <tr  > 
     2383                <td style="color:#000000">consequence</td> 
     2384                <td style="color:#000000">xref</td> 
     2385                <td style="color:#000000">&nbsp;</td> 
     2386                <td style="color:#000000"> 
     2387references(Consequence.id), 
     2388 
     2389 
     2390                </td> 
     2391        </tr> 
     2392         
     2393        <!-- all the uniques --> 
     2394        <tr> 
     2395                <td colspan="2">primary key(id)</td> 
     2396                <td colspan="2">&nbsp;</td> 
     2397        </tr> 
     2398        <tr> 
     2399                <td colspan="2">key(nucleotide_change)</td> 
     2400                <td colspan="2">&nbsp;</td> 
     2401        </tr> 
     2402        <!-- all the indices --> 
     2403         
     2404</table> 
     2405*inherited field<br/> 
     2406<a href="#_top_of_page">go to top</a> 
     2407<p /> 
     2408<h3><a name="Contact">Contact</a>  
     2409</h3> 
     2410<p></p> 
     2411<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2412        <!-- table header --> 
     2413        <tr><th class="tablehead" colspan="7">Contact 
     2414</th></tr>       
     2415        <!-- column headers --> 
     2416        <tr> 
     2417                <th>field</th> 
     2418                <th>type</th> 
     2419                <th>description</th> 
     2420                <th>constraints</th> 
     2421        </tr> 
     2422         
     2423        <!-- all the fields --> 
     2424        <tr  > 
     2425                <td style="color:#000000">id</td> 
     2426                <td style="color:#000000">int</td> 
     2427                <td style="color:#000000">&nbsp;</td> 
     2428                <td style="color:#000000"> 
     2429 
     2430not null,  
     2431auto,           </td> 
     2432        </tr> 
     2433        <tr  > 
     2434                <td style="color:#000000">name</td> 
     2435                <td style="color:#000000">string</td> 
     2436                <td style="color:#000000">&nbsp;</td> 
     2437                <td style="color:#000000"> 
     2438 
     2439not null,  
     2440                </td> 
     2441        </tr> 
     2442        <tr  > 
     2443                <td style="color:#000000">address</td> 
     2444                <td style="color:#000000">string</td> 
     2445                <td style="color:#000000">&nbsp;</td> 
     2446                <td style="color:#000000"> 
     2447 
     2448 
     2449                </td> 
     2450        </tr> 
     2451        <tr  > 
     2452                <td style="color:#000000">tel</td> 
     2453                <td style="color:#000000">string</td> 
     2454                <td style="color:#000000">&nbsp;</td> 
     2455                <td style="color:#000000"> 
     2456 
     2457 
     2458                </td> 
     2459        </tr> 
     2460         
     2461        <!-- all the uniques --> 
     2462        <tr> 
     2463                <td colspan="2">primary key(id)</td> 
     2464                <td colspan="2">&nbsp;</td> 
     2465        </tr> 
     2466        <tr> 
     2467                <td colspan="2">key(name)</td> 
     2468                <td colspan="2">&nbsp;</td> 
     2469        </tr> 
     2470        <!-- all the indices --> 
     2471         
     2472</table> 
     2473*inherited field<br/> 
     2474<a href="#_top_of_page">go to top</a> 
     2475<p /> 
     2476<h3><a name="Gender">Gender</a>  
     2477</h3> 
     2478<p></p> 
     2479<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2480        <!-- table header --> 
     2481        <tr><th class="tablehead" colspan="7">Gender 
     2482</th></tr>       
     2483        <!-- column headers --> 
     2484        <tr> 
     2485                <th>field</th> 
     2486                <th>type</th> 
     2487                <th>description</th> 
     2488                <th>constraints</th> 
     2489        </tr> 
     2490         
     2491        <!-- all the fields --> 
     2492        <tr  > 
     2493                <td style="color:#000000">id</td> 
     2494                <td style="color:#000000">int</td> 
     2495                <td style="color:#000000">&nbsp;</td> 
     2496                <td style="color:#000000"> 
     2497 
     2498not null,  
     2499auto,           </td> 
     2500        </tr> 
     2501        <tr  > 
     2502                <td style="color:#000000">name</td> 
     2503                <td style="color:#000000">string</td> 
     2504                <td style="color:#000000">&nbsp;</td> 
     2505                <td style="color:#000000"> 
     2506 
     2507not null,  
     2508                </td> 
     2509        </tr> 
     2510         
     2511        <!-- all the uniques --> 
     2512        <tr> 
     2513                <td colspan="2">primary key(id)</td> 
     2514                <td colspan="2">&nbsp;</td> 
     2515        </tr> 
     2516        <!-- all the indices --> 
     2517         
     2518</table> 
     2519*inherited field<br/> 
     2520<a href="#_top_of_page">go to top</a> 
     2521<p /> 
     2522<h3><a name="Patient">Patient</a>  
     2523</h3> 
     2524<p></p> 
     2525<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2526        <!-- table header --> 
     2527        <tr><th class="tablehead" colspan="7">Patient 
     2528</th></tr>       
     2529        <!-- column headers --> 
     2530        <tr> 
     2531                <th>field</th> 
     2532                <th>type</th> 
     2533                <th>description</th> 
     2534                <th>constraints</th> 
     2535        </tr> 
     2536         
     2537        <!-- all the fields --> 
     2538        <tr  > 
     2539                <td style="color:#000000">id</td> 
     2540                <td style="color:#000000">int</td> 
     2541                <td style="color:#000000">&nbsp;</td> 
     2542                <td style="color:#000000"> 
     2543 
     2544not null,  
     2545auto,           </td> 
     2546        </tr> 
     2547        <tr  > 
     2548                <td style="color:#000000">name</td> 
     2549                <td style="color:#000000">string</td> 
     2550                <td style="color:#000000">&nbsp;</td> 
     2551                <td style="color:#000000"> 
     2552 
     2553not null,  
     2554                </td> 
     2555        </tr> 
     2556        <tr  > 
     2557                <td style="color:#000000">age</td> 
     2558                <td style="color:#000000">int</td> 
     2559                <td style="color:#000000">&nbsp;</td> 
     2560                <td style="color:#000000"> 
     2561 
     2562 
     2563                </td> 
     2564        </tr> 
     2565        <tr  > 
     2566                <td style="color:#000000">alive</td> 
     2567                <td style="color:#000000">bool</td> 
     2568                <td style="color:#000000">&nbsp;</td> 
     2569                <td style="color:#000000"> 
     2570 
     2571not null,  
     2572                </td> 
     2573        </tr> 
     2574        <tr  > 
     2575                <td style="color:#000000">gender</td> 
     2576                <td style="color:#000000">xref</td> 
     2577                <td style="color:#000000">&nbsp;</td> 
     2578                <td style="color:#000000"> 
     2579references(Gender.id), 
     2580 
     2581not null,  
     2582                </td> 
     2583        </tr> 
     2584        <tr  > 
     2585                <td style="color:#000000">id_mutation1</td> 
     2586                <td style="color:#000000">xref</td> 
     2587                <td style="color:#000000">&nbsp;</td> 
     2588                <td style="color:#000000"> 
     2589references(Mutations.id), 
     2590 
     2591 
     2592                </td> 
     2593        </tr> 
     2594        <tr  > 
     2595                <td style="color:#000000">id_mutation2</td> 
     2596                <td style="color:#000000">xref</td> 
     2597                <td style="color:#000000">&nbsp;</td> 
     2598                <td style="color:#000000"> 
     2599references(Mutations.id), 
     2600 
     2601 
     2602                </td> 
     2603        </tr> 
     2604         
     2605        <!-- all the uniques --> 
     2606        <tr> 
     2607                <td colspan="2">primary key(id)</td> 
     2608                <td colspan="2">&nbsp;</td> 
     2609        </tr> 
     2610        <!-- all the indices --> 
     2611         
     2612</table> 
     2613*inherited field<br/> 
     2614<a href="#_top_of_page">go to top</a> 
     2615<p /> 
     2616<h3><a name="Phenotype">Phenotype</a>  
     2617</h3> 
     2618<p></p> 
     2619<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2620        <!-- table header --> 
     2621        <tr><th class="tablehead" colspan="7">Phenotype 
     2622</th></tr>       
     2623        <!-- column headers --> 
     2624        <tr> 
     2625                <th>field</th> 
     2626                <th>type</th> 
     2627                <th>description</th> 
     2628                <th>constraints</th> 
     2629        </tr> 
     2630         
     2631        <!-- all the fields --> 
     2632        <tr  > 
     2633                <td style="color:#000000">id</td> 
     2634                <td style="color:#000000">int</td> 
     2635                <td style="color:#000000">&nbsp;</td> 
     2636                <td style="color:#000000"> 
     2637 
     2638not null,  
     2639auto,           </td> 
     2640        </tr> 
     2641        <tr  > 
     2642                <td style="color:#000000">Description</td> 
     2643                <td style="color:#000000">text</td> 
     2644                <td style="color:#000000">&nbsp;</td> 
     2645                <td style="color:#000000"> 
     2646 
     2647not null,  
     2648                </td> 
     2649        </tr> 
     2650        <tr  > 
     2651                <td style="color:#000000">Date</td> 
     2652                <td style="color:#000000">date</td> 
     2653                <td style="color:#000000">&nbsp;</td> 
     2654                <td style="color:#000000"> 
     2655 
     2656 
     2657                </td> 
     2658        </tr> 
     2659         
     2660        <!-- all the uniques --> 
     2661        <tr> 
     2662                <td colspan="2">primary key(id)</td> 
     2663                <td colspan="2">&nbsp;</td> 
     2664        </tr> 
     2665        <!-- all the indices --> 
     2666         
     2667</table> 
     2668*inherited field<br/> 
     2669<a href="#_top_of_page">go to top</a> 
     2670<p /> 
     2671<h3><a name="Diagnosis">Diagnosis</a>  
     2672</h3> 
     2673<p></p> 
     2674<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2675        <!-- table header --> 
     2676        <tr><th class="tablehead" colspan="7">Diagnosis 
     2677</th></tr>       
     2678        <!-- column headers --> 
     2679        <tr> 
     2680                <th>field</th> 
     2681                <th>type</th> 
     2682                <th>description</th> 
     2683                <th>constraints</th> 
     2684        </tr> 
     2685         
     2686        <!-- all the fields --> 
     2687        <tr  > 
     2688                <td style="color:#000000">id</td> 
     2689                <td style="color:#000000">int</td> 
     2690                <td style="color:#000000">&nbsp;</td> 
     2691                <td style="color:#000000"> 
     2692 
     2693not null,  
     2694auto,           </td> 
     2695        </tr> 
     2696        <tr  > 
     2697                <td style="color:#000000">value</td> 
     2698                <td style="color:#000000">text</td> 
     2699                <td style="color:#000000">&nbsp;</td> 
     2700                <td style="color:#000000"> 
     2701 
     2702not null,  
     2703                </td> 
     2704        </tr> 
     2705        <tr  > 
     2706                <td style="color:#000000">id_phenotype</td> 
     2707                <td style="color:#000000">xref</td> 
     2708                <td style="color:#000000">&nbsp;</td> 
     2709                <td style="color:#000000"> 
     2710references(Phenotype.id), 
     2711 
     2712not null,  
     2713                </td> 
     2714        </tr> 
     2715        <tr  > 
     2716                <td style="color:#000000">id_patient</td> 
     2717                <td style="color:#000000">xref</td> 
     2718                <td style="color:#000000">&nbsp;</td> 
     2719                <td style="color:#000000"> 
     2720references(Patient.id), 
     2721 
     2722not null,  
     2723                </td> 
     2724        </tr> 
     2725         
     2726        <!-- all the uniques --> 
     2727        <tr> 
     2728                <td colspan="2">primary key(id)</td> 
     2729                <td colspan="2">&nbsp;</td> 
     2730        </tr> 
     2731        <!-- all the indices --> 
     2732         
     2733</table> 
     2734*inherited field<br/> 
     2735<a href="#_top_of_page">go to top</a> 
     2736<p /> 
     2737<h3><a name="E_M">E_M</a>  
     2738</h3> 
     2739<p></p> 
     2740<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2741        <!-- table header --> 
     2742        <tr><th class="tablehead" colspan="7">E_M 
     2743</th></tr>       
     2744        <!-- column headers --> 
     2745        <tr> 
     2746                <th>field</th> 
     2747                <th>type</th> 
     2748                <th>description</th> 
     2749                <th>constraints</th> 
     2750        </tr> 
     2751         
     2752        <!-- all the fields --> 
     2753        <tr  > 
     2754                <td style="color:#000000">id</td> 
     2755                <td style="color:#000000">int</td> 
     2756                <td style="color:#000000">&nbsp;</td> 
     2757                <td style="color:#000000"> 
     2758 
     2759not null,  
     2760auto,           </td> 
     2761        </tr> 
     2762        <tr  > 
     2763                <td style="color:#000000">patient</td> 
     2764                <td style="color:#000000">xref</td> 
     2765                <td style="color:#000000">&nbsp;</td> 
     2766                <td style="color:#000000"> 
     2767references(Patient.id), 
     2768 
     2769not null,  
     2770                </td> 
     2771        </tr> 
     2772        <tr  > 
     2773                <td style="color:#000000">value</td> 
     2774                <td style="color:#000000">string</td> 
     2775                <td style="color:#000000">&nbsp;</td> 
     2776                <td style="color:#000000"> 
     2777 
     2778not null,  
     2779                </td> 
     2780        </tr> 
     2781        <tr  > 
     2782                <td style="color:#000000">Anchoring_fibers</td> 
     2783                <td style="color:#000000">string</td> 
     2784                <td style="color:#000000">&nbsp;</td> 
     2785                <td style="color:#000000"> 
     2786 
     2787 
     2788                </td> 
     2789        </tr> 
     2790        <tr  > 
     2791                <td style="color:#000000">Hemi_desmosomes</td> 
     2792                <td style="color:#000000">string</td> 
     2793                <td style="color:#000000">&nbsp;</td> 
     2794                <td style="color:#000000"> 
     2795 
     2796 
     2797                </td> 
     2798        </tr> 
     2799        <tr  > 
     2800                <td style="color:#000000">description</td> 
     2801                <td style="color:#000000">text</td> 
     2802                <td style="color:#000000">&nbsp;</td> 
     2803                <td style="color:#000000"> 
     2804 
     2805not null,  
     2806                </td> 
     2807        </tr> 
     2808         
     2809        <!-- all the uniques --> 
     2810        <tr> 
     2811                <td colspan="2">primary key(id)</td> 
     2812                <td colspan="2">&nbsp;</td> 
     2813        </tr> 
     2814        <!-- all the indices --> 
     2815         
     2816</table> 
     2817*inherited field<br/> 
     2818<a href="#_top_of_page">go to top</a> 
     2819<p /> 
     2820<h3><a name="I_F">I_F</a>  
     2821</h3> 
     2822<p></p> 
     2823<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2824        <!-- table header --> 
     2825        <tr><th class="tablehead" colspan="7">I_F 
     2826</th></tr>       
     2827        <!-- column headers --> 
     2828        <tr> 
     2829                <th>field</th> 
     2830                <th>type</th> 
     2831                <th>description</th> 
     2832                <th>constraints</th> 
     2833        </tr> 
     2834         
     2835        <!-- all the fields --> 
     2836        <tr  > 
     2837                <td style="color:#000000">id</td> 
     2838                <td style="color:#000000">int</td> 
     2839                <td style="color:#000000">&nbsp;</td> 
     2840                <td style="color:#000000"> 
     2841 
     2842not null,  
     2843auto,           </td> 
     2844        </tr> 
     2845        <tr  > 
     2846                <td style="color:#000000">patient</td> 
     2847                <td style="color:#000000">xref</td> 
     2848                <td style="color:#000000">&nbsp;</td> 
     2849                <td style="color:#000000"> 
     2850references(Patient.id), 
     2851 
     2852 
     2853                </td> 
     2854        </tr> 
     2855        <tr  > 
     2856                <td style="color:#000000">test_LH72</td> 
     2857                <td style="color:#000000">string</td> 
     2858                <td style="color:#000000">&nbsp;</td> 
     2859                <td style="color:#000000"> 
     2860 
     2861 
     2862                </td> 
     2863        </tr> 
     2864        <tr  > 
     2865                <td style="color:#000000">test_2Q633</td> 
     2866                <td style="color:#000000">string</td> 
     2867                <td style="color:#000000">&nbsp;</td> 
     2868                <td style="color:#000000"> 
     2869 
     2870 
     2871                </td> 
     2872        </tr> 
     2873        <tr  > 
     2874                <td style="color:#000000">keratine_14</td> 
     2875                <td style="color:#000000">string</td> 
     2876                <td style="color:#000000">&nbsp;</td> 
     2877                <td style="color:#000000"> 
     2878 
     2879 
     2880                </td> 
     2881        </tr> 
     2882        <tr  > 
     2883                <td style="color:#000000">BP180_1D1</td> 
     2884                <td style="color:#000000">string</td> 
     2885                <td style="color:#000000">&nbsp;</td> 
     2886                <td style="color:#000000"> 
     2887 
     2888 
     2889                </td> 
     2890        </tr> 
     2891        <tr  > 
     2892                <td style="color:#000000">Niceine_GB3</td> 
     2893                <td style="color:#000000">string</td> 
     2894                <td style="color:#000000">&nbsp;</td> 
     2895                <td style="color:#000000"> 
     2896 
     2897 
     2898                </td> 
     2899        </tr> 
     2900        <tr  > 
     2901                <td style="color:#000000">Collagen</td> 
     2902                <td style="color:#000000">string</td> 
     2903                <td style="color:#000000">&nbsp;</td> 
     2904                <td style="color:#000000"> 
     2905 
     2906 
     2907                </td> 
     2908        </tr> 
     2909        <tr  > 
     2910                <td style="color:#000000">description</td> 
     2911                <td style="color:#000000">text</td> 
     2912                <td style="color:#000000">&nbsp;</td> 
     2913                <td style="color:#000000"> 
     2914 
     2915not null,  
     2916                </td> 
     2917        </tr> 
     2918         
     2919        <!-- all the uniques --> 
     2920        <tr> 
     2921                <td colspan="2">primary key(id)</td> 
     2922                <td colspan="2">&nbsp;</td> 
     2923        </tr> 
     2924        <!-- all the indices --> 
     2925         
     2926</table> 
     2927*inherited field<br/> 
     2928<a href="#_top_of_page">go to top</a> 
     2929<p /> 
     2930<h3><a name="Statistics">Statistics</a>  
     2931</h3> 
     2932<p></p> 
     2933<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2934        <!-- table header --> 
     2935        <tr><th class="tablehead" colspan="7">Statistics 
     2936</th></tr>       
     2937        <!-- column headers --> 
     2938        <tr> 
     2939                <th>field</th> 
     2940                <th>type</th> 
     2941                <th>description</th> 
     2942                <th>constraints</th> 
     2943        </tr> 
     2944         
     2945        <!-- all the fields --> 
     2946        <tr  > 
     2947                <td style="color:#000000">id</td> 
     2948                <td style="color:#000000">int</td> 
     2949                <td style="color:#000000">&nbsp;</td> 
     2950                <td style="color:#000000"> 
     2951 
     2952not null,  
     2953auto,           </td> 
     2954        </tr> 
     2955        <tr  > 
     2956                <td style="color:#000000">mutation</td> 
     2957                <td style="color:#000000">xref</td> 
     2958                <td style="color:#000000">&nbsp;</td> 
     2959                <td style="color:#000000"> 
     2960references(Mutations.id), 
     2961 
     2962not null,  
     2963                </td> 
     2964        </tr> 
     2965        <tr  > 
     2966                <td style="color:#000000">value</td> 
     2967                <td style="color:#000000">int</td> 
     2968                <td style="color:#000000">&nbsp;</td> 
     2969                <td style="color:#000000"> 
     2970 
     2971 
     2972                </td> 
     2973        </tr> 
     2974        <tr  > 
     2975                <td style="color:#000000">date</td> 
     2976                <td style="color:#000000">date</td> 
     2977                <td style="color:#000000">&nbsp;</td> 
     2978                <td style="color:#000000"> 
     2979 
     2980not null,  
     2981                </td> 
     2982        </tr> 
     2983         
     2984        <!-- all the uniques --> 
     2985        <tr> 
     2986                <td colspan="2">primary key(id)</td> 
     2987                <td colspan="2">&nbsp;</td> 
     2988        </tr> 
     2989        <!-- all the indices --> 
     2990         
     2991</table> 
     2992*inherited field<br/> 
     2993<a href="#_top_of_page">go to top</a> 
     2994<p /> 
     2995<h3><a name="Pictures">Pictures</a>  
     2996</h3> 
     2997<p></p> 
     2998<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     2999        <!-- table header --> 
     3000        <tr><th class="tablehead" colspan="7">Pictures 
     3001</th></tr>       
     3002        <!-- column headers --> 
     3003        <tr> 
     3004                <th>field</th> 
     3005                <th>type</th> 
     3006                <th>description</th> 
     3007                <th>constraints</th> 
     3008        </tr> 
     3009         
     3010        <!-- all the fields --> 
     3011        <tr  > 
     3012                <td style="color:#000000">id</td> 
     3013                <td style="color:#000000">int</td> 
     3014                <td style="color:#000000">&nbsp;</td> 
     3015                <td style="color:#000000"> 
     3016 
     3017not null,  
     3018auto,           </td> 
     3019        </tr> 
     3020        <tr  > 
     3021                <td style="color:#000000">small</td> 
     3022                <td style="color:#000000">file</td> 
     3023                <td style="color:#000000">&nbsp;</td> 
     3024                <td style="color:#000000"> 
     3025 
     3026not null,  
     3027                </td> 
     3028        </tr> 
     3029        <tr  > 
     3030                <td style="color:#000000">large</td> 
     3031                <td style="color:#000000">file</td> 
     3032                <td style="color:#000000">&nbsp;</td> 
     3033                <td style="color:#000000"> 
     3034 
     3035not null,  
     3036                </td> 
     3037        </tr> 
     3038        <tr  > 
     3039                <td style="color:#000000">id_patient</td> 
     3040                <td style="color:#000000">xref</td> 
     3041                <td style="color:#000000">&nbsp;</td> 
     3042                <td style="color:#000000"> 
     3043references(Patient.id), 
     3044 
     3045not null,  
     3046                </td> 
     3047        </tr> 
     3048         
     3049        <!-- all the uniques --> 
     3050        <tr> 
     3051                <td colspan="2">primary key(id)</td> 
     3052                <td colspan="2">&nbsp;</td> 
     3053        </tr> 
     3054        <!-- all the indices --> 
     3055         
     3056</table> 
     3057*inherited field<br/> 
     3058<a href="#_top_of_page">go to top</a> 
     3059<p /> 
     3060<h3><a name="Data">Data</a>  
     3061</h3> 
     3062<p> 
     3063                                Generic structure for describing data matrices such as 
     3064                                genotype result, gene expression measurement, QTL 
     3065                                calculation, etc. 
     3066                         
     3067</p> 
     3068<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3069        <!-- table header --> 
     3070        <tr><th class="tablehead" colspan="7">Data<br/><i> extends FugeData</i> 
     3071</th></tr>       
     3072        <!-- column headers --> 
     3073        <tr> 
     3074                <th>field</th> 
     3075                <th>type</th> 
     3076                <th>description</th> 
     3077                <th>constraints</th> 
     3078        </tr> 
     3079         
     3080        <!-- all the fields --> 
     3081        <tr  > 
     3082                <td style="color:#000000">RowType</td> 
     3083                <td style="color:#000000">enum</td> 
     3084                <td style="color:#000000">Type of the columns of this matrix. Each column refers to a Trait or Subject (DimensionElement).</td> 
     3085                <td style="color:#000000"> 
     3086 
     3087not null,  
     3088                enum_options: 'Patient', 'Phenotype' 
     3089                </td> 
     3090        </tr> 
     3091        <tr  > 
     3092                <td style="color:#000000">ColType</td> 
     3093                <td style="color:#000000">enum</td> 
     3094                <td style="color:#000000">Type of the rows of this matrix. Each row refers to a Trait or Subject (DimensionElement)</td> 
     3095                <td style="color:#000000"> 
     3096 
     3097not null,  
     3098                enum_options: 'Patient', 'Phenotype' 
     3099                </td> 
     3100        </tr> 
     3101        <tr  > 
     3102                <td style="color:#000000">ValueType</td> 
     3103                <td style="color:#000000">enum</td> 
     3104                <td style="color:#000000">Type of the values of this matrix. E.g. text strings or decimal numbers.</td> 
     3105                <td style="color:#000000"> 
     3106 
     3107not null,  
     3108                enum_options: 'Text', 'Decimal' 
     3109                </td> 
     3110        </tr> 
     3111        <tr  > 
     3112                <td style="color:#000000">TotalRows</td> 
     3113                <td style="color:#000000">int</td> 
     3114                <td style="color:#000000">&nbsp;</td> 
     3115                <td style="color:#000000"> 
     3116 
     3117not null,  
     3118                </td> 
     3119        </tr> 
     3120        <tr  > 
     3121                <td style="color:#000000">TotalCols</td> 
     3122                <td style="color:#000000">int</td> 
     3123                <td style="color:#000000">&nbsp;</td> 
     3124                <td style="color:#000000"> 
     3125 
     3126not null,  
     3127                </td> 
     3128        </tr> 
     3129         
     3130        <!-- all the uniques --> 
     3131        <tr> 
     3132                <td colspan="2">primary key(id)</td> 
     3133                <td colspan="2">&nbsp;</td> 
     3134        </tr> 
     3135        <tr> 
     3136                <td colspan="2">key(name)</td> 
     3137                <td colspan="2">&nbsp;</td> 
     3138        </tr> 
     3139        <!-- all the indices --> 
     3140         
     3141</table> 
     3142*inherited field<br/> 
     3143<a href="#_top_of_page">go to top</a> 
     3144<p /> 
     3145<h3><a name="Investigation">Investigation</a>  
     3146</h3> 
     3147<p></p> 
     3148<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3149        <!-- table header --> 
     3150        <tr><th class="tablehead" colspan="7">Investigation<br/><i> extends FugeInvestigation</i> 
     3151</th></tr>       
     3152        <!-- column headers --> 
     3153        <tr> 
     3154                <th>field</th> 
     3155                <th>type</th> 
     3156                <th>description</th> 
     3157                <th>constraints</th> 
     3158        </tr> 
     3159         
     3160        <!-- all the fields --> 
     3161        <tr  > 
     3162                <td style="color:#333333; font-style:italic;">start*</td> 
     3163                <td style="color:#333333; font-style:italic;">datetime</td> 
     3164                <td style="color:#333333; font-style:italic;">The start point of the investigation. (n.b. removed null constraint)</td> 
     3165                <td style="color:#333333; font-style:italic;"> 
     3166 
     3167 
     3168                </td> 
     3169        </tr> 
     3170        <tr  > 
     3171                <td style="color:#333333; font-style:italic;">end*</td> 
     3172                <td style="color:#333333; font-style:italic;">datetime</td> 
     3173                <td style="color:#333333; font-style:italic;">The end point of the investigation. (n.b. removed null constraint)</td> 
     3174                <td style="color:#333333; font-style:italic;"> 
     3175 
     3176 
     3177                </td> 
     3178        </tr> 
     3179         
     3180        <!-- all the uniques --> 
     3181        <tr> 
     3182                <td colspan="2">primary key(id)</td> 
     3183                <td colspan="2">&nbsp;</td> 
     3184        </tr> 
     3185        <tr> 
     3186                <td colspan="2">key(name)</td> 
     3187                <td colspan="2">&nbsp;</td> 
     3188        </tr> 
     3189        <!-- all the indices --> 
     3190         
     3191</table> 
     3192*inherited field<br/> 
     3193<a href="#_top_of_page">go to top</a> 
     3194<p /> 
     3195<h3><a name="DimensionElement">DimensionElement</a>  
     3196</h3> 
     3197<p></p> 
     3198<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3199        <!-- table header --> 
     3200        <tr><th class="tablehead" colspan="7">DimensionElement<br/><i> extends FugeDimensionElement</i> 
     3201</th></tr>       
     3202        <!-- column headers --> 
     3203        <tr> 
     3204                <th>field</th> 
     3205                <th>type</th> 
     3206                <th>description</th> 
     3207                <th>constraints</th> 
     3208        </tr> 
     3209         
     3210        <!-- all the fields --> 
     3211        <tr  > 
     3212                <td style="color:#000000">Investigation</td> 
     3213                <td style="color:#000000">xref</td> 
     3214                <td style="color:#000000">Reference to the investigation this belongs to.</td> 
     3215                <td style="color:#000000"> 
     3216references(Investigation.id), 
     3217 
     3218not null,  
     3219                </td> 
     3220        </tr> 
     3221         
     3222        <!-- all the uniques --> 
     3223        <tr> 
     3224                <td colspan="2">primary key(id)</td> 
     3225                <td colspan="2">&nbsp;</td> 
     3226        </tr> 
     3227        <tr> 
     3228                <td colspan="2">key(name, Investigation, Type)</td> 
     3229                <td colspan="2">&nbsp;</td> 
     3230        </tr> 
     3231        <!-- all the indices --> 
     3232         
     3233</table> 
     3234*inherited field<br/> 
     3235<a href="#_top_of_page">go to top</a> 
     3236<p /> 
     3237<h3><a name="Describable">Describable</a>  
     3238</h3> 
     3239<p></p> 
     3240<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3241        <!-- table header --> 
     3242        <tr><th class="tablehead" colspan="7">Describable 
     3243</th></tr>       
     3244        <!-- column headers --> 
     3245        <tr> 
     3246                <th>field</th> 
     3247                <th>type</th> 
     3248                <th>description</th> 
     3249                <th>constraints</th> 
     3250        </tr> 
     3251         
     3252        <!-- all the fields --> 
     3253        <tr  > 
     3254                <td style="color:#000000">id</td> 
     3255                <td style="color:#000000">int</td> 
     3256                <td style="color:#000000">automatically generated id-field</td> 
     3257                <td style="color:#000000"> 
     3258 
     3259not null,  
     3260auto,           </td> 
     3261        </tr> 
     3262         
     3263        <!-- all the uniques --> 
     3264        <tr> 
     3265                <td colspan="2">primary key(id)</td> 
     3266                <td colspan="2">&nbsp;</td> 
     3267        </tr> 
     3268        <!-- all the indices --> 
     3269         
     3270</table> 
     3271*inherited field<br/> 
     3272<a href="#_top_of_page">go to top</a> 
     3273<p /> 
     3274<h3><a name="Identifiable">Identifiable</a>  
     3275</h3> 
     3276<p></p> 
     3277<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3278        <!-- table header --> 
     3279        <tr><th class="tablehead" colspan="7">Identifiable<br/><i> extends Describable</i> 
     3280</th></tr>       
     3281        <!-- column headers --> 
     3282        <tr> 
     3283                <th>field</th> 
     3284                <th>type</th> 
     3285                <th>description</th> 
     3286                <th>constraints</th> 
     3287        </tr> 
     3288         
     3289        <!-- all the fields --> 
     3290        <tr  > 
     3291                <td style="color:#000000">name</td> 
     3292                <td style="color:#000000">string</td> 
     3293                <td style="color:#000000">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     3294                <td style="color:#000000"> 
     3295 
     3296not null,  
     3297                </td> 
     3298        </tr> 
     3299         
     3300        <!-- all the uniques --> 
     3301        <tr> 
     3302                <td colspan="2">primary key(id)</td> 
     3303                <td colspan="2">&nbsp;</td> 
     3304        </tr> 
     3305        <!-- all the indices --> 
     3306         
     3307</table> 
     3308*inherited field<br/> 
     3309<a href="#_top_of_page">go to top</a> 
     3310<p /> 
     3311<h3><a name="FugeData">FugeData</a>  
     3312</h3> 
     3313<p></p> 
     3314<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3315        <!-- table header --> 
     3316        <tr><th class="tablehead" colspan="7">FugeData<br/><i> extends Identifiable</i> 
     3317</th></tr>       
     3318        <!-- column headers --> 
     3319        <tr> 
     3320                <th>field</th> 
     3321                <th>type</th> 
     3322                <th>description</th> 
     3323                <th>constraints</th> 
     3324        </tr> 
     3325         
     3326        <!-- all the fields --> 
     3327        <tr  > 
     3328                <td style="color:#333333; font-style:italic;">name*</td> 
     3329                <td style="color:#333333; font-style:italic;">string</td> 
     3330                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     3331                <td style="color:#333333; font-style:italic;"> 
     3332 
     3333not null,  
     3334                </td> 
     3335        </tr> 
     3336         
     3337        <!-- all the uniques --> 
     3338        <tr> 
     3339                <td colspan="2">primary key(id)</td> 
     3340                <td colspan="2">&nbsp;</td> 
     3341        </tr> 
     3342        <!-- all the indices --> 
     3343         
     3344</table> 
     3345*inherited field<br/> 
     3346<a href="#_top_of_page">go to top</a> 
     3347<p /> 
     3348<h3><a name="DataElement">DataElement</a> (interface).  
     3349</h3> 
     3350<p> 
     3351                                Generic data structure for aiming the values of a data 
     3352                                set as described in Data. Each DataElement describes a 
     3353                                cell in a data matrix of rows (from) and columns (to), 
     3354                                e.g., in "dataset X" it was measured that geneX (col) 
     3355                                relates to geneZ (row). 
     3356                         
     3357</p> 
     3358<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3359        <!-- table header --> 
     3360        <tr><th class="tablehead" colspan="7">DataElement 
     3361</th></tr>       
     3362        <!-- column headers --> 
     3363        <tr> 
     3364                <th>field</th> 
     3365                <th>type</th> 
     3366                <th>description</th> 
     3367                <th>constraints</th> 
     3368        </tr> 
     3369         
     3370        <!-- all the fields --> 
     3371        <tr  > 
     3372                <td style="color:#333333; font-style:italic;">id*</td> 
     3373                <td style="color:#333333; font-style:italic;">int</td> 
     3374                <td style="color:#333333; font-style:italic;">automatically generated id-field</td> 
     3375                <td style="color:#333333; font-style:italic;"> 
     3376 
     3377not null,  
     3378auto,           </td> 
     3379        </tr> 
     3380        <tr  > 
     3381                <td style="color:#333333; font-style:italic;">Data*</td> 
     3382                <td style="color:#333333; font-style:italic;">xref</td> 
     3383                <td style="color:#333333; font-style:italic;">Reference to the data this entity belongs to.</td> 
     3384                <td style="color:#333333; font-style:italic;"> 
     3385references(Data.id), 
     3386 
     3387not null,  
     3388                </td> 
     3389        </tr> 
     3390        <tr  > 
     3391                <td style="color:#333333; font-style:italic;">Col*</td> 
     3392                <td style="color:#333333; font-style:italic;">xref</td> 
     3393                <td style="color:#333333; font-style:italic;">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     3394                <td style="color:#333333; font-style:italic;"> 
     3395references(DimensionElement.id), 
     3396 
     3397not null,  
     3398                </td> 
     3399        </tr> 
     3400        <tr  > 
     3401                <td style="color:#333333; font-style:italic;">Row*</td> 
     3402                <td style="color:#333333; font-style:italic;">xref</td> 
     3403                <td style="color:#333333; font-style:italic;">References the DimensionElement on the other end of the relation.</td> 
     3404                <td style="color:#333333; font-style:italic;"> 
     3405references(DimensionElement.id), 
     3406 
     3407not null,  
     3408                </td> 
     3409        </tr> 
     3410        <tr  > 
     3411                <td style="color:#333333; font-style:italic;">RowIndex*</td> 
     3412                <td style="color:#333333; font-style:italic;">int</td> 
     3413                <td style="color:#333333; font-style:italic;">Row position in the matrix.</td> 
     3414                <td style="color:#333333; font-style:italic;"> 
     3415 
     3416not null,  
     3417                </td> 
     3418        </tr> 
     3419        <tr  > 
     3420                <td style="color:#333333; font-style:italic;">ColIndex*</td> 
     3421                <td style="color:#333333; font-style:italic;">int</td> 
     3422                <td style="color:#333333; font-style:italic;">Col position in the matrix.</td> 
     3423                <td style="color:#333333; font-style:italic;"> 
     3424 
     3425not null,  
     3426                </td> 
     3427        </tr> 
     3428         
     3429        <!-- all the uniques --> 
     3430        <tr> 
     3431                <td colspan="2">primary key(id)</td> 
     3432                <td colspan="2">&nbsp;</td> 
     3433        </tr> 
     3434        <tr> 
     3435                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     3436                <td colspan="2">&nbsp;</td> 
     3437        </tr> 
     3438        <tr> 
     3439                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     3440                <td colspan="2">&nbsp;</td> 
     3441        </tr> 
     3442        <!-- all the indices --> 
     3443         
     3444</table> 
     3445*inherited field<br/> 
     3446<a href="#_top_of_page">go to top</a> 
     3447<p /> 
     3448<h3><a name="FugeDimensionElement">FugeDimensionElement</a>  
     3449</h3> 
     3450<p></p> 
     3451<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3452        <!-- table header --> 
     3453        <tr><th class="tablehead" colspan="7">FugeDimensionElement<br/><i> extends Identifiable</i> 
     3454</th></tr>       
     3455        <!-- column headers --> 
     3456        <tr> 
     3457                <th>field</th> 
     3458                <th>type</th> 
     3459                <th>description</th> 
     3460                <th>constraints</th> 
     3461        </tr> 
     3462         
     3463        <!-- all the fields --> 
     3464        <tr  > 
     3465                <td style="color:#333333; font-style:italic;">name*</td> 
     3466                <td style="color:#333333; font-style:italic;">string</td> 
     3467                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     3468                <td style="color:#333333; font-style:italic;"> 
     3469 
     3470not null,  
     3471                </td> 
     3472        </tr> 
     3473         
     3474        <!-- all the uniques --> 
     3475        <tr> 
     3476                <td colspan="2">primary key(id)</td> 
     3477                <td colspan="2">&nbsp;</td> 
     3478        </tr> 
     3479        <!-- all the indices --> 
     3480         
     3481</table> 
     3482*inherited field<br/> 
     3483<a href="#_top_of_page">go to top</a> 
     3484<p /> 
     3485<h3><a name="FugeInvestigation">FugeInvestigation</a>  
     3486</h3> 
     3487<p></p> 
     3488<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3489        <!-- table header --> 
     3490        <tr><th class="tablehead" colspan="7">FugeInvestigation<br/><i> extends Identifiable</i> 
     3491</th></tr>       
     3492        <!-- column headers --> 
     3493        <tr> 
     3494                <th>field</th> 
     3495                <th>type</th> 
     3496                <th>description</th> 
     3497                <th>constraints</th> 
     3498        </tr> 
     3499         
     3500        <!-- all the fields --> 
     3501        <tr  > 
     3502                <td style="color:#333333; font-style:italic;">name*</td> 
     3503                <td style="color:#333333; font-style:italic;">string</td> 
     3504                <td style="color:#333333; font-style:italic;">The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     3505                <td style="color:#333333; font-style:italic;"> 
     3506 
     3507not null,  
     3508                </td> 
     3509        </tr> 
     3510        <tr  > 
     3511                <td style="color:#000000">start</td> 
     3512                <td style="color:#000000">datetime</td> 
     3513                <td style="color:#000000">The start point of the investigation. (n.b. removed null constraint)</td> 
     3514                <td style="color:#000000"> 
     3515 
     3516 
     3517                </td> 
     3518        </tr> 
     3519        <tr  > 
     3520                <td style="color:#000000">end</td> 
     3521                <td style="color:#000000">datetime</td> 
     3522                <td style="color:#000000">The end point of the investigation. (n.b. removed null constraint)</td> 
     3523                <td style="color:#000000"> 
     3524 
     3525 
     3526                </td> 
     3527        </tr> 
     3528         
     3529        <!-- all the uniques --> 
     3530        <tr> 
     3531                <td colspan="2">primary key(id)</td> 
     3532                <td colspan="2">&nbsp;</td> 
     3533        </tr> 
     3534        <!-- all the indices --> 
     3535         
     3536</table> 
     3537*inherited field<br/> 
     3538<a href="#_top_of_page">go to top</a> 
     3539<p /> 
     3540<h3><a name="TextDataElement">TextDataElement</a>  
     3541</h3> 
     3542<p>Store text data 
     3543</p> 
     3544<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3545        <!-- table header --> 
     3546        <tr><th class="tablehead" colspan="7">TextDataElement 
     3547<br/><i> implements DataElement</i></th></tr>    
     3548        <!-- column headers --> 
     3549        <tr> 
     3550                <th>field</th> 
     3551                <th>type</th> 
     3552                <th>description</th> 
     3553                <th>constraints</th> 
     3554        </tr> 
     3555         
     3556        <!-- all the fields --> 
     3557        <tr  > 
     3558                <td style="color:#000000">Data</td> 
     3559                <td style="color:#000000">xref</td> 
     3560                <td style="color:#000000">Reference to the data this entity belongs to.</td> 
     3561                <td style="color:#000000"> 
     3562references(Data.id), 
     3563 
     3564not null,  
     3565                </td> 
     3566        </tr> 
     3567        <tr  > 
     3568                <td style="color:#000000">Col</td> 
     3569                <td style="color:#000000">xref</td> 
     3570                <td style="color:#000000">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     3571                <td style="color:#000000"> 
     3572references(DimensionElement.id), 
     3573 
     3574not null,  
     3575                </td> 
     3576        </tr> 
     3577        <tr  > 
     3578                <td style="color:#000000">Row</td> 
     3579                <td style="color:#000000">xref</td> 
     3580                <td style="color:#000000">References the DimensionElement on the other end of the relation.</td> 
     3581                <td style="color:#000000"> 
     3582references(DimensionElement.id), 
     3583 
     3584not null,  
     3585                </td> 
     3586        </tr> 
     3587        <tr  > 
     3588                <td style="color:#000000">RowIndex</td> 
     3589                <td style="color:#000000">int</td> 
     3590                <td style="color:#000000">Row position in the matrix.</td> 
     3591                <td style="color:#000000"> 
     3592 
     3593not null,  
     3594                </td> 
     3595        </tr> 
     3596        <tr  > 
     3597                <td style="color:#000000">ColIndex</td> 
     3598                <td style="color:#000000">int</td> 
     3599                <td style="color:#000000">Col position in the matrix.</td> 
     3600                <td style="color:#000000"> 
     3601 
     3602not null,  
     3603                </td> 
     3604        </tr> 
     3605        <tr  > 
     3606                <td style="color:#000000">Value</td> 
     3607                <td style="color:#000000">text</td> 
     3608                <td style="color:#000000">The value, e.g., genotype strings like AA, BA, BB.</td> 
     3609                <td style="color:#000000"> 
     3610 
     3611 
     3612                </td> 
     3613        </tr> 
     3614         
     3615        <!-- all the uniques --> 
     3616        <tr> 
     3617                <td colspan="2">primary key(id)</td> 
     3618                <td colspan="2">&nbsp;</td> 
     3619        </tr> 
     3620        <tr> 
     3621                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     3622                <td colspan="2">&nbsp;</td> 
     3623        </tr> 
     3624        <tr> 
     3625                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     3626                <td colspan="2">&nbsp;</td> 
     3627        </tr> 
     3628        <tr> 
     3629                <td colspan="2">key(id)</td> 
     3630                <td colspan="2">&nbsp;</td> 
     3631        </tr> 
     3632        <!-- all the indices --> 
     3633         
     3634</table> 
     3635*inherited field<br/> 
     3636<a href="#_top_of_page">go to top</a> 
     3637<p /> 
     3638<h3><a name="DecimalDataElement">DecimalDataElement</a>  
     3639</h3> 
     3640<p> 
     3641                                A DataElement for storing decimal data. 
     3642                         
     3643</p> 
     3644<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     3645        <!-- table header --> 
     3646        <tr><th class="tablehead" colspan="7">DecimalDataElement 
     3647<br/><i> implements DataElement</i></th></tr>    
     3648        <!-- column headers --> 
     3649        <tr> 
     3650                <th>field</th> 
     3651                <th>type</th> 
     3652                <th>description</th> 
     3653                <th>constraints</th> 
     3654        </tr> 
     3655         
     3656        <!-- all the fields --> 
     3657        <tr  > 
     3658                <td style="color:#000000">Data</td> 
     3659                <td style="color:#000000">xref</td> 
     3660                <td style="color:#000000">Reference to the data this entity belongs to.</td> 
     3661                <td style="color:#000000"> 
     3662references(Data.id), 
     3663 
     3664not null,  
     3665                </td> 
     3666        </tr> 
     3667        <tr  > 
     3668                <td style="color:#000000">Col</td> 
     3669                <td style="color:#000000">xref</td> 
     3670                <td style="color:#000000">References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     3671                <td style="color:#000000"> 
     3672references(DimensionElement.id), 
     3673 
     3674not null,  
     3675                </td> 
     3676        </tr> 
     3677        <tr  > 
     3678                <td style="color:#000000">Row</td> 
     3679                <td style="color:#000000">xref</td> 
     3680                <td style="color:#000000">References the DimensionElement on the other end of the relation.</td> 
     3681                <td style="color:#000000"> 
     3682references(DimensionElement.id), 
     3683 
     3684not null,  
     3685                </td> 
     3686        </tr> 
     3687        <tr  > 
     3688                <td style="color:#000000">RowIndex</td> 
     3689                <td style="color:#000000">int</td> 
     3690                <td style="color:#000000">Row position in the matrix.</td> 
     3691                <td style="color:#000000"> 
     3692 
     3693not null,  
     3694                </td> 
     3695        </tr> 
     3696        <tr  > 
     3697                <td style="color:#000000">ColIndex</td> 
     3698                <td style="color:#000000">int</td> 
     3699                <td style="color:#000000">Col position in the matrix.</td> 
     3700                <td style="color:#000000"> 
     3701 
     3702not null,  
     3703                </td> 
     3704        </tr> 
     3705        <tr  > 
     3706                <td style="color:#000000">Value</td> 
     3707                <td style="color:#000000">decimal</td> 
     3708                <td style="color:#000000">The value, e.g., correlation.</td> 
     3709                <td style="color:#000000"> 
     3710 
     3711 
     3712                </td> 
     3713        </tr> 
     3714         
     3715        <!-- all the uniques --> 
     3716        <tr> 
     3717                <td colspan="2">primary key(id)</td> 
     3718                <td colspan="2">&nbsp;</td> 
     3719        </tr> 
     3720        <tr> 
     3721                <td colspan="2">key(ColIndex, RowIndex, Data)</td> 
     3722                <td colspan="2">&nbsp;</td> 
     3723        </tr> 
     3724        <tr> 
     3725                <td colspan="2">key(RowIndex, ColIndex, Data)</td> 
     3726                <td colspan="2">&nbsp;</td> 
     3727        </tr> 
     3728        <tr> 
     3729                <td colspan="2">key(id)</td> 
    8193730                <td colspan="2">&nbsp;</td> 
    8203731        </tr> 
     
    8323743<a href="#_top_of_page">go to top</a> 
    8333744 
    834 <div align="center">Documentation generated on July 17, 2009 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 
     3745<div align="center">Documentation generated on July 21, 2009 by MOLGENIS <a href="http://www.molgenis.org">http://www.molgenis.org</a></div> 
    8353746</body></html> 
    8363747 
  • molgenis4eb/WebContent/doc/tabledoc.html

    r2015 r2022  
    22 
    33<head> 
    4         <title>Database-schema: example</title> 
     4        <title>Database-schema: molgenis4eb</title> 
    55         
    66        <meta name="keywords"                   content=""> 
     
    4444 
    4545<body> 
    46 <h1>Database schema <a name="_top_of_page">"example"</a></h1> 
     46<h1>Database schema <a name="_top_of_page">"molgenis4eb"</a></h1> 
    4747<p>Notes: 
    4848<ul> 
     
    5555<h2>Entities:</h2> 
    5656<ol> 
    57 <li><a href="#Identifiable">Identifiable</a> 
    58 <li><a href="#Experiment">Experiment</a> 
    59 <li><a href="#Sample">Sample</a> 
    60 <li><a href="#SpecialSample">SpecialSample</a> 
    61 <li><a href="#Trait">Trait</a> 
    62 <li><a href="#Measurement">Measurement</a> 
    63 <li><a href="#Data">Data</a> 
    6457<li><a href="#Role">Role</a> 
    6558<li><a href="#User">User</a> 
    6659<li><a href="#Entity">Entity</a> 
    6760<li><a href="#RoleEntityPermission">RoleEntityPermission</a> 
     61<li><a href="#Statistics">Statistics</a> 
     62<li><a href="#RNA">RNA</a> 
     63<li><a href="#Amino_acid">Amino_acid</a> 
     64<li><a href="#Mutations">Mutations</a> 
     65<li><a href="#Contact">Contact</a> 
     66<li><a href="#Patient">Patient</a> 
     67<li><a href="#Gender">Gender</a> 
     68<li><a href="#Diagnosis">Diagnosis</a> 
     69<li><a href="#Phenotype">Phenotype</a> 
     70<li><a href="#E_M">E_M</a> 
     71<li><a href="#I_F">I_F</a> 
     72<li><a href="#Consequence">Consequence</a> 
     73<li><a href="#Pictures">Pictures</a> 
     74<li><a href="#DataElement">DataElement</a> 
     75<li><a href="#DecimalDataElement">DecimalDataElement</a> 
     76<li><a href="#TextDataElement">TextDataElement</a> 
     77<li><a href="#Describable">Describable</a> 
     78<li><a href="#Identifiable">Identifiable</a> 
     79<li><a href="#FugeData">FugeData</a> 
     80<li><a href="#Data">Data</a> 
     81<li><a href="#FugeDimensionElement">FugeDimensionElement</a> 
     82<li><a href="#FugeInvestigation">FugeInvestigation</a> 
     83<li><a href="#Investigation">Investigation</a> 
     84<li><a href="#DimensionElement">DimensionElement</a> 
    6885<li><a href="#User_roles">User_roles</a> 
    6986</ol> 
    70 <h2>Table: <a name="Identifiable">Identifiable</a> (interface).  
    71 </h2> 
    72 <p>For modeling purposes only (denoted by 
    73                         abstract='true', this entity defines fields id and name centrally. 
    74                  
     87<h2>Table: <a name="Role">Role</a>  
     88</h2> 
     89<p></p> 
     90<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     91        <!-- table header --> 
     92        <tr><th class="tablehead" colspan="6">Role 
     93</th></tr>       
     94        <!-- column headers --> 
     95        <tr> 
     96                <th>attribute</th> 
     97                <th>type</th> 
     98                <th>NULL?</th> 
     99                <th>AUTO?</th> 
     100                <th>constraints</th> 
     101                <th>description</th> 
     102        </tr> 
     103         
     104        <!-- all the fields --> 
     105        <tr> 
     106                <td width="150">id</td> 
     107                <td width="50">int</td> 
     108                <td width="20">&nbsp;</td> 
     109                <td width="20">Y</td> 
     110                <td width=""> 
     111                &nbsp; 
     112                </td> 
     113                <td>id</td> 
     114        </tr> 
     115        <tr> 
     116                <td width="150">name</td> 
     117                <td width="50">string</td> 
     118                <td width="20">&nbsp;</td> 
     119                <td width="20">&nbsp;</td> 
     120                <td width=""> 
     121                &nbsp; 
     122                </td> 
     123                <td>name</td> 
     124        </tr> 
     125        <tr> 
     126                <td width="150">superuser</td> 
     127                <td width="50">bool</td> 
     128                <td width="20">&nbsp;</td> 
     129                <td width="20">&nbsp;</td> 
     130                <td width=""> 
     131                &nbsp; 
     132                </td> 
     133                <td>superuser</td> 
     134        </tr> 
     135         
     136        <!-- all the uniques --> 
     137        <tr> 
     138                <td colspan="5">Primary key(id)</td> 
     139                <td>&nbsp;</td> 
     140        </tr> 
     141        <tr> 
     142                <td colspan="5">Secondary key(name)</td> 
     143                <td>&nbsp;</td> 
     144        </tr> 
     145        <!-- all the indices --> 
     146         
     147</table> 
     148<a href="#_top_of_page">go to top</a> 
     149<p /> 
     150<h2>Table: <a name="User">User</a>  
     151</h2> 
     152<p></p> 
     153<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     154        <!-- table header --> 
     155        <tr><th class="tablehead" colspan="6">User 
     156</th></tr>       
     157        <!-- column headers --> 
     158        <tr> 
     159                <th>attribute</th> 
     160                <th>type</th> 
     161                <th>NULL?</th> 
     162                <th>AUTO?</th> 
     163                <th>constraints</th> 
     164                <th>description</th> 
     165        </tr> 
     166         
     167        <!-- all the fields --> 
     168        <tr> 
     169                <td width="150">id</td> 
     170                <td width="50">int</td> 
     171                <td width="20">&nbsp;</td> 
     172                <td width="20">Y</td> 
     173                <td width=""> 
     174                &nbsp; 
     175                </td> 
     176                <td>id</td> 
     177        </tr> 
     178        <tr> 
     179                <td width="150">name</td> 
     180                <td width="50">string</td> 
     181                <td width="20">&nbsp;</td> 
     182                <td width="20">&nbsp;</td> 
     183                <td width=""> 
     184                &nbsp; 
     185                </td> 
     186                <td>name</td> 
     187        </tr> 
     188        <tr> 
     189                <td width="150">password</td> 
     190                <td width="50">string</td> 
     191                <td width="20">&nbsp;</td> 
     192                <td width="20">&nbsp;</td> 
     193                <td width=""> 
     194                &nbsp; 
     195                </td> 
     196                <td>password</td> 
     197        </tr> 
     198        <tr> 
     199                <td width="150">roles</td> 
     200                <td width="50">mref</td> 
     201                <td width="20">Y</td> 
     202                <td width="20">&nbsp;</td> 
     203                <td width=""> 
     204                References(Role) via linktable.  
     205                </td> 
     206                <td>Roles that this user has adopted. Its rights are inherited.</td> 
     207        </tr> 
     208         
     209        <!-- all the uniques --> 
     210        <tr> 
     211                <td colspan="5">Primary key(id)</td> 
     212                <td>&nbsp;</td> 
     213        </tr> 
     214        <tr> 
     215                <td colspan="5">Secondary key(name)</td> 
     216                <td>&nbsp;</td> 
     217        </tr> 
     218        <!-- all the indices --> 
     219         
     220</table> 
     221<a href="#_top_of_page">go to top</a> 
     222<p /> 
     223<h2>Table: <a name="Entity">Entity</a>  
     224</h2> 
     225<p>Catalog of entity names 
    75226</p> 
    76227<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    77228        <!-- table header --> 
    78         <tr><th class="tablehead" colspan="6">Identifiable 
    79 </th></tr>       
    80         <!-- column headers --> 
    81         <tr> 
    82                 <th>attribute</th> 
    83                 <th>type</th> 
    84                 <th>NULL?</th> 
    85                 <th>AUTO?</th> 
    86                 <th>constraints</th> 
    87                 <th>description</th> 
    88         </tr> 
    89          
    90         <!-- all the fields --> 
    91         <tr> 
    92                 <td width="150">Id</td> 
    93                 <td width="50">int</td> 
    94                 <td width="20">&nbsp;</td> 
    95                 <td width="20">Y</td> 
    96                 <td width=""> 
    97                 &nbsp; 
    98                 </td> 
    99                 <td>autogenerated id number (autoid)</td> 
    100         </tr> 
    101         <tr> 
    102                 <td width="150">Name</td> 
    103                 <td width="50">string</td> 
    104                 <td width="20">&nbsp;</td> 
    105                 <td width="20">&nbsp;</td> 
    106                 <td width=""> 
    107                 &nbsp; 
    108                 </td> 
    109                 <td>unique, user provided name string</td> 
    110         </tr> 
    111          
    112         <!-- all the uniques --> 
    113         <tr> 
    114                 <td colspan="5">Primary key(Id)</td> 
    115                 <td>&nbsp;</td> 
    116         </tr> 
    117         <tr> 
    118                 <td colspan="5">Secondary key(Name)</td> 
    119                 <td>&nbsp;</td> 
    120         </tr> 
    121         <!-- all the indices --> 
    122          
    123 </table> 
    124 <a href="#_top_of_page">go to top</a> 
    125 <p /> 
    126 <h2>Table: <a name="Experiment">Experiment</a>  
    127 </h2> 
    128 <p>Summary of an experiment. 
     229        <tr><th class="tablehead" colspan="6">Entity 
     230</th></tr>       
     231        <!-- column headers --> 
     232        <tr> 
     233                <th>attribute</th> 
     234                <th>type</th> 
     235                <th>NULL?</th> 
     236                <th>AUTO?</th> 
     237                <th>constraints</th> 
     238                <th>description</th> 
     239        </tr> 
     240         
     241        <!-- all the fields --> 
     242        <tr> 
     243                <td width="150">id</td> 
     244                <td width="50">int</td> 
     245                <td width="20">&nbsp;</td> 
     246                <td width="20">Y</td> 
     247                <td width=""> 
     248                &nbsp; 
     249                </td> 
     250                <td>id</td> 
     251        </tr> 
     252        <tr> 
     253                <td width="150">className</td> 
     254                <td width="50">string</td> 
     255                <td width="20">&nbsp;</td> 
     256                <td width="20">&nbsp;</td> 
     257                <td width=""> 
     258                &nbsp; 
     259                </td> 
     260                <td>Full name of the data type</td> 
     261        </tr> 
     262         
     263        <!-- all the uniques --> 
     264        <tr> 
     265                <td colspan="5">Primary key(id)</td> 
     266                <td>&nbsp;</td> 
     267        </tr> 
     268        <!-- all the indices --> 
     269         
     270</table> 
     271<a href="#_top_of_page">go to top</a> 
     272<p /> 
     273<h2>Table: <a name="RoleEntityPermission">RoleEntityPermission</a>  
     274</h2> 
     275<p>Assign rights on entities to roles. 
    129276</p> 
    130277<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    131278        <!-- table header --> 
    132         <tr><th class="tablehead" colspan="6">Experiment 
    133  implements Identifiable</th></tr>       
    134         <!-- column headers --> 
    135         <tr> 
    136                 <th>attribute</th> 
    137                 <th>type</th> 
    138                 <th>NULL?</th> 
    139                 <th>AUTO?</th> 
    140                 <th>constraints</th> 
    141                 <th>description</th> 
    142         </tr> 
    143          
    144         <!-- all the fields --> 
     279        <tr><th class="tablehead" colspan="6">RoleEntityPermission 
     280</th></tr>       
     281        <!-- column headers --> 
     282        <tr> 
     283                <th>attribute</th> 
     284                <th>type</th> 
     285                <th>NULL?</th> 
     286                <th>AUTO?</th> 
     287                <th>constraints</th> 
     288                <th>description</th> 
     289        </tr> 
     290         
     291        <!-- all the fields --> 
     292        <tr> 
     293                <td width="150">id</td> 
     294                <td width="50">int</td> 
     295                <td width="20">&nbsp;</td> 
     296                <td width="20">Y</td> 
     297                <td width=""> 
     298                &nbsp; 
     299                </td> 
     300                <td>id</td> 
     301        </tr> 
     302        <tr> 
     303                <td width="150">role</td> 
     304                <td width="50">xref</td> 
     305                <td width="20">&nbsp;</td> 
     306                <td width="20">&nbsp;</td> 
     307                <td width=""> 
     308                References(Role) 
     309                </td> 
     310                <td>role</td> 
     311        </tr> 
     312        <tr> 
     313                <td width="150">entity</td> 
     314                <td width="50">xref</td> 
     315                <td width="20">&nbsp;</td> 
     316                <td width="20">&nbsp;</td> 
     317                <td width=""> 
     318                References(Entity) 
     319                </td> 
     320                <td>entity</td> 
     321        </tr> 
     322        <tr> 
     323                <td width="150">permission</td> 
     324                <td width="50">enum</td> 
     325                <td width="20">&nbsp;</td> 
     326                <td width="20">&nbsp;</td> 
     327                <td width=""> 
     328                ENUM options: 'read', 'edit' 
     329                </td> 
     330                <td>permission</td> 
     331        </tr> 
     332         
     333        <!-- all the uniques --> 
     334        <tr> 
     335                <td colspan="5">Primary key(id)</td> 
     336                <td>&nbsp;</td> 
     337        </tr> 
     338        <!-- all the indices --> 
     339         
     340</table> 
     341<a href="#_top_of_page">go to top</a> 
     342<p /> 
     343<h2>Table: <a name="Statistics">Statistics</a>  
     344</h2> 
     345<p></p> 
     346<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     347        <!-- table header --> 
     348        <tr><th class="tablehead" colspan="6">Statistics 
     349</th></tr>       
     350        <!-- column headers --> 
     351        <tr> 
     352                <th>attribute</th> 
     353                <th>type</th> 
     354                <th>NULL?</th> 
     355                <th>AUTO?</th> 
     356                <th>constraints</th> 
     357                <th>description</th> 
     358        </tr> 
     359         
     360        <!-- all the fields --> 
     361        <tr> 
     362                <td width="150">id</td> 
     363                <td width="50">int</td> 
     364                <td width="20">&nbsp;</td> 
     365                <td width="20">Y</td> 
     366                <td width=""> 
     367                &nbsp; 
     368                </td> 
     369                <td>id</td> 
     370        </tr> 
     371        <tr> 
     372                <td width="150">mutation</td> 
     373                <td width="50">xref</td> 
     374                <td width="20">&nbsp;</td> 
     375                <td width="20">&nbsp;</td> 
     376                <td width=""> 
     377                References(Mutations) 
     378                </td> 
     379                <td>mutation</td> 
     380        </tr> 
     381        <tr> 
     382                <td width="150">value</td> 
     383                <td width="50">int</td> 
     384                <td width="20">Y</td> 
     385                <td width="20">&nbsp;</td> 
     386                <td width=""> 
     387                &nbsp; 
     388                </td> 
     389                <td>value</td> 
     390        </tr> 
     391        <tr> 
     392                <td width="150">date</td> 
     393                <td width="50">date</td> 
     394                <td width="20">&nbsp;</td> 
     395                <td width="20">&nbsp;</td> 
     396                <td width=""> 
     397                &nbsp; 
     398                </td> 
     399                <td>date</td> 
     400        </tr> 
     401         
     402        <!-- all the uniques --> 
     403        <tr> 
     404                <td colspan="5">Primary key(id)</td> 
     405                <td>&nbsp;</td> 
     406        </tr> 
     407        <!-- all the indices --> 
     408         
     409</table> 
     410<a href="#_top_of_page">go to top</a> 
     411<p /> 
     412<h2>Table: <a name="RNA">RNA</a>  
     413</h2> 
     414<p></p> 
     415<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     416        <!-- table header --> 
     417        <tr><th class="tablehead" colspan="6">RNA 
     418</th></tr>       
     419        <!-- column headers --> 
     420        <tr> 
     421                <th>attribute</th> 
     422                <th>type</th> 
     423                <th>NULL?</th> 
     424                <th>AUTO?</th> 
     425                <th>constraints</th> 
     426                <th>description</th> 
     427        </tr> 
     428         
     429        <!-- all the fields --> 
     430        <tr> 
     431                <td width="150">id</td> 
     432                <td width="50">int</td> 
     433                <td width="20">&nbsp;</td> 
     434                <td width="20">Y</td> 
     435                <td width=""> 
     436                &nbsp; 
     437                </td> 
     438                <td>id</td> 
     439        </tr> 
     440        <tr> 
     441                <td width="150">nucleotides</td> 
     442                <td width="50">string</td> 
     443                <td width="20">&nbsp;</td> 
     444                <td width="20">&nbsp;</td> 
     445                <td width=""> 
     446                &nbsp; 
     447                </td> 
     448                <td>nucleotides</td> 
     449        </tr> 
     450        <tr> 
     451                <td width="150">exon</td> 
     452                <td width="50">int</td> 
     453                <td width="20">&nbsp;</td> 
     454                <td width="20">&nbsp;</td> 
     455                <td width=""> 
     456                &nbsp; 
     457                </td> 
     458                <td>exon</td> 
     459        </tr> 
     460        <tr> 
     461                <td width="150">Codon</td> 
     462                <td width="50">xref</td> 
     463                <td width="20">&nbsp;</td> 
     464                <td width="20">&nbsp;</td> 
     465                <td width=""> 
     466                References(Amino_acid) 
     467                </td> 
     468                <td>Codon</td> 
     469        </tr> 
     470         
     471        <!-- all the uniques --> 
     472        <tr> 
     473                <td colspan="5">Primary key(id)</td> 
     474                <td>&nbsp;</td> 
     475        </tr> 
     476        <!-- all the indices --> 
     477         
     478</table> 
     479<a href="#_top_of_page">go to top</a> 
     480<p /> 
     481<h2>Table: <a name="Amino_acid">Amino_acid</a>  
     482</h2> 
     483<p></p> 
     484<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     485        <!-- table header --> 
     486        <tr><th class="tablehead" colspan="6">Amino_acid 
     487</th></tr>       
     488        <!-- column headers --> 
     489        <tr> 
     490                <th>attribute</th> 
     491                <th>type</th> 
     492                <th>NULL?</th> 
     493                <th>AUTO?</th> 
     494                <th>constraints</th> 
     495                <th>description</th> 
     496        </tr> 
     497         
     498        <!-- all the fields --> 
     499        <tr> 
     500                <td width="150">id</td> 
     501                <td width="50">int</td> 
     502                <td width="20">&nbsp;</td> 
     503                <td width="20">Y</td> 
     504                <td width=""> 
     505                &nbsp; 
     506                </td> 
     507                <td>id</td> 
     508        </tr> 
     509        <tr> 
     510                <td width="150">codon</td> 
     511                <td width="50">string</td> 
     512                <td width="20">&nbsp;</td> 
     513                <td width="20">&nbsp;</td> 
     514                <td width=""> 
     515                &nbsp; 
     516                </td> 
     517                <td>codon</td> 
     518        </tr> 
     519        <tr> 
     520                <td width="150">amino_acid</td> 
     521                <td width="50">string</td> 
     522                <td width="20">&nbsp;</td> 
     523                <td width="20">&nbsp;</td> 
     524                <td width=""> 
     525                &nbsp; 
     526                </td> 
     527                <td>amino_acid</td> 
     528        </tr> 
     529         
     530        <!-- all the uniques --> 
     531        <tr> 
     532                <td colspan="5">Primary key(id)</td> 
     533                <td>&nbsp;</td> 
     534        </tr> 
     535        <!-- all the indices --> 
     536         
     537</table> 
     538<a href="#_top_of_page">go to top</a> 
     539<p /> 
     540<h2>Table: <a name="Mutations">Mutations</a>  
     541</h2> 
     542<p> Here are all mutations known 
     543</p> 
     544<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     545        <!-- table header --> 
     546        <tr><th class="tablehead" colspan="6">Mutations 
     547</th></tr>       
     548        <!-- column headers --> 
     549        <tr> 
     550                <th>attribute</th> 
     551                <th>type</th> 
     552                <th>NULL?</th> 
     553                <th>AUTO?</th> 
     554                <th>constraints</th> 
     555                <th>description</th> 
     556        </tr> 
     557         
     558        <!-- all the fields --> 
     559        <tr> 
     560                <td width="150">id</td> 
     561                <td width="50">int</td> 
     562                <td width="20">&nbsp;</td> 
     563                <td width="20">Y</td> 
     564                <td width=""> 
     565                &nbsp; 
     566                </td> 
     567                <td>id</td> 
     568        </tr> 
     569        <tr> 
     570                <td width="150">nucleotide_change</td> 
     571                <td width="50">string</td> 
     572                <td width="20">&nbsp;</td> 
     573                <td width="20">&nbsp;</td> 
     574                <td width=""> 
     575                &nbsp; 
     576                </td> 
     577                <td>nucleotide_change</td> 
     578        </tr> 
     579        <tr> 
     580                <td width="150">amino_acid</td> 
     581                <td width="50">string</td> 
     582                <td width="20">&nbsp;</td> 
     583                <td width="20">&nbsp;</td> 
     584                <td width=""> 
     585                &nbsp; 
     586                </td> 
     587                <td>amino_acid</td> 
     588        </tr> 
     589        <tr> 
     590                <td width="150">consequence</td> 
     591                <td width="50">xref</td> 
     592                <td width="20">Y</td> 
     593                <td width="20">&nbsp;</td> 
     594                <td width=""> 
     595                References(Consequence) 
     596                </td> 
     597                <td>consequence</td> 
     598        </tr> 
     599         
     600        <!-- all the uniques --> 
     601        <tr> 
     602                <td colspan="5">Primary key(id)</td> 
     603                <td>&nbsp;</td> 
     604        </tr> 
     605        <tr> 
     606                <td colspan="5">Secondary key(nucleotide_change)</td> 
     607                <td>&nbsp;</td> 
     608        </tr> 
     609        <!-- all the indices --> 
     610         
     611</table> 
     612<a href="#_top_of_page">go to top</a> 
     613<p /> 
     614<h2>Table: <a name="Contact">Contact</a>  
     615</h2> 
     616<p></p> 
     617<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     618        <!-- table header --> 
     619        <tr><th class="tablehead" colspan="6">Contact 
     620</th></tr>       
     621        <!-- column headers --> 
     622        <tr> 
     623                <th>attribute</th> 
     624                <th>type</th> 
     625                <th>NULL?</th> 
     626                <th>AUTO?</th> 
     627                <th>constraints</th> 
     628                <th>description</th> 
     629        </tr> 
     630         
     631        <!-- all the fields --> 
     632        <tr> 
     633                <td width="150">id</td> 
     634                <td width="50">int</td> 
     635                <td width="20">&nbsp;</td> 
     636                <td width="20">Y</td> 
     637                <td width=""> 
     638                &nbsp; 
     639                </td> 
     640                <td>id</td> 
     641        </tr> 
     642        <tr> 
     643                <td width="150">name</td> 
     644                <td width="50">string</td> 
     645                <td width="20">&nbsp;</td> 
     646                <td width="20">&nbsp;</td> 
     647                <td width=""> 
     648                &nbsp; 
     649                </td> 
     650                <td>name</td> 
     651        </tr> 
     652        <tr> 
     653                <td width="150">address</td> 
     654                <td width="50">string</td> 
     655                <td width="20">Y</td> 
     656                <td width="20">&nbsp;</td> 
     657                <td width=""> 
     658                &nbsp; 
     659                </td> 
     660                <td>address</td> 
     661        </tr> 
     662        <tr> 
     663                <td width="150">tel</td> 
     664                <td width="50">string</td> 
     665                <td width="20">Y</td> 
     666                <td width="20">&nbsp;</td> 
     667                <td width=""> 
     668                &nbsp; 
     669                </td> 
     670                <td>tel</td> 
     671        </tr> 
     672         
     673        <!-- all the uniques --> 
     674        <tr> 
     675                <td colspan="5">Primary key(id)</td> 
     676                <td>&nbsp;</td> 
     677        </tr> 
     678        <tr> 
     679                <td colspan="5">Secondary key(name)</td> 
     680                <td>&nbsp;</td> 
     681        </tr> 
     682        <!-- all the indices --> 
     683         
     684</table> 
     685<a href="#_top_of_page">go to top</a> 
     686<p /> 
     687<h2>Table: <a name="Patient">Patient</a>  
     688</h2> 
     689<p></p> 
     690<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     691        <!-- table header --> 
     692        <tr><th class="tablehead" colspan="6">Patient 
     693</th></tr>       
     694        <!-- column headers --> 
     695        <tr> 
     696                <th>attribute</th> 
     697                <th>type</th> 
     698                <th>NULL?</th> 
     699                <th>AUTO?</th> 
     700                <th>constraints</th> 
     701                <th>description</th> 
     702        </tr> 
     703         
     704        <!-- all the fields --> 
     705        <tr> 
     706                <td width="150">id</td> 
     707                <td width="50">int</td> 
     708                <td width="20">&nbsp;</td> 
     709                <td width="20">Y</td> 
     710                <td width=""> 
     711                &nbsp; 
     712                </td> 
     713                <td>id</td> 
     714        </tr> 
     715        <tr> 
     716                <td width="150">name</td> 
     717                <td width="50">string</td> 
     718                <td width="20">&nbsp;</td> 
     719                <td width="20">&nbsp;</td> 
     720                <td width=""> 
     721                &nbsp; 
     722                </td> 
     723                <td>name</td> 
     724        </tr> 
     725        <tr> 
     726                <td width="150">age</td> 
     727                <td width="50">int</td> 
     728                <td width="20">Y</td> 
     729                <td width="20">&nbsp;</td> 
     730                <td width=""> 
     731                &nbsp; 
     732                </td> 
     733                <td>age</td> 
     734        </tr> 
     735        <tr> 
     736                <td width="150">alive</td> 
     737                <td width="50">bool</td> 
     738                <td width="20">&nbsp;</td> 
     739                <td width="20">&nbsp;</td> 
     740                <td width=""> 
     741                &nbsp; 
     742                </td> 
     743                <td>alive</td> 
     744        </tr> 
     745        <tr> 
     746                <td width="150">gender</td> 
     747                <td width="50">xref</td> 
     748                <td width="20">&nbsp;</td> 
     749                <td width="20">&nbsp;</td> 
     750                <td width=""> 
     751                References(Gender) 
     752                </td> 
     753                <td>gender</td> 
     754        </tr> 
     755        <tr> 
     756                <td width="150">id_mutation1</td> 
     757                <td width="50">xref</td> 
     758                <td width="20">Y</td> 
     759                <td width="20">&nbsp;</td> 
     760                <td width=""> 
     761                References(Mutations) 
     762                </td> 
     763                <td>id_mutation1</td> 
     764        </tr> 
     765        <tr> 
     766                <td width="150">id_mutation2</td> 
     767                <td width="50">xref</td> 
     768                <td width="20">Y</td> 
     769                <td width="20">&nbsp;</td> 
     770                <td width=""> 
     771                References(Mutations) 
     772                </td> 
     773                <td>id_mutation2</td> 
     774        </tr> 
     775         
     776        <!-- all the uniques --> 
     777        <tr> 
     778                <td colspan="5">Primary key(id)</td> 
     779                <td>&nbsp;</td> 
     780        </tr> 
     781        <!-- all the indices --> 
     782         
     783</table> 
     784<a href="#_top_of_page">go to top</a> 
     785<p /> 
     786<h2>Table: <a name="Gender">Gender</a>  
     787</h2> 
     788<p></p> 
     789<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     790        <!-- table header --> 
     791        <tr><th class="tablehead" colspan="6">Gender 
     792</th></tr>       
     793        <!-- column headers --> 
     794        <tr> 
     795                <th>attribute</th> 
     796                <th>type</th> 
     797                <th>NULL?</th> 
     798                <th>AUTO?</th> 
     799                <th>constraints</th> 
     800                <th>description</th> 
     801        </tr> 
     802         
     803        <!-- all the fields --> 
     804        <tr> 
     805                <td width="150">id</td> 
     806                <td width="50">int</td> 
     807                <td width="20">&nbsp;</td> 
     808                <td width="20">Y</td> 
     809                <td width=""> 
     810                &nbsp; 
     811                </td> 
     812                <td>id</td> 
     813        </tr> 
     814        <tr> 
     815                <td width="150">name</td> 
     816                <td width="50">string</td> 
     817                <td width="20">&nbsp;</td> 
     818                <td width="20">&nbsp;</td> 
     819                <td width=""> 
     820                &nbsp; 
     821                </td> 
     822                <td>name</td> 
     823        </tr> 
     824         
     825        <!-- all the uniques --> 
     826        <tr> 
     827                <td colspan="5">Primary key(id)</td> 
     828                <td>&nbsp;</td> 
     829        </tr> 
     830        <!-- all the indices --> 
     831         
     832</table> 
     833<a href="#_top_of_page">go to top</a> 
     834<p /> 
     835<h2>Table: <a name="Diagnosis">Diagnosis</a>  
     836</h2> 
     837<p></p> 
     838<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     839        <!-- table header --> 
     840        <tr><th class="tablehead" colspan="6">Diagnosis 
     841</th></tr>       
     842        <!-- column headers --> 
     843        <tr> 
     844                <th>attribute</th> 
     845                <th>type</th> 
     846                <th>NULL?</th> 
     847                <th>AUTO?</th> 
     848                <th>constraints</th> 
     849                <th>description</th> 
     850        </tr> 
     851         
     852        <!-- all the fields --> 
     853        <tr> 
     854                <td width="150">id</td> 
     855                <td width="50">int</td> 
     856                <td width="20">&nbsp;</td> 
     857                <td width="20">Y</td> 
     858                <td width=""> 
     859                &nbsp; 
     860                </td> 
     861                <td>id</td> 
     862        </tr> 
     863        <tr> 
     864                <td width="150">value</td> 
     865                <td width="50">text</td> 
     866                <td width="20">&nbsp;</td> 
     867                <td width="20">&nbsp;</td> 
     868                <td width=""> 
     869                &nbsp; 
     870                </td> 
     871                <td>value</td> 
     872        </tr> 
     873        <tr> 
     874                <td width="150">id_phenotype</td> 
     875                <td width="50">xref</td> 
     876                <td width="20">&nbsp;</td> 
     877                <td width="20">&nbsp;</td> 
     878                <td width=""> 
     879                References(Phenotype) 
     880                </td> 
     881                <td>id_phenotype</td> 
     882        </tr> 
     883        <tr> 
     884                <td width="150">id_patient</td> 
     885                <td width="50">xref</td> 
     886                <td width="20">&nbsp;</td> 
     887                <td width="20">&nbsp;</td> 
     888                <td width=""> 
     889                References(Patient) 
     890                </td> 
     891                <td>id_patient</td> 
     892        </tr> 
     893         
     894        <!-- all the uniques --> 
     895        <tr> 
     896                <td colspan="5">Primary key(id)</td> 
     897                <td>&nbsp;</td> 
     898        </tr> 
     899        <!-- all the indices --> 
     900         
     901</table> 
     902<a href="#_top_of_page">go to top</a> 
     903<p /> 
     904<h2>Table: <a name="Phenotype">Phenotype</a>  
     905</h2> 
     906<p></p> 
     907<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     908        <!-- table header --> 
     909        <tr><th class="tablehead" colspan="6">Phenotype 
     910</th></tr>       
     911        <!-- column headers --> 
     912        <tr> 
     913                <th>attribute</th> 
     914                <th>type</th> 
     915                <th>NULL?</th> 
     916                <th>AUTO?</th> 
     917                <th>constraints</th> 
     918                <th>description</th> 
     919        </tr> 
     920         
     921        <!-- all the fields --> 
     922        <tr> 
     923                <td width="150">id</td> 
     924                <td width="50">int</td> 
     925                <td width="20">&nbsp;</td> 
     926                <td width="20">Y</td> 
     927                <td width=""> 
     928                &nbsp; 
     929                </td> 
     930                <td>id</td> 
     931        </tr> 
    145932        <tr> 
    146933                <td width="150">Description</td> 
    147934                <td width="50">text</td> 
    148                 <td width="20">Y</td> 
    149                 <td width="20">&nbsp;</td> 
    150                 <td width=""> 
    151                 &nbsp; 
    152                 </td> 
    153                 <td>Optional description text</td> 
     935                <td width="20">&nbsp;</td> 
     936                <td width="20">&nbsp;</td> 
     937                <td width=""> 
     938                &nbsp; 
     939                </td> 
     940                <td>Description</td> 
    154941        </tr> 
    155942        <tr> 
    156943                <td width="150">Date</td> 
    157944                <td width="50">date</td> 
    158                 <td width="20">&nbsp;</td> 
    159                 <td width="20">Y</td> 
    160                 <td width=""> 
    161                 &nbsp; 
    162                 </td> 
    163                 <td>Creation date, with an automatic default to 'today'</td> 
    164         </tr> 
    165         <tr> 
    166                 <td width="150">Id</td> 
    167                 <td width="50">int</td> 
    168                 <td width="20">&nbsp;</td> 
    169                 <td width="20">Y</td> 
    170                 <td width=""> 
    171                 &nbsp; 
    172                 </td> 
    173                 <td>autogenerated id number (autoid)</td> 
    174         </tr> 
    175          
    176         <!-- all the uniques --> 
    177         <tr> 
    178                 <td colspan="5">Primary key(Id)</td> 
    179                 <td>&nbsp;</td> 
    180         </tr> 
    181         <tr> 
    182                 <td colspan="5">Secondary key(Name)</td> 
    183                 <td>&nbsp;</td> 
    184         </tr> 
    185         <tr> 
    186                 <td colspan="5">Secondary key(Id)</td> 
    187                 <td>&nbsp;</td> 
    188         </tr> 
    189         <!-- all the indices --> 
    190          
    191 </table> 
    192 <a href="#_top_of_page">go to top</a> 
    193 <p /> 
    194 <h2>Table: <a name="Sample">Sample</a>  
    195 </h2> 
    196 <p>Samples that are part of an experiment. 
    197                  
     945                <td width="20">Y</td> 
     946                <td width="20">&nbsp;</td> 
     947                <td width=""> 
     948                &nbsp; 
     949                </td> 
     950                <td>Date</td> 
     951        </tr> 
     952         
     953        <!-- all the uniques --> 
     954        <tr> 
     955                <td colspan="5">Primary key(id)</td> 
     956                <td>&nbsp;</td> 
     957        </tr> 
     958        <!-- all the indices --> 
     959         
     960</table> 
     961<a href="#_top_of_page">go to top</a> 
     962<p /> 
     963<h2>Table: <a name="E_M">E_M</a>  
     964</h2> 
     965<p></p> 
     966<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     967        <!-- table header --> 
     968        <tr><th class="tablehead" colspan="6">E_M 
     969</th></tr>       
     970        <!-- column headers --> 
     971        <tr> 
     972                <th>attribute</th> 
     973                <th>type</th> 
     974                <th>NULL?</th> 
     975                <th>AUTO?</th> 
     976                <th>constraints</th> 
     977                <th>description</th> 
     978        </tr> 
     979         
     980        <!-- all the fields --> 
     981        <tr> 
     982                <td width="150">id</td> 
     983                <td width="50">int</td> 
     984                <td width="20">&nbsp;</td> 
     985                <td width="20">Y</td> 
     986                <td width=""> 
     987                &nbsp; 
     988                </td> 
     989                <td>id</td> 
     990        </tr> 
     991        <tr> 
     992                <td width="150">patient</td> 
     993                <td width="50">xref</td> 
     994                <td width="20">&nbsp;</td> 
     995                <td width="20">&nbsp;</td> 
     996                <td width=""> 
     997                References(Patient) 
     998                </td> 
     999                <td>patient</td> 
     1000        </tr> 
     1001        <tr> 
     1002                <td width="150">value</td> 
     1003                <td width="50">string</td> 
     1004                <td width="20">&nbsp;</td> 
     1005                <td width="20">&nbsp;</td> 
     1006                <td width=""> 
     1007                &nbsp; 
     1008                </td> 
     1009                <td>value</td> 
     1010        </tr> 
     1011        <tr> 
     1012                <td width="150">Anchoring_fibers</td> 
     1013                <td width="50">string</td> 
     1014                <td width="20">Y</td> 
     1015                <td width="20">&nbsp;</td> 
     1016                <td width=""> 
     1017                &nbsp; 
     1018                </td> 
     1019                <td>Anchoring_fibers</td> 
     1020        </tr> 
     1021        <tr> 
     1022                <td width="150">Hemi_desmosomes</td> 
     1023                <td width="50">string</td> 
     1024                <td width="20">Y</td> 
     1025                <td width="20">&nbsp;</td> 
     1026                <td width=""> 
     1027                &nbsp; 
     1028                </td> 
     1029                <td>Hemi_desmosomes</td> 
     1030        </tr> 
     1031        <tr> 
     1032                <td width="150">description</td> 
     1033                <td width="50">text</td> 
     1034                <td width="20">&nbsp;</td> 
     1035                <td width="20">&nbsp;</td> 
     1036                <td width=""> 
     1037                &nbsp; 
     1038                </td> 
     1039                <td>description</td> 
     1040        </tr> 
     1041         
     1042        <!-- all the uniques --> 
     1043        <tr> 
     1044                <td colspan="5">Primary key(id)</td> 
     1045                <td>&nbsp;</td> 
     1046        </tr> 
     1047        <!-- all the indices --> 
     1048         
     1049</table> 
     1050<a href="#_top_of_page">go to top</a> 
     1051<p /> 
     1052<h2>Table: <a name="I_F">I_F</a>  
     1053</h2> 
     1054<p></p> 
     1055<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1056        <!-- table header --> 
     1057        <tr><th class="tablehead" colspan="6">I_F 
     1058</th></tr>       
     1059        <!-- column headers --> 
     1060        <tr> 
     1061                <th>attribute</th> 
     1062                <th>type</th> 
     1063                <th>NULL?</th> 
     1064                <th>AUTO?</th> 
     1065                <th>constraints</th> 
     1066                <th>description</th> 
     1067        </tr> 
     1068         
     1069        <!-- all the fields --> 
     1070        <tr> 
     1071                <td width="150">id</td> 
     1072                <td width="50">int</td> 
     1073                <td width="20">&nbsp;</td> 
     1074                <td width="20">Y</td> 
     1075                <td width=""> 
     1076                &nbsp; 
     1077                </td> 
     1078                <td>id</td> 
     1079        </tr> 
     1080        <tr> 
     1081                <td width="150">patient</td> 
     1082                <td width="50">xref</td> 
     1083                <td width="20">Y</td> 
     1084                <td width="20">&nbsp;</td> 
     1085                <td width=""> 
     1086                References(Patient) 
     1087                </td> 
     1088                <td>patient</td> 
     1089        </tr> 
     1090        <tr> 
     1091                <td width="150">test_LH72</td> 
     1092                <td width="50">string</td> 
     1093                <td width="20">Y</td> 
     1094                <td width="20">&nbsp;</td> 
     1095                <td width=""> 
     1096                &nbsp; 
     1097                </td> 
     1098                <td>test_LH72</td> 
     1099        </tr> 
     1100        <tr> 
     1101                <td width="150">test_2Q633</td> 
     1102                <td width="50">string</td> 
     1103                <td width="20">Y</td> 
     1104                <td width="20">&nbsp;</td> 
     1105                <td width=""> 
     1106                &nbsp; 
     1107                </td> 
     1108                <td>test_2Q633</td> 
     1109        </tr> 
     1110        <tr> 
     1111                <td width="150">keratine_14</td> 
     1112                <td width="50">string</td> 
     1113                <td width="20">Y</td> 
     1114                <td width="20">&nbsp;</td> 
     1115                <td width=""> 
     1116                &nbsp; 
     1117                </td> 
     1118                <td>keratine_14</td> 
     1119        </tr> 
     1120        <tr> 
     1121                <td width="150">BP180_1D1</td> 
     1122                <td width="50">string</td> 
     1123                <td width="20">Y</td> 
     1124                <td width="20">&nbsp;</td> 
     1125                <td width=""> 
     1126                &nbsp; 
     1127                </td> 
     1128                <td>BP180_1D1</td> 
     1129        </tr> 
     1130        <tr> 
     1131                <td width="150">Niceine_GB3</td> 
     1132                <td width="50">string</td> 
     1133                <td width="20">Y</td> 
     1134                <td width="20">&nbsp;</td> 
     1135                <td width=""> 
     1136                &nbsp; 
     1137                </td> 
     1138                <td>Niceine_GB3</td> 
     1139        </tr> 
     1140        <tr> 
     1141                <td width="150">Collagen</td> 
     1142                <td width="50">string</td> 
     1143                <td width="20">Y</td> 
     1144                <td width="20">&nbsp;</td> 
     1145                <td width=""> 
     1146                &nbsp; 
     1147                </td> 
     1148                <td>Collagen</td> 
     1149        </tr> 
     1150        <tr> 
     1151                <td width="150">description</td> 
     1152                <td width="50">text</td> 
     1153                <td width="20">&nbsp;</td> 
     1154                <td width="20">&nbsp;</td> 
     1155                <td width=""> 
     1156                &nbsp; 
     1157                </td> 
     1158                <td>description</td> 
     1159        </tr> 
     1160         
     1161        <!-- all the uniques --> 
     1162        <tr> 
     1163                <td colspan="5">Primary key(id)</td> 
     1164                <td>&nbsp;</td> 
     1165        </tr> 
     1166        <!-- all the indices --> 
     1167         
     1168</table> 
     1169<a href="#_top_of_page">go to top</a> 
     1170<p /> 
     1171<h2>Table: <a name="Consequence">Consequence</a>  
     1172</h2> 
     1173<p></p> 
     1174<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1175        <!-- table header --> 
     1176        <tr><th class="tablehead" colspan="6">Consequence 
     1177</th></tr>       
     1178        <!-- column headers --> 
     1179        <tr> 
     1180                <th>attribute</th> 
     1181                <th>type</th> 
     1182                <th>NULL?</th> 
     1183                <th>AUTO?</th> 
     1184                <th>constraints</th> 
     1185                <th>description</th> 
     1186        </tr> 
     1187         
     1188        <!-- all the fields --> 
     1189        <tr> 
     1190                <td width="150">id</td> 
     1191                <td width="50">int</td> 
     1192                <td width="20">&nbsp;</td> 
     1193                <td width="20">Y</td> 
     1194                <td width=""> 
     1195                &nbsp; 
     1196                </td> 
     1197                <td>id</td> 
     1198        </tr> 
     1199        <tr> 
     1200                <td width="150">consequence</td> 
     1201                <td width="50">string</td> 
     1202                <td width="20">&nbsp;</td> 
     1203                <td width="20">&nbsp;</td> 
     1204                <td width=""> 
     1205                &nbsp; 
     1206                </td> 
     1207                <td>consequence</td> 
     1208        </tr> 
     1209         
     1210        <!-- all the uniques --> 
     1211        <tr> 
     1212                <td colspan="5">Primary key(id)</td> 
     1213                <td>&nbsp;</td> 
     1214        </tr> 
     1215        <!-- all the indices --> 
     1216         
     1217</table> 
     1218<a href="#_top_of_page">go to top</a> 
     1219<p /> 
     1220<h2>Table: <a name="Pictures">Pictures</a>  
     1221</h2> 
     1222<p></p> 
     1223<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1224        <!-- table header --> 
     1225        <tr><th class="tablehead" colspan="6">Pictures 
     1226</th></tr>       
     1227        <!-- column headers --> 
     1228        <tr> 
     1229                <th>attribute</th> 
     1230                <th>type</th> 
     1231                <th>NULL?</th> 
     1232                <th>AUTO?</th> 
     1233                <th>constraints</th> 
     1234                <th>description</th> 
     1235        </tr> 
     1236         
     1237        <!-- all the fields --> 
     1238        <tr> 
     1239                <td width="150">id</td> 
     1240                <td width="50">int</td> 
     1241                <td width="20">&nbsp;</td> 
     1242                <td width="20">Y</td> 
     1243                <td width=""> 
     1244                &nbsp; 
     1245                </td> 
     1246                <td>id</td> 
     1247        </tr> 
     1248        <tr> 
     1249                <td width="150">small</td> 
     1250                <td width="50">file</td> 
     1251                <td width="20">&nbsp;</td> 
     1252                <td width="20">&nbsp;</td> 
     1253                <td width=""> 
     1254                &nbsp; 
     1255                </td> 
     1256                <td>small</td> 
     1257        </tr> 
     1258        <tr> 
     1259                <td width="150">large</td> 
     1260                <td width="50">file</td> 
     1261                <td width="20">&nbsp;</td> 
     1262                <td width="20">&nbsp;</td> 
     1263                <td width=""> 
     1264                &nbsp; 
     1265                </td> 
     1266                <td>large</td> 
     1267        </tr> 
     1268        <tr> 
     1269                <td width="150">id_patient</td> 
     1270                <td width="50">xref</td> 
     1271                <td width="20">&nbsp;</td> 
     1272                <td width="20">&nbsp;</td> 
     1273                <td width=""> 
     1274                References(Patient) 
     1275                </td> 
     1276                <td>id_patient</td> 
     1277        </tr> 
     1278         
     1279        <!-- all the uniques --> 
     1280        <tr> 
     1281                <td colspan="5">Primary key(id)</td> 
     1282                <td>&nbsp;</td> 
     1283        </tr> 
     1284        <!-- all the indices --> 
     1285         
     1286</table> 
     1287<a href="#_top_of_page">go to top</a> 
     1288<p /> 
     1289<h2>Table: <a name="DataElement">DataElement</a> (interface).  
     1290</h2> 
     1291<p> 
     1292                                Generic data structure for aiming the values of a data 
     1293                                set as described in Data. Each DataElement describes a 
     1294                                cell in a data matrix of rows (from) and columns (to), 
     1295                                e.g., in "dataset X" it was measured that geneX (col) 
     1296                                relates to geneZ (row). 
     1297                         
    1981298</p> 
    1991299<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    2001300        <!-- table header --> 
    201         <tr><th class="tablehead" colspan="6">Sample 
    202  implements Identifiable</th></tr>       
     1301        <tr><th class="tablehead" colspan="6">DataElement 
     1302</th></tr>       
     1303        <!-- column headers --> 
     1304        <tr> 
     1305                <th>attribute</th> 
     1306                <th>type</th> 
     1307                <th>NULL?</th> 
     1308                <th>AUTO?</th> 
     1309                <th>constraints</th> 
     1310                <th>description</th> 
     1311        </tr> 
     1312         
     1313        <!-- all the fields --> 
     1314        <tr> 
     1315                <td width="150">id</td> 
     1316                <td width="50">int</td> 
     1317                <td width="20">&nbsp;</td> 
     1318                <td width="20">Y</td> 
     1319                <td width=""> 
     1320                &nbsp; 
     1321                </td> 
     1322                <td>automatically generated id-field</td> 
     1323        </tr> 
     1324        <tr> 
     1325                <td width="150">Data</td> 
     1326                <td width="50">xref</td> 
     1327                <td width="20">&nbsp;</td> 
     1328                <td width="20">&nbsp;</td> 
     1329                <td width=""> 
     1330                References(Data) 
     1331                </td> 
     1332                <td>Reference to the data this entity belongs to.</td> 
     1333        </tr> 
     1334        <tr> 
     1335                <td width="150">Col</td> 
     1336                <td width="50">xref</td> 
     1337                <td width="20">&nbsp;</td> 
     1338                <td width="20">&nbsp;</td> 
     1339                <td width=""> 
     1340                References(DimensionElement) 
     1341                </td> 
     1342                <td>References the DimensionElement on one end of the relation. Can be ommited for 1D data (i.e., a data list)</td> 
     1343        </tr> 
     1344        <tr> 
     1345                <td width="150">Row</td> 
     1346                <td width="50">xref</td> 
     1347                <td width="20">&nbsp;</td> 
     1348                <td width="20">&nbsp;</td> 
     1349                <td width=""> 
     1350                References(DimensionElement) 
     1351                </td> 
     1352                <td>References the DimensionElement on the other end of the relation.</td> 
     1353        </tr> 
     1354        <tr> 
     1355                <td width="150">RowIndex</td> 
     1356                <td width="50">int</td> 
     1357                <td width="20">&nbsp;</td> 
     1358                <td width="20">&nbsp;</td> 
     1359                <td width=""> 
     1360                &nbsp; 
     1361                </td> 
     1362                <td>Row position in the matrix.</td> 
     1363        </tr> 
     1364        <tr> 
     1365                <td width="150">ColIndex</td> 
     1366                <td width="50">int</td> 
     1367                <td width="20">&nbsp;</td> 
     1368                <td width="20">&nbsp;</td> 
     1369                <td width=""> 
     1370                &nbsp; 
     1371                </td> 
     1372                <td>Col position in the matrix.</td> 
     1373        </tr> 
     1374         
     1375        <!-- all the uniques --> 
     1376        <tr> 
     1377                <td colspan="5">Primary key(id)</td> 
     1378                <td>&nbsp;</td> 
     1379        </tr> 
     1380        <tr> 
     1381                <td colspan="5">Secondary key(ColIndex, RowIndex, Data)</td> 
     1382                <td>&nbsp;</td> 
     1383        </tr> 
     1384        <tr> 
     1385                <td colspan="5">Secondary key(RowIndex, ColIndex, Data)</td> 
     1386                <td>&nbsp;</td> 
     1387        </tr> 
     1388        <!-- all the indices --> 
     1389         
     1390</table> 
     1391<a href="#_top_of_page">go to top</a> 
     1392<p /> 
     1393<h2>Table: <a name="DecimalDataElement">DecimalDataElement</a>  
     1394</h2> 
     1395<p> 
     1396                                A DataElement for storing decimal data. 
     1397                         
     1398</p> 
     1399<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1400        <!-- table header --> 
     1401        <tr><th class="tablehead" colspan="6">DecimalDataElement 
     1402 implements DataElement</th></tr>        
     1403        <!-- column headers --> 
     1404        <tr> 
     1405                <th>attribute</th> 
     1406                <th>type</th> 
     1407                <th>NULL?</th> 
     1408                <th>AUTO?</th> 
     1409                <th>constraints</th> 
     1410                <th>description</th> 
     1411        </tr> 
     1412         
     1413        <!-- all the fields --> 
     1414        <tr> 
     1415                <td width="150">Value</td> 
     1416                <td width="50">decimal</td> 
     1417                <td width="20">Y</td> 
     1418                <td width="20">&nbsp;</td> 
     1419                <td width=""> 
     1420                &nbsp; 
     1421                </td> 
     1422                <td>The value, e.g., correlation.</td> 
     1423        </tr> 
     1424        <tr> 
     1425                <td width="150">id</td> 
     1426                <td width="50">int</td> 
     1427                <td width="20">&nbsp;</td> 
     1428                <td width="20">Y</td> 
     1429                <td width=""> 
     1430                &nbsp; 
     1431                </td> 
     1432                <td>automatically generated id-field</td> 
     1433        </tr> 
     1434         
     1435        <!-- all the uniques --> 
     1436        <tr> 
     1437                <td colspan="5">Primary key(id)</td> 
     1438                <td>&nbsp;</td> 
     1439        </tr> 
     1440        <tr> 
     1441                <td colspan="5">Secondary key(ColIndex, RowIndex, Data)</td> 
     1442                <td>&nbsp;</td> 
     1443        </tr> 
     1444        <tr> 
     1445                <td colspan="5">Secondary key(RowIndex, ColIndex, Data)</td> 
     1446                <td>&nbsp;</td> 
     1447        </tr> 
     1448        <tr> 
     1449                <td colspan="5">Secondary key(id)</td> 
     1450                <td>&nbsp;</td> 
     1451        </tr> 
     1452        <!-- all the indices --> 
     1453         
     1454</table> 
     1455<a href="#_top_of_page">go to top</a> 
     1456<p /> 
     1457<h2>Table: <a name="TextDataElement">TextDataElement</a>  
     1458</h2> 
     1459<p>Store text data 
     1460</p> 
     1461<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1462        <!-- table header --> 
     1463        <tr><th class="tablehead" colspan="6">TextDataElement 
     1464 implements DataElement</th></tr>        
     1465        <!-- column headers --> 
     1466        <tr> 
     1467                <th>attribute</th> 
     1468                <th>type</th> 
     1469                <th>NULL?</th> 
     1470                <th>AUTO?</th> 
     1471                <th>constraints</th> 
     1472                <th>description</th> 
     1473        </tr> 
     1474         
     1475        <!-- all the fields --> 
     1476        <tr> 
     1477                <td width="150">Value</td> 
     1478                <td width="50">text</td> 
     1479                <td width="20">Y</td> 
     1480                <td width="20">&nbsp;</td> 
     1481                <td width=""> 
     1482                &nbsp; 
     1483                </td> 
     1484                <td>The value, e.g., genotype strings like AA, BA, BB.</td> 
     1485        </tr> 
     1486        <tr> 
     1487                <td width="150">id</td> 
     1488                <td width="50">int</td> 
     1489                <td width="20">&nbsp;</td> 
     1490                <td width="20">Y</td> 
     1491                <td width=""> 
     1492                &nbsp; 
     1493                </td> 
     1494                <td>automatically generated id-field</td> 
     1495        </tr> 
     1496         
     1497        <!-- all the uniques --> 
     1498        <tr> 
     1499                <td colspan="5">Primary key(id)</td> 
     1500                <td>&nbsp;</td> 
     1501        </tr> 
     1502        <tr> 
     1503                <td colspan="5">Secondary key(ColIndex, RowIndex, Data)</td> 
     1504                <td>&nbsp;</td> 
     1505        </tr> 
     1506        <tr> 
     1507                <td colspan="5">Secondary key(RowIndex, ColIndex, Data)</td> 
     1508                <td>&nbsp;</td> 
     1509        </tr> 
     1510        <tr> 
     1511                <td colspan="5">Secondary key(id)</td> 
     1512                <td>&nbsp;</td> 
     1513        </tr> 
     1514        <!-- all the indices --> 
     1515         
     1516</table> 
     1517<a href="#_top_of_page">go to top</a> 
     1518<p /> 
     1519<h2>Table: <a name="Describable">Describable</a>  
     1520</h2> 
     1521<p></p> 
     1522<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1523        <!-- table header --> 
     1524        <tr><th class="tablehead" colspan="6">Describable 
     1525</th></tr>       
    2031526        <!-- column headers --> 
    2041527        <tr> 
     
    2181541                <td width="20">Y</td> 
    2191542                <td width=""> 
    220                 ENUM options: 'Sample', 'SpecialSample' 
     1543                ENUM options: 'Describable', 'Data', 'FugeData', 'DimensionElement', 'FugeDimensionElement', 'Investigation', 'FugeInvestigation', 'Identifiable' 
    2211544                </td> 
    2221545                <td>Subtypes have to be set to allow searching</td> 
    2231546        </tr> 
    2241547        <tr> 
    225                 <td width="150">Species</td> 
    226                 <td width="50">string</td> 
    227                 <td width="20">&nbsp;</td> 
    228                 <td width="20">&nbsp;</td> 
    229                 <td width=""> 
    230                 &nbsp; 
    231                 </td> 
    232                 <td>Species, default to Arabidopsis</td> 
    233         </tr> 
    234         <tr> 
    235                 <td width="150">Tissue</td> 
    236                 <td width="50">string</td> 
    237                 <td width="20">Y</td> 
    238                 <td width="20">&nbsp;</td> 
    239                 <td width=""> 
    240                 &nbsp; 
    241                 </td> 
    242                 <td>Optional specification of tissue</td> 
    243         </tr> 
    244         <tr> 
    245                 <td width="150">Sex</td> 
     1548                <td width="150">id</td> 
     1549                <td width="50">int</td> 
     1550                <td width="20">&nbsp;</td> 
     1551                <td width="20">Y</td> 
     1552                <td width=""> 
     1553                &nbsp; 
     1554                </td> 
     1555                <td>automatically generated id-field</td> 
     1556        </tr> 
     1557         
     1558        <!-- all the uniques --> 
     1559        <tr> 
     1560                <td colspan="5">Primary key(id)</td> 
     1561                <td>&nbsp;</td> 
     1562        </tr> 
     1563        <!-- all the indices --> 
     1564         
     1565</table> 
     1566<a href="#_top_of_page">go to top</a> 
     1567<p /> 
     1568<h2>Table: <a name="Identifiable">Identifiable</a>  
     1569</h2> 
     1570<p></p> 
     1571<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1572        <!-- table header --> 
     1573        <tr><th class="tablehead" colspan="6">Identifiable extends Describable 
     1574</th></tr>       
     1575        <!-- column headers --> 
     1576        <tr> 
     1577                <th>attribute</th> 
     1578                <th>type</th> 
     1579                <th>NULL?</th> 
     1580                <th>AUTO?</th> 
     1581                <th>constraints</th> 
     1582                <th>description</th> 
     1583        </tr> 
     1584         
     1585        <!-- all the fields --> 
     1586        <tr> 
     1587                <td width="150">name</td> 
     1588                <td width="50">string</td> 
     1589                <td width="20">&nbsp;</td> 
     1590                <td width="20">&nbsp;</td> 
     1591                <td width=""> 
     1592                &nbsp; 
     1593                </td> 
     1594                <td>The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1595        </tr> 
     1596        <tr> 
     1597                <td width="150">id</td> 
     1598                <td width="50">int</td> 
     1599                <td width="20">&nbsp;</td> 
     1600                <td width="20">Y</td> 
     1601                <td width=""> 
     1602                &nbsp; 
     1603                </td> 
     1604                <td>automatically generated id-field</td> 
     1605        </tr> 
     1606         
     1607        <!-- all the uniques --> 
     1608        <tr> 
     1609                <td colspan="5">Primary key(id)</td> 
     1610                <td>&nbsp;</td> 
     1611        </tr> 
     1612        <!-- all the indices --> 
     1613         
     1614</table> 
     1615<a href="#_top_of_page">go to top</a> 
     1616<p /> 
     1617<h2>Table: <a name="FugeData">FugeData</a>  
     1618</h2> 
     1619<p></p> 
     1620<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1621        <!-- table header --> 
     1622        <tr><th class="tablehead" colspan="6">FugeData extends Identifiable 
     1623</th></tr>       
     1624        <!-- column headers --> 
     1625        <tr> 
     1626                <th>attribute</th> 
     1627                <th>type</th> 
     1628                <th>NULL?</th> 
     1629                <th>AUTO?</th> 
     1630                <th>constraints</th> 
     1631                <th>description</th> 
     1632        </tr> 
     1633         
     1634        <!-- all the fields --> 
     1635        <tr> 
     1636                <td width="150">id</td> 
     1637                <td width="50">int</td> 
     1638                <td width="20">&nbsp;</td> 
     1639                <td width="20">Y</td> 
     1640                <td width=""> 
     1641                &nbsp; 
     1642                </td> 
     1643                <td>automatically generated id-field</td> 
     1644        </tr> 
     1645         
     1646        <!-- all the uniques --> 
     1647        <tr> 
     1648                <td colspan="5">Primary key(id)</td> 
     1649                <td>&nbsp;</td> 
     1650        </tr> 
     1651        <!-- all the indices --> 
     1652         
     1653</table> 
     1654<a href="#_top_of_page">go to top</a> 
     1655<p /> 
     1656<h2>Table: <a name="Data">Data</a>  
     1657</h2> 
     1658<p> 
     1659                                Generic structure for describing data matrices such as 
     1660                                genotype result, gene expression measurement, QTL 
     1661                                calculation, etc. 
     1662                         
     1663</p> 
     1664<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1665        <!-- table header --> 
     1666        <tr><th class="tablehead" colspan="6">Data extends FugeData 
     1667</th></tr>       
     1668        <!-- column headers --> 
     1669        <tr> 
     1670                <th>attribute</th> 
     1671                <th>type</th> 
     1672                <th>NULL?</th> 
     1673                <th>AUTO?</th> 
     1674                <th>constraints</th> 
     1675                <th>description</th> 
     1676        </tr> 
     1677         
     1678        <!-- all the fields --> 
     1679        <tr> 
     1680                <td width="150">RowType</td> 
    2461681                <td width="50">enum</td> 
    2471682                <td width="20">&nbsp;</td> 
    2481683                <td width="20">&nbsp;</td> 
    2491684                <td width=""> 
    250                 ENUM options: 'male', 'female', 'unknown' 
    251                 </td> 
    252                 <td>Fixed choice on Sex</td> 
    253         </tr> 
    254         <tr> 
    255                 <td width="150">Experiment</td> 
     1685                ENUM options: 'Patient', 'Phenotype' 
     1686                </td> 
     1687                <td>Type of the columns of this matrix. Each column refers to a Trait or Subject (DimensionElement).</td> 
     1688        </tr> 
     1689        <tr> 
     1690                <td width="150">ColType</td> 
     1691                <td width="50">enum</td> 
     1692                <td width="20">&nbsp;</td> 
     1693                <td width="20">&nbsp;</td> 
     1694                <td width=""> 
     1695                ENUM options: 'Patient', 'Phenotype' 
     1696                </td> 
     1697                <td>Type of the rows of this matrix. Each row refers to a Trait or Subject (DimensionElement)</td> 
     1698        </tr> 
     1699        <tr> 
     1700                <td width="150">ValueType</td> 
     1701                <td width="50">enum</td> 
     1702                <td width="20">&nbsp;</td> 
     1703                <td width="20">&nbsp;</td> 
     1704                <td width=""> 
     1705                ENUM options: 'Text', 'Decimal' 
     1706                </td> 
     1707                <td>Type of the values of this matrix. E.g. text strings or decimal numbers.</td> 
     1708        </tr> 
     1709        <tr> 
     1710                <td width="150">TotalRows</td> 
     1711                <td width="50">int</td> 
     1712                <td width="20">&nbsp;</td> 
     1713                <td width="20">&nbsp;</td> 
     1714                <td width=""> 
     1715                &nbsp; 
     1716                </td> 
     1717                <td>TotalRows</td> 
     1718        </tr> 
     1719        <tr> 
     1720                <td width="150">TotalCols</td> 
     1721                <td width="50">int</td> 
     1722                <td width="20">&nbsp;</td> 
     1723                <td width="20">&nbsp;</td> 
     1724                <td width=""> 
     1725                &nbsp; 
     1726                </td> 
     1727                <td>TotalCols</td> 
     1728        </tr> 
     1729        <tr> 
     1730                <td width="150">id</td> 
     1731                <td width="50">int</td> 
     1732                <td width="20">&nbsp;</td> 
     1733                <td width="20">Y</td> 
     1734                <td width=""> 
     1735                &nbsp; 
     1736                </td> 
     1737                <td>automatically generated id-field</td> 
     1738        </tr> 
     1739        <tr> 
     1740                <td width="150">name</td> 
     1741                <td width="50">string</td> 
     1742                <td width="20">&nbsp;</td> 
     1743                <td width="20">&nbsp;</td> 
     1744                <td width=""> 
     1745                &nbsp; 
     1746                </td> 
     1747                <td>The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1748        </tr> 
     1749         
     1750        <!-- all the uniques --> 
     1751        <tr> 
     1752                <td colspan="5">Primary key(id)</td> 
     1753                <td>&nbsp;</td> 
     1754        </tr> 
     1755        <tr> 
     1756                <td colspan="5">Secondary key(name)</td> 
     1757                <td>&nbsp;</td> 
     1758        </tr> 
     1759        <!-- all the indices --> 
     1760         
     1761</table> 
     1762<a href="#_top_of_page">go to top</a> 
     1763<p /> 
     1764<h2>Table: <a name="FugeDimensionElement">FugeDimensionElement</a>  
     1765</h2> 
     1766<p></p> 
     1767<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1768        <!-- table header --> 
     1769        <tr><th class="tablehead" colspan="6">FugeDimensionElement extends Identifiable 
     1770</th></tr>       
     1771        <!-- column headers --> 
     1772        <tr> 
     1773                <th>attribute</th> 
     1774                <th>type</th> 
     1775                <th>NULL?</th> 
     1776                <th>AUTO?</th> 
     1777                <th>constraints</th> 
     1778                <th>description</th> 
     1779        </tr> 
     1780         
     1781        <!-- all the fields --> 
     1782        <tr> 
     1783                <td width="150">id</td> 
     1784                <td width="50">int</td> 
     1785                <td width="20">&nbsp;</td> 
     1786                <td width="20">Y</td> 
     1787                <td width=""> 
     1788                &nbsp; 
     1789                </td> 
     1790                <td>automatically generated id-field</td> 
     1791        </tr> 
     1792         
     1793        <!-- all the uniques --> 
     1794        <tr> 
     1795                <td colspan="5">Primary key(id)</td> 
     1796                <td>&nbsp;</td> 
     1797        </tr> 
     1798        <!-- all the indices --> 
     1799         
     1800</table> 
     1801<a href="#_top_of_page">go to top</a> 
     1802<p /> 
     1803<h2>Table: <a name="FugeInvestigation">FugeInvestigation</a>  
     1804</h2> 
     1805<p></p> 
     1806<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1807        <!-- table header --> 
     1808        <tr><th class="tablehead" colspan="6">FugeInvestigation extends Identifiable 
     1809</th></tr>       
     1810        <!-- column headers --> 
     1811        <tr> 
     1812                <th>attribute</th> 
     1813                <th>type</th> 
     1814                <th>NULL?</th> 
     1815                <th>AUTO?</th> 
     1816                <th>constraints</th> 
     1817                <th>description</th> 
     1818        </tr> 
     1819         
     1820        <!-- all the fields --> 
     1821        <tr> 
     1822                <td width="150">start</td> 
     1823                <td width="50">datetime</td> 
     1824                <td width="20">Y</td> 
     1825                <td width="20">&nbsp;</td> 
     1826                <td width=""> 
     1827                &nbsp; 
     1828                </td> 
     1829                <td>The start point of the investigation. (n.b. removed null constraint)</td> 
     1830        </tr> 
     1831        <tr> 
     1832                <td width="150">end</td> 
     1833                <td width="50">datetime</td> 
     1834                <td width="20">Y</td> 
     1835                <td width="20">&nbsp;</td> 
     1836                <td width=""> 
     1837                &nbsp; 
     1838                </td> 
     1839                <td>The end point of the investigation. (n.b. removed null constraint)</td> 
     1840        </tr> 
     1841        <tr> 
     1842                <td width="150">id</td> 
     1843                <td width="50">int</td> 
     1844                <td width="20">&nbsp;</td> 
     1845                <td width="20">Y</td> 
     1846                <td width=""> 
     1847                &nbsp; 
     1848                </td> 
     1849                <td>automatically generated id-field</td> 
     1850        </tr> 
     1851         
     1852        <!-- all the uniques --> 
     1853        <tr> 
     1854                <td colspan="5">Primary key(id)</td> 
     1855                <td>&nbsp;</td> 
     1856        </tr> 
     1857        <!-- all the indices --> 
     1858         
     1859</table> 
     1860<a href="#_top_of_page">go to top</a> 
     1861<p /> 
     1862<h2>Table: <a name="Investigation">Investigation</a>  
     1863</h2> 
     1864<p></p> 
     1865<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1866        <!-- table header --> 
     1867        <tr><th class="tablehead" colspan="6">Investigation extends FugeInvestigation 
     1868</th></tr>       
     1869        <!-- column headers --> 
     1870        <tr> 
     1871                <th>attribute</th> 
     1872                <th>type</th> 
     1873                <th>NULL?</th> 
     1874                <th>AUTO?</th> 
     1875                <th>constraints</th> 
     1876                <th>description</th> 
     1877        </tr> 
     1878         
     1879        <!-- all the fields --> 
     1880        <tr> 
     1881                <td width="150">id</td> 
     1882                <td width="50">int</td> 
     1883                <td width="20">&nbsp;</td> 
     1884                <td width="20">Y</td> 
     1885                <td width=""> 
     1886                &nbsp; 
     1887                </td> 
     1888                <td>automatically generated id-field</td> 
     1889        </tr> 
     1890        <tr> 
     1891                <td width="150">name</td> 
     1892                <td width="50">string</td> 
     1893                <td width="20">&nbsp;</td> 
     1894                <td width="20">&nbsp;</td> 
     1895                <td width=""> 
     1896                &nbsp; 
     1897                </td> 
     1898                <td>The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1899        </tr> 
     1900         
     1901        <!-- all the uniques --> 
     1902        <tr> 
     1903                <td colspan="5">Primary key(id)</td> 
     1904                <td>&nbsp;</td> 
     1905        </tr> 
     1906        <tr> 
     1907                <td colspan="5">Secondary key(name)</td> 
     1908                <td>&nbsp;</td> 
     1909        </tr> 
     1910        <!-- all the indices --> 
     1911         
     1912</table> 
     1913<a href="#_top_of_page">go to top</a> 
     1914<p /> 
     1915<h2>Table: <a name="DimensionElement">DimensionElement</a>  
     1916</h2> 
     1917<p></p> 
     1918<table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
     1919        <!-- table header --> 
     1920        <tr><th class="tablehead" colspan="6">DimensionElement extends FugeDimensionElement 
     1921</th></tr>       
     1922        <!-- column headers --> 
     1923        <tr> 
     1924                <th>attribute</th> 
     1925                <th>type</th> 
     1926                <th>NULL?</th> 
     1927                <th>AUTO?</th> 
     1928                <th>constraints</th> 
     1929                <th>description</th> 
     1930        </tr> 
     1931         
     1932        <!-- all the fields --> 
     1933        <tr> 
     1934                <td width="150">Investigation</td> 
    2561935                <td width="50">xref</td> 
    2571936                <td width="20">&nbsp;</td> 
    2581937                <td width="20">&nbsp;</td> 
    2591938                <td width=""> 
    260                 References(Experiment) 
    261                 </td> 
    262                 <td>Samples are part-of one experiment (by cross reference to Experiment.id)</td> 
    263         </tr> 
    264         <tr> 
    265                 <td width="150">Id</td> 
    266                 <td width="50">int</td> 
    267                 <td width="20">&nbsp;</td> 
    268                 <td width="20">Y</td> 
    269                 <td width=""> 
    270                 &nbsp; 
    271                 </td> 
    272                 <td>autogenerated id number (autoid)</td> 
    273         </tr> 
    274          
    275         <!-- all the uniques --> 
    276         <tr> 
    277                 <td colspan="5">Primary key(Id)</td> 
    278                 <td>&nbsp;</td> 
    279         </tr> 
    280         <tr> 
    281                 <td colspan="5">Secondary key(Name)</td> 
    282                 <td>&nbsp;</td> 
    283         </tr> 
    284         <tr> 
    285                 <td colspan="5">Secondary key(Id)</td> 
    286                 <td>&nbsp;</td> 
    287         </tr> 
    288         <!-- all the indices --> 
    289          
    290 </table> 
    291 <a href="#_top_of_page">go to top</a> 
    292 <p /> 
    293 <h2>Table: <a name="SpecialSample">SpecialSample</a>  
    294 </h2> 
    295 <p></p> 
    296 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    297         <!-- table header --> 
    298         <tr><th class="tablehead" colspan="6">SpecialSample extends Sample 
    299 </th></tr>       
    300         <!-- column headers --> 
    301         <tr> 
    302                 <th>attribute</th> 
    303                 <th>type</th> 
    304                 <th>NULL?</th> 
    305                 <th>AUTO?</th> 
    306                 <th>constraints</th> 
    307                 <th>description</th> 
    308         </tr> 
    309          
    310         <!-- all the fields --> 
    311         <tr> 
    312                 <td width="150">detail</td> 
    313                 <td width="50">string</td> 
    314                 <td width="20">&nbsp;</td> 
    315                 <td width="20">&nbsp;</td> 
    316                 <td width=""> 
    317                 &nbsp; 
    318                 </td> 
    319                 <td>detail</td> 
    320         </tr> 
    321         <tr> 
    322                 <td width="150">Id</td> 
    323                 <td width="50">int</td> 
    324                 <td width="20">&nbsp;</td> 
    325                 <td width="20">Y</td> 
    326                 <td width=""> 
    327                 &nbsp; 
    328                 </td> 
    329                 <td>autogenerated id number (autoid)</td> 
    330         </tr> 
    331          
    332         <!-- all the uniques --> 
    333         <tr> 
    334                 <td colspan="5">Primary key(Id)</td> 
    335                 <td>&nbsp;</td> 
    336         </tr> 
    337         <!-- all the indices --> 
    338          
    339 </table> 
    340 <a href="#_top_of_page">go to top</a> 
    341 <p /> 
    342 <h2>Table: <a name="Trait">Trait</a>  
    343 </h2> 
    344 <p>Traits that are studied in this experiment. 
    345                  
    346 </p> 
    347 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    348         <!-- table header --> 
    349         <tr><th class="tablehead" colspan="6">Trait 
    350  implements Identifiable</th></tr>       
    351         <!-- column headers --> 
    352         <tr> 
    353                 <th>attribute</th> 
    354                 <th>type</th> 
    355                 <th>NULL?</th> 
    356                 <th>AUTO?</th> 
    357                 <th>constraints</th> 
    358                 <th>description</th> 
    359         </tr> 
    360          
    361         <!-- all the fields --> 
    362         <tr> 
    363                 <td width="150">Molcular</td> 
    364                 <td width="50">bool</td> 
    365                 <td width="20">&nbsp;</td> 
    366                 <td width="20">&nbsp;</td> 
    367                 <td width=""> 
    368                 &nbsp; 
    369                 </td> 
    370                 <td>Indication whether this is a molecular trait</td> 
    371         </tr> 
    372         <tr> 
    373                 <td width="150">Experiment</td> 
    374                 <td width="50">xref</td> 
    375                 <td width="20">&nbsp;</td> 
    376                 <td width="20">&nbsp;</td> 
    377                 <td width=""> 
    378                 References(Experiment) 
    379                 </td> 
    380                 <td>Traits are defined per experiment (by cross reference to Experiment.id)</td> 
    381         </tr> 
    382         <tr> 
    383                 <td width="150">Id</td> 
    384                 <td width="50">int</td> 
    385                 <td width="20">&nbsp;</td> 
    386                 <td width="20">Y</td> 
    387                 <td width=""> 
    388                 &nbsp; 
    389                 </td> 
    390                 <td>autogenerated id number (autoid)</td> 
    391         </tr> 
    392          
    393         <!-- all the uniques --> 
    394         <tr> 
    395                 <td colspan="5">Primary key(Id)</td> 
    396                 <td>&nbsp;</td> 
    397         </tr> 
    398         <tr> 
    399                 <td colspan="5">Secondary key(Name)</td> 
    400                 <td>&nbsp;</td> 
    401         </tr> 
    402         <tr> 
    403                 <td colspan="5">Secondary key(Id)</td> 
    404                 <td>&nbsp;</td> 
    405         </tr> 
    406         <!-- all the indices --> 
    407          
    408 </table> 
    409 <a href="#_top_of_page">go to top</a> 
    410 <p /> 
    411 <h2>Table: <a name="Measurement">Measurement</a>  
    412 </h2> 
    413 <p>Measurements (i.e. set of trait observations 
    414                         per sample) that are part of an experiment. 
    415 </p> 
    416 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    417         <!-- table header --> 
    418         <tr><th class="tablehead" colspan="6">Measurement 
    419  implements Identifiable</th></tr>       
    420         <!-- column headers --> 
    421         <tr> 
    422                 <th>attribute</th> 
    423                 <th>type</th> 
    424                 <th>NULL?</th> 
    425                 <th>AUTO?</th> 
    426                 <th>constraints</th> 
    427                 <th>description</th> 
    428         </tr> 
    429          
    430         <!-- all the fields --> 
    431         <tr> 
    432                 <td width="150">Experiment</td> 
    433                 <td width="50">xref</td> 
    434                 <td width="20">&nbsp;</td> 
    435                 <td width="20">&nbsp;</td> 
    436                 <td width=""> 
    437                 References(Experiment) 
    438                 </td> 
    439                 <td>Measurements are part-of one experiment</td> 
    440         </tr> 
    441         <tr> 
    442                 <td width="150">DataFile</td> 
    443                 <td width="50">file</td> 
    444                 <td width="20">&nbsp;</td> 
    445                 <td width="20">&nbsp;</td> 
    446                 <td width=""> 
    447                 &nbsp; 
    448                 </td> 
    449                 <td>A file attachment that summarizes the results</td> 
    450         </tr> 
    451         <tr> 
    452                 <td width="150">Id</td> 
    453                 <td width="50">int</td> 
    454                 <td width="20">&nbsp;</td> 
    455                 <td width="20">Y</td> 
    456                 <td width=""> 
    457                 &nbsp; 
    458                 </td> 
    459                 <td>autogenerated id number (autoid)</td> 
    460         </tr> 
    461          
    462         <!-- all the uniques --> 
    463         <tr> 
    464                 <td colspan="5">Primary key(Id)</td> 
    465                 <td>&nbsp;</td> 
    466         </tr> 
    467         <tr> 
    468                 <td colspan="5">Secondary key(Name)</td> 
    469                 <td>&nbsp;</td> 
    470         </tr> 
    471         <tr> 
    472                 <td colspan="5">Secondary key(Id)</td> 
    473                 <td>&nbsp;</td> 
    474         </tr> 
    475         <!-- all the indices --> 
    476          
    477 </table> 
    478 <a href="#_top_of_page">go to top</a> 
    479 <p /> 
    480 <h2>Table: <a name="Data">Data</a>  
    481 </h2> 
    482 <p>Data values (observations) of a measurement. Note: 
    483                         Data doesn't inherit from Identifiable because it has no unique name. 
    484                  
    485 </p> 
    486 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    487         <!-- table header --> 
    488         <tr><th class="tablehead" colspan="6">Data 
    489 </th></tr>       
    490         <!-- column headers --> 
    491         <tr> 
    492                 <th>attribute</th> 
    493                 <th>type</th> 
    494                 <th>NULL?</th> 
    495                 <th>AUTO?</th> 
    496                 <th>constraints</th> 
    497                 <th>description</th> 
    498         </tr> 
    499          
    500         <!-- all the fields --> 
    501         <tr> 
    502                 <td width="150">Id</td> 
    503                 <td width="50">int</td> 
    504                 <td width="20">&nbsp;</td> 
    505                 <td width="20">Y</td> 
    506                 <td width=""> 
    507                 &nbsp; 
    508                 </td> 
    509                 <td>autogenerated id number</td> 
    510         </tr> 
    511         <tr> 
    512                 <td width="150">Measurement</td> 
    513                 <td width="50">xref</td> 
    514                 <td width="20">&nbsp;</td> 
    515                 <td width="20">&nbsp;</td> 
    516                 <td width=""> 
    517                 References(Measurement) 
    518                 </td> 
    519                 <td>Data values are part-of one Measurement</td> 
    520         </tr> 
    521         <tr> 
    522                 <td width="150">Sample</td> 
    523                 <td width="50">xref</td> 
    524                 <td width="20">&nbsp;</td> 
    525                 <td width="20">&nbsp;</td> 
    526                 <td width=""> 
    527                 References(Sample) 
    528                 </td> 
    529                 <td>The sample this measurement is on</td> 
    530         </tr> 
    531         <tr> 
    532                 <td width="150">Trait</td> 
    533                 <td width="50">xref</td> 
    534                 <td width="20">&nbsp;</td> 
    535                 <td width="20">&nbsp;</td> 
    536                 <td width=""> 
    537                 References(Trait) 
    538                 </td> 
    539                 <td>The trait this measurement is on</td> 
    540         </tr> 
    541         <tr> 
    542                 <td width="150">Value</td> 
    543                 <td width="50">string</td> 
    544                 <td width="20">&nbsp;</td> 
    545                 <td width="20">&nbsp;</td> 
    546                 <td width=""> 
    547                 &nbsp; 
    548                 </td> 
    549                 <td>The value measured/calculated</td> 
    550         </tr> 
    551          
    552         <!-- all the uniques --> 
    553         <tr> 
    554                 <td colspan="5">Primary key(Id)</td> 
    555                 <td>&nbsp;</td> 
    556         </tr> 
    557         <tr> 
    558                 <td colspan="5">Secondary key(Measurement, Sample, Trait)</td> 
    559                 <td>&nbsp;</td> 
    560         </tr> 
    561         <!-- all the indices --> 
    562          
    563 </table> 
    564 <a href="#_top_of_page">go to top</a> 
    565 <p /> 
    566 <h2>Table: <a name="Role">Role</a>  
    567 </h2> 
    568 <p></p> 
    569 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    570         <!-- table header --> 
    571         <tr><th class="tablehead" colspan="6">Role 
    572 </th></tr>       
    573         <!-- column headers --> 
    574         <tr> 
    575                 <th>attribute</th> 
    576                 <th>type</th> 
    577                 <th>NULL?</th> 
    578                 <th>AUTO?</th> 
    579                 <th>constraints</th> 
    580                 <th>description</th> 
    581         </tr> 
    582          
    583         <!-- all the fields --> 
    584         <tr> 
    585                 <td width="150">id</td> 
    586                 <td width="50">int</td> 
    587                 <td width="20">&nbsp;</td> 
    588                 <td width="20">Y</td> 
    589                 <td width=""> 
    590                 &nbsp; 
    591                 </td> 
    592                 <td>id</td> 
     1939                References(Investigation) 
     1940                </td> 
     1941                <td>Reference to the investigation this belongs to.</td> 
     1942        </tr> 
     1943        <tr> 
     1944                <td width="150">id</td> 
     1945                <td width="50">int</td> 
     1946                <td width="20">&nbsp;</td> 
     1947                <td width="20">Y</td> 
     1948                <td width=""> 
     1949                &nbsp; 
     1950                </td> 
     1951                <td>automatically generated id-field</td> 
    5931952        </tr> 
    5941953        <tr> 
     
    6001959                &nbsp; 
    6011960                </td> 
    602                 <td>name</td> 
    603         </tr> 
    604         <tr> 
    605                 <td width="150">superuser</td> 
    606                 <td width="50">bool</td> 
    607                 <td width="20">&nbsp;</td> 
    608                 <td width="20">&nbsp;</td> 
    609                 <td width=""> 
    610                 &nbsp; 
    611                 </td> 
    612                 <td>superuser</td> 
    613         </tr> 
    614          
    615         <!-- all the uniques --> 
    616         <tr> 
    617                 <td colspan="5">Primary key(id)</td> 
    618                 <td>&nbsp;</td> 
    619         </tr> 
    620         <tr> 
    621                 <td colspan="5">Secondary key(name)</td> 
    622                 <td>&nbsp;</td> 
    623         </tr> 
    624         <!-- all the indices --> 
    625          
    626 </table> 
    627 <a href="#_top_of_page">go to top</a> 
    628 <p /> 
    629 <h2>Table: <a name="User">User</a>  
    630 </h2> 
    631 <p></p> 
    632 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    633         <!-- table header --> 
    634         <tr><th class="tablehead" colspan="6">User 
    635 </th></tr>       
    636         <!-- column headers --> 
    637         <tr> 
    638                 <th>attribute</th> 
    639                 <th>type</th> 
    640                 <th>NULL?</th> 
    641                 <th>AUTO?</th> 
    642                 <th>constraints</th> 
    643                 <th>description</th> 
    644         </tr> 
    645          
    646         <!-- all the fields --> 
    647         <tr> 
    648                 <td width="150">id</td> 
    649                 <td width="50">int</td> 
    650                 <td width="20">&nbsp;</td> 
    651                 <td width="20">Y</td> 
    652                 <td width=""> 
    653                 &nbsp; 
    654                 </td> 
    655                 <td>id</td> 
    656         </tr> 
    657         <tr> 
    658                 <td width="150">name</td> 
    659                 <td width="50">string</td> 
    660                 <td width="20">&nbsp;</td> 
    661                 <td width="20">&nbsp;</td> 
    662                 <td width=""> 
    663                 &nbsp; 
    664                 </td> 
    665                 <td>name</td> 
    666         </tr> 
    667         <tr> 
    668                 <td width="150">password</td> 
    669                 <td width="50">string</td> 
    670                 <td width="20">&nbsp;</td> 
    671                 <td width="20">&nbsp;</td> 
    672                 <td width=""> 
    673                 &nbsp; 
    674                 </td> 
    675                 <td>password</td> 
    676         </tr> 
    677         <tr> 
    678                 <td width="150">roles</td> 
    679                 <td width="50">mref</td> 
    680                 <td width="20">Y</td> 
    681                 <td width="20">&nbsp;</td> 
    682                 <td width=""> 
    683                 References(Role) via linktable.  
    684                 </td> 
    685                 <td>Roles that this user has adopted. Its rights are inherited.</td> 
    686         </tr> 
    687          
    688         <!-- all the uniques --> 
    689         <tr> 
    690                 <td colspan="5">Primary key(id)</td> 
    691                 <td>&nbsp;</td> 
    692         </tr> 
    693         <tr> 
    694                 <td colspan="5">Secondary key(name)</td> 
    695                 <td>&nbsp;</td> 
    696         </tr> 
    697         <!-- all the indices --> 
    698          
    699 </table> 
    700 <a href="#_top_of_page">go to top</a> 
    701 <p /> 
    702 <h2>Table: <a name="Entity">Entity</a>  
    703 </h2> 
    704 <p>Catalog of entity names 
    705 </p> 
    706 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    707         <!-- table header --> 
    708         <tr><th class="tablehead" colspan="6">Entity 
    709 </th></tr>       
    710         <!-- column headers --> 
    711         <tr> 
    712                 <th>attribute</th> 
    713                 <th>type</th> 
    714                 <th>NULL?</th> 
    715                 <th>AUTO?</th> 
    716                 <th>constraints</th> 
    717                 <th>description</th> 
    718         </tr> 
    719          
    720         <!-- all the fields --> 
    721         <tr> 
    722                 <td width="150">id</td> 
    723                 <td width="50">int</td> 
    724                 <td width="20">&nbsp;</td> 
    725                 <td width="20">Y</td> 
    726                 <td width=""> 
    727                 &nbsp; 
    728                 </td> 
    729                 <td>id</td> 
    730         </tr> 
    731         <tr> 
    732                 <td width="150">className</td> 
    733                 <td width="50">string</td> 
    734                 <td width="20">&nbsp;</td> 
    735                 <td width="20">&nbsp;</td> 
    736                 <td width=""> 
    737                 &nbsp; 
    738                 </td> 
    739                 <td>Full name of the data type</td> 
    740         </tr> 
    741          
    742         <!-- all the uniques --> 
    743         <tr> 
    744                 <td colspan="5">Primary key(id)</td> 
    745                 <td>&nbsp;</td> 
    746         </tr> 
    747         <!-- all the indices --> 
    748          
    749 </table> 
    750 <a href="#_top_of_page">go to top</a> 
    751 <p /> 
    752 <h2>Table: <a name="RoleEntityPermission">RoleEntityPermission</a>  
    753 </h2> 
    754 <p>Assign rights on entities to roles. 
    755 </p> 
    756 <table width="100%" cellspacing="0" border="1" bordercolor="#000000"> 
    757         <!-- table header --> 
    758         <tr><th class="tablehead" colspan="6">RoleEntityPermission 
    759 </th></tr>       
    760         <!-- column headers --> 
    761         <tr> 
    762                 <th>attribute</th> 
    763                 <th>type</th> 
    764                 <th>NULL?</th> 
    765                 <th>AUTO?</th> 
    766                 <th>constraints</th> 
    767                 <th>description</th> 
    768         </tr> 
    769          
    770         <!-- all the fields --> 
    771         <tr> 
    772                 <td width="150">id</td> 
    773                 <td width="50">int</td> 
    774                 <td width="20">&nbsp;</td> 
    775                 <td width="20">Y</td> 
    776                 <td width=""> 
    777                 &nbsp; 
    778                 </td> 
    779                 <td>id</td> 
    780         </tr> 
    781         <tr> 
    782                 <td width="150">role</td> 
    783                 <td width="50">xref</td> 
    784                 <td width="20">&nbsp;</td> 
    785                 <td width="20">&nbsp;</td> 
    786                 <td width=""> 
    787                 References(Role) 
    788                 </td> 
    789                 <td>role</td> 
    790         </tr> 
    791         <tr> 
    792                 <td width="150">entity</td> 
    793                 <td width="50">xref</td> 
    794                 <td width="20">&nbsp;</td> 
    795                 <td width="20">&nbsp;</td> 
    796                 <td width=""> 
    797                 References(Entity) 
    798                 </td> 
    799                 <td>entity</td> 
    800         </tr> 
    801         <tr> 
    802                 <td width="150">permission</td> 
     1961                <td>The potentially ambiguous common identifier, such as a human-readable name for the instance.</td> 
     1962        </tr> 
     1963        <tr> 
     1964                <td width="150">Type</td> 
    8031965                <td width="50">enum</td> 
    8041966                <td width="20">&nbsp;</td> 
    805                 <td width="20">&nbsp;</td> 
    806                 <td width=""> 
    807                 ENUM options: 'read', 'edit' 
    808                 </td> 
    809                 <td>permission</td> 
    810         </tr> 
    811          
    812         <!-- all the uniques --> 
    813         <tr> 
    814                 <td colspan="5">Primary key(id)</td> 
     1967                <td width="20">Y</td> 
     1968                <td width=""> 
     1969                ENUM options: 'DimensionElement' 
     1970                </td> 
     1971                <td>Subtypes of DimensionElement. Have to be set to allow searching</td> 
     1972        </tr> 
     1973         
     1974        <!-- all the uniques --> 
     1975        <tr> 
     1976                <td colspan="5">Primary key(id)</td> 
     1977                <td>&nbsp;</td> 
     1978        </tr> 
     1979        <tr> 
     1980                <td colspan="5">Secondary key(name, Investigation, Type)</td> 
    8151981                <td>&nbsp;</td> 
    8161982        </tr> 
  • molgenis4eb/generated/java/MolgenisServlet.java

    r2015 r2022  
    11/* 
    22 * Created by: org.molgenis.generators.servlet.MolgenisServletGen 
    3  * Date: July 17, 2009 
     3 * Date: July 21, 2009 
    44 */ 
    55 
     
    2828                //The datasource is created by the servletcontext!               
    2929                DataSource dataSource = (DataSource)getServletContext().getAttribute("DataSource"); 
    30                 return new example.JDBCDatabase(dataSource, new File("null")); 
     30                return new molgenis4eb.JDBCDatabase(dataSource, new File("null")); 
    3131                 
    3232                //TOMCAT 
    3333                //String jndiName = "java:comp/env/jdbc/molgenisdb"; 
    3434                //JndiDataSourceWrapper source = new JndiDataSourceWrapper(jndiName); 
    35                 //return new example.JDBCDatabase(source, new File("attachedfiles")); 
     35                //return new molgenis4eb.JDBCDatabase(source, new File("null")); 
    3636         
    3737                //GLASSFISH 
    3838                //DataSource dataSource = (DataSource)getServletContext().getAttribute("DataSource"); 
    39                 //return new example.JDBCDatabase(dataSource, new File("null")); 
     39                //return new molgenis4eb.JDBCDatabase(dataSource, new File("null")); 
    4040        } 
    4141 
     
    4848        { 
    4949                UserInterface app = new UserInterface( userLogin); 
    50                 app.setLabel("My First MOLGENIS"); 
     50                app.setLabel("Col7A1 Database"); 
    5151                app.setVersion("3.3.0-testing"); 
    52                 new example.screen.MainMenu(app); 
     52                new molgenis4eb.screen.MainMenu(app); 
    5353                return app; 
    5454        } 
     
    5656        public String getMolgenisVariantID() 
    5757        { 
    58                 return "example"; 
     58                return "molgenis4eb"; 
    5959        }        
    6060         
     
    6262        public Object getSoapImpl() 
    6363        { 
    64                 return new example.SoapApi(); 
     64                return new molgenis4eb.SoapApi(); 
    6565        } 
    6666} 
  • molgenis4eb/generated/java/example/JDBCDatabase.java

    r2015 r2022  
    11/* File:        example/model/JDBCDatabase 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.data.JDBCDatabaseGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/JDBCMetaDatabase.java

    r2015 r2022  
    11/* File:        example/model/JDBCDatabase 
    22 * Copyright:   Inventory 2000-2.009, GBIC 2002-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.data.JDBCMetaDatabaseGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Data.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Data.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Entity.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Entity.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Experiment.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Experiment.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Measurement.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Measurement.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Role.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Role.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/RoleEntityPermission.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/RoleEntityPermission.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Sample.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Sample.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/SpecialSample.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/SpecialSample.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/Trait.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/Trait.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/User.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/User.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/R/User_roles.R

    r2015 r2022  
    22# File:        example/R/generated\java\example\R/User_roles.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.REntityGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/InMemoryDatabase.java

    r2015 r2022  
    11/* File:        example/model/JDBCDatabase 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.data.InMemoryDatabaseGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/DataCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Data.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/EntityCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Entity.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/ExperimentCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Experiment.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/MeasurementCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Measurement.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/RoleCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Role.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/RoleEntityPermissionCsvReader.java

    r2015 r2022  
    22/* File:        example/model/RoleEntityPermission.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/SampleCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Sample.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/SpecialSampleCsvReader.java

    r2015 r2022  
    22/* File:        example/model/SpecialSample.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/TraitCsvReader.java

    r2015 r2022  
    22/* File:        example/model/Trait.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/UserCsvReader.java

    r2015 r2022  
    22/* File:        example/model/User.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/csv/User_rolesCsvReader.java

    r2015 r2022  
    22/* File:        example/model/User_roles.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.data.csv.CsvReaderGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/DataMapper.java

    r2015 r2022  
    11/* File:        example/model/Data.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/EntityMapper.java

    r2015 r2022  
    11/* File:        example/model/Entity.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/ExperimentMapper.java

    r2015 r2022  
    11/* File:        example/model/Experiment.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/MeasurementMapper.java

    r2015 r2022  
    11/* File:        example/model/Measurement.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/RoleEntityPermissionMapper.java

    r2015 r2022  
    11/* File:        example/model/RoleEntityPermission.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/RoleMapper.java

    r2015 r2022  
    11/* File:        example/model/Role.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/SampleMapper.java

    r2015 r2022  
    11/* File:        example/model/Sample.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/SpecialSampleMapper.java

    r2015 r2022  
    11/* File:        example/model/SpecialSample.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/TraitMapper.java

    r2015 r2022  
    11/* File:        example/model/Trait.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/UserMapper.java

    r2015 r2022  
    11/* File:        example/model/User.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/mappers/User_rolesMapper.java

    r2015 r2022  
    11/* File:        example/model/User_roles.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 * Template:    MultiqueryMapperGen.java.ftl 
    55 * generator:   org.molgenis.generators.data.mappers.MultiqueryMapperGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/data/types/Data.java

    r2015 r2022  
    22/* File:        example/model/Data.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2626                 
    2727. 
    28  * @version July 17, 2009  
     28 * @version July 21, 2009  
    2929 * @author MOLGENIS generator 
    3030 */ 
  • molgenis4eb/generated/java/example/data/types/Entity.java

    r2015 r2022  
    22/* File:        example/model/Entity.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2222 * Entity: Catalog of entity names 
    2323. 
    24  * @version July 17, 2009  
     24 * @version July 21, 2009  
    2525 * @author MOLGENIS generator 
    2626 */ 
  • molgenis4eb/generated/java/example/data/types/Experiment.java

    r2015 r2022  
    22/* File:        example/model/Experiment.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2323 * Experiment: Summary of an experiment. 
    2424. 
    25  * @version July 17, 2009  
     25 * @version July 21, 2009  
    2626 * @author MOLGENIS generator 
    2727 */ 
  • molgenis4eb/generated/java/example/data/types/Identifiable.java

    r2015 r2022  
    22/* File:        example/model/Identifiable.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    1616                 
    1717. 
    18  * @version July 17, 2009  
     18 * @version July 21, 2009  
    1919 * @author MOLGENIS generator 
    2020 */ 
  • molgenis4eb/generated/java/example/data/types/Measurement.java

    r2015 r2022  
    22/* File:        example/model/Measurement.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2727                        per sample) that are part of an experiment. 
    2828. 
    29  * @version July 17, 2009  
     29 * @version July 21, 2009  
    3030 * @author MOLGENIS generator 
    3131 */ 
  • molgenis4eb/generated/java/example/data/types/Role.java

    r2015 r2022  
    22/* File:        example/model/Role.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2121/** 
    2222 * Role: . 
    23  * @version July 17, 2009  
     23 * @version July 21, 2009  
    2424 * @author MOLGENIS generator 
    2525 */ 
  • molgenis4eb/generated/java/example/data/types/RoleEntityPermission.java

    r2015 r2022  
    22/* File:        example/model/RoleEntityPermission.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2424 * RoleEntityPermission: Assign rights on entities to roles. 
    2525. 
    26  * @version July 17, 2009  
     26 * @version July 21, 2009  
    2727 * @author MOLGENIS generator 
    2828 */ 
  • molgenis4eb/generated/java/example/data/types/Sample.java

    r2015 r2022  
    22/* File:        example/model/Sample.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2626                 
    2727. 
    28  * @version July 17, 2009  
     28 * @version July 21, 2009  
    2929 * @author MOLGENIS generator 
    3030 */ 
  • molgenis4eb/generated/java/example/data/types/SpecialSample.java

    r2015 r2022  
    22/* File:        example/model/SpecialSample.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2222/** 
    2323 * SpecialSample: . 
    24  * @version July 17, 2009  
     24 * @version July 21, 2009  
    2525 * @author MOLGENIS generator 
    2626 */ 
  • molgenis4eb/generated/java/example/data/types/Trait.java

    r2015 r2022  
    22/* File:        example/model/Trait.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2626                 
    2727. 
    28  * @version July 17, 2009  
     28 * @version July 21, 2009  
    2929 * @author MOLGENIS generator 
    3030 */ 
  • molgenis4eb/generated/java/example/data/types/User.java

    r2015 r2022  
    22/* File:        example/model/User.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2424/** 
    2525 * User: . 
    26  * @version July 17, 2009  
     26 * @version July 21, 2009  
    2727 * @author MOLGENIS generator 
    2828 */ 
  • molgenis4eb/generated/java/example/data/types/User_roles.java

    r2015 r2022  
    22/* File:        example/model/User_roles.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 * Generator:   org.molgenis.generators.data.types.DataTypeGen 3.3.0-testing 
    66 * 
     
    2323/** 
    2424 * User_roles: Link table for many-to-many relationship 'User.roles'.. 
    25  * @version July 17, 2009  
     25 * @version July 21, 2009  
    2626 * @author MOLGENIS generator 
    2727 */ 
  • molgenis4eb/generated/java/example/html/DataHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/DataForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/EntityHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/EntityForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/ExperimentHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/ExperimentForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/IdentifiableHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/IdentifiableForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/MeasurementHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/MeasurementForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/RoleEntityPermissionHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/RoleEntityPermissionForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/RoleHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/RoleForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/SampleHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/SampleForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/SpecialSampleHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/SpecialSampleForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/TraitHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/TraitForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/UserHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/UserForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/html/User_rolesHtmlForm.java

    r2015 r2022  
    22/* File:        example/html/User_rolesForm.java 
    33 * Copyright:   GBIC 2000-2.009, all rights reserved 
    4  * Date:        July 17, 2009 
     4 * Date:        July 21, 2009 
    55 *  
    66 * generator:   org.molgenis.generators.html.HtmlFormGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/MainMenu.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.MenuScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/main/Experiment/ExperimentMenu/Measurements/DataForm.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.ExperimentMenu.Measurements.Data.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.FormScreenGen 3.3.0-testing 
     
    7878         
    7979        @Override 
    80         public Vector<HtmlInput> getInputs(Data entity, boolean newrecord) 
     80        public HtmlForm<Data> getInputs(Data entity, boolean newrecord) 
    8181        { 
    8282                //default Measurement via parent form to Id 
     
    9595                form.setNewRecord(newrecord); 
    9696                form.setReadonly(isReadonly()); 
    97                 return form.getInputs(); 
     97                return form; 
    9898        } 
    9999         
  • molgenis4eb/generated/java/example/screen/main/Experiment/ExperimentMenu/MeasurementsForm.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.ExperimentMenu.Measurements.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.FormScreenGen 3.3.0-testing 
     
    7474         
    7575        @Override 
    76         public Vector<HtmlInput> getInputs(Measurement entity, boolean newrecord) 
     76        public HtmlForm<Measurement> getInputs(Measurement entity, boolean newrecord) 
    7777        { 
    7878                //default Experiment via parent form to Id 
     
    9191                form.setNewRecord(newrecord); 
    9292                form.setReadonly(isReadonly()); 
    93                 return form.getInputs(); 
     93                return form; 
    9494        } 
    9595         
  • molgenis4eb/generated/java/example/screen/main/Experiment/ExperimentMenu/SamplesForm.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.ExperimentMenu.Samples.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.FormScreenGen 3.3.0-testing 
     
    7676         
    7777        @Override 
    78         public Vector<HtmlInput> getInputs(Sample entity, boolean newrecord) 
     78        public HtmlForm<Sample> getInputs(Sample entity, boolean newrecord) 
    7979        { 
    8080                //default Experiment via parent form to Id 
     
    9393                form.setNewRecord(newrecord); 
    9494                form.setReadonly(isReadonly()); 
    95                 return form.getInputs(); 
     95                return form; 
    9696        } 
    9797         
  • molgenis4eb/generated/java/example/screen/main/Experiment/ExperimentMenu/TraitsForm.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.ExperimentMenu.Traits.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.FormScreenGen 3.3.0-testing 
     
    7373         
    7474        @Override 
    75         public Vector<HtmlInput> getInputs(Trait entity, boolean newrecord) 
     75        public HtmlForm<Trait> getInputs(Trait entity, boolean newrecord) 
    7676        { 
    7777                //default Experiment via parent form to Id 
     
    9090                form.setNewRecord(newrecord); 
    9191                form.setReadonly(isReadonly()); 
    92                 return form.getInputs(); 
     92                return form; 
    9393        } 
    9494         
  • molgenis4eb/generated/java/example/screen/main/Experiment/ExperimentMenuMenu.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.ExperimentMenu.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.MenuScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/main/ExperimentForm.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.Experiment.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.FormScreenGen 3.3.0-testing 
     
    7171         
    7272        @Override 
    73         public Vector<HtmlInput> getInputs(Experiment entity, boolean newrecord) 
     73        public HtmlForm<Experiment> getInputs(Experiment entity, boolean newrecord) 
    7474        { 
    7575         
     
    7777                form.setNewRecord(newrecord); 
    7878                form.setReadonly(isReadonly()); 
    79                 return form.getInputs(); 
     79                return form; 
    8080        } 
    8181         
  • molgenis4eb/generated/java/example/screen/main/PluginexamplesMenu.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.pluginexamples.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.MenuScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/main/pluginexamples/ExperimentQueryPlugin.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.pluginexamples.ExperimentQuery.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.PluginScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/main/pluginexamples/GooglePlugin.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.pluginexamples.Google.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.PluginScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/screen/main/pluginexamples/HelloWorldPlugin.java

    r2015 r2022  
    11/* File:        Example/screen/molgenis.main.pluginexamples.HelloWorld.java 
    22 * Copyright:   GBIC 2000-2.009, all rights reserved 
    3  * Date:        July 17, 2009 
     3 * Date:        July 21, 2009 
    44 *  
    55 * generator:   org.molgenis.generators.screen.PluginScreenGen 3.3.0-testing 
  • molgenis4eb/generated/java/example/tools/CopyMemoryToDatabase.java

    r2015 r2022  
    11 
    2 /* Date:        July 17, 2009 
     2/* Date:        July 21, 2009 
    33 *  
    44 * generator:   org.molgenis.generators.tools.CopyMemoryToDatabaseGen 3.3.0-testing 
  • molgenis4eb/generated/java/servlet/ContextListener.java

    r2015 r2022  
    2727                                //for glassfish 
    2828                                //Context envContext  = (Context)initContext.lookup(""); 
    29                                 DataSource dsource = (DataSource)envContext.lookup("jdbc/molgenisdb"); 
     29                                DataSource dsource = (DataSource)envContext.lookup("jdbc/molgenis4eb"); 
    3030 
    3131                        sc.setAttribute("DataSource", dsource); 
  • molgenis4eb/generated/java/source.R

    r2015 r2022  
    11 
    2 # File:        example/R/generated\java\source.R 
     2# File:        molgenis4eb/R/generated\java\source.R 
    33# Copyright:   GBIC 2000-2.009, all rights reserved 
    4 # Date:        July 17, 2009 
     4# Date:        July 21, 2009 
    55# 
    66# generator:   org.molgenis.generators.R.RApi 3.3.0-testing 
     
    1515 
    1616#entities 
    17 source(paste(molgenispath,"example/R/Experiment.R", sep="")) 
    18 source(paste(molgenispath,"example/R/Sample.R", sep="")) 
    19 source(paste(molgenispath,"example/R/SpecialSample.R", sep="")) 
    20 source(paste(molgenispath,"example/R/Trait.R", sep="")) 
    21 source(paste(molgenispath,"example/R/Measurement.R", sep="")) 
    22 source(paste(molgenispath,"example/R/Data.R", sep="")) 
    23 source(paste(molgenispath,"example/R/Role.R", sep="")) 
    24 source(paste(molgenispath,"example/R/User.R", sep="")) 
    25 source(paste(molgenispath,"example/R/Entity.R", sep="")) 
    26 source(paste(molgenispath,"example/R/RoleEntityPermission.R", sep="")) 
     17source(paste(molgenispath,"molgenis4eb/R/Role.R", sep="")) 
     18source(paste(molgenispath,"molgenis4eb/R/User.R", sep="")) 
     19source(paste(molgenispath,"molgenis4eb/R/Entity.R", sep="")) 
     20source(paste(molgenispath,"molgenis4eb/R/RoleEntityPermission.R", sep="")) 
     21source(paste(molgenispath,"molgenis4eb/R/Statistics.R", sep="")) 
     22source(paste(molgenispath,"molgenis4eb/R/RNA.R", sep="")) 
     23source(paste(molgenispath,"molgenis4eb/R/Amino_acid.R", sep="")) 
     24source(paste(molgenispath,"molgenis4eb/R/Mutations.R", sep="")) 
     25source(paste(molgenispath,"molgenis4eb/R/Contact.R", sep="")) 
     26source(paste(molgenispath,"molgenis4eb/R/Patient.R", sep="")) 
     27source(paste(molgenispath,"molgenis4eb/R/Gender.R", sep="")) 
     28source(paste(molgenispath,"molgenis4eb/R/Diagnosis.R", sep="")) 
     29source(paste(molgenispath,"molgenis4eb/R/Phenotype.R", sep="")) 
     30source(paste(molgenispath,"molgenis4eb/R/E_M.R", sep="")) 
     31source(paste(molgenispath,"molgenis4eb/R/I_F.R", sep="")) 
     32source(paste(molgenispath,"molgenis4eb/R/Consequence.R", sep="")) 
     33source(paste(molgenispath,"molgenis4eb/R/Pictures.R", sep="")) 
     34source(paste(molgenispath,"molgenis4eb/R/DecimalDataElement.R", sep="")) 
     35source(paste(molgenispath,"molgenis4eb/R/TextDataElement.R", sep="")) 
     36source(paste(molgenispath,"molgenis4eb/R/Describable.R", sep="")) 
     37source(paste(molgenispath,"molgenis4eb/R/Identifiable.R", sep="")) 
     38source(paste(molgenispath,"molgenis4eb/R/FugeData.R", sep="")) 
     39source(paste(molgenispath,"molgenis4eb/R/Data.R", sep="")) 
     40source(paste(molgenispath,"molgenis4eb/R/FugeDimensionElement.R", sep="")) 
     41source(paste(molgenispath,"molgenis4eb/R/FugeInvestigation.R", sep="")) 
     42source(paste(molgenispath,"molgenis4eb/R/Investigation.R", sep="")) 
     43source(paste(molgenispath,"molgenis4eb/R/DimensionElement.R", sep="")) 
    2744 
    2845# matrices 
  • molgenis4eb/generated/java/tools/CsvExport.java

    r2015 r2022  
    11 
    2 /* Date:        July 17, 2009 
     2/* Date:        July 21, 2009 
    33 *  
    44 * generator:   org.molgenis.generators.tools.CsvExportGen 3.3.0-testing 
     
    1919import org.molgenis.util.csv.CsvFileWriter; 
    2020 
    21 import example.data.types.Identifiable; 
    22 import example.data.types.Experiment; 
    23 import example.data.types.Sample; 
    24 import example.data.types.SpecialSample; 
    25 import example.data.types.Trait; 
    26 import example.data.types.Measurement; 
    27 import example.data.types.Data; 
    28 import example.data.types.Role; 
    29 import example.data.types.User; 
    30 import example.data.types.Entity; 
    31 import example.data.types.RoleEntityPermission; 
    32 import example.data.types.User_roles; 
     21import molgenis4eb.data.types.Role; 
     22import molgenis4eb.data.types.User; 
     23import molgenis4eb.data.types.Entity; 
     24import molgenis4eb.data.types.RoleEntityPermission; 
     25import molgenis4eb.data.types.Statistics; 
     26import molgenis4eb.data.types.RNA; 
     27import molgenis4eb.data.types.Amino_acid; 
     28import molgenis4eb.data.types.Mutations; 
     29import molgenis4eb.data.types.Contact; 
     30import molgenis4eb.data.types.Patient; 
     31import molgenis4eb.data.types.Gender; 
     32import molgenis4eb.data.types.Diagnosis; 
     33import molgenis4eb.data.types.Phenotype; 
     34import molgenis4eb.data.types.E_M; 
     35import molgenis4eb.data.types.I_F; 
     36import molgenis4eb.data.types.Consequence; 
     37import molgenis4eb.data.types.Pictures; 
     38import molgenis4eb.data.types.DataElement; 
     39import molgenis4eb.data.types.DecimalDataElement; 
     40import molgenis4eb.data.types.TextDataElement; 
     41import molgenis4eb.data.types.Describable; 
     42import molgenis4eb.data.types.Identifiable; 
     43import molgenis4eb.data.types.FugeData; 
     44import molgenis4eb.data.types.Data; 
     45import molgenis4eb.data.types.FugeDimensionElement; 
     46import molgenis4eb.data.types.FugeInvestigation; 
     47import molgenis4eb.data.types.Investigation; 
     48import molgenis4eb.data.types.DimensionElement; 
     49import molgenis4eb.data.types.User_roles; 
    3350 
    3451public class CsvExport 
     
    4259        public static void exportAll(File directory, Database db) throws Exception 
    4360        {                                
    44                 exportExperiment(db, new File(directory+"/experiment.txt"));             
    45                 exportSample(db, new File(directory+"/sample.txt"));             
    46                 exportSpecialSample(db, new File(directory+"/specialsample.txt"));               
    47                 exportTrait(db, new File(directory+"/trait.txt"));               
    48                 exportMeasurement(db, new File(directory+"/measurement.txt"));           
    49                 exportData(db, new File(directory+"/data.txt"));                 
    5061                exportRole(db, new File(directory+"/role.txt"));                 
    5162                exportUser(db, new File(directory+"/user.txt"));                 
    5263                exportEntity(db, new File(directory+"/entity.txt"));             
    5364                exportRoleEntityPermission(db, new File(directory+"/roleentitypermission.txt"));                 
     65                exportConsequence(db, new File(directory+"/consequence.txt"));           
     66                exportAmino_acid(db, new File(directory+"/amino_acid.txt"));             
     67                exportRNA(db, new File(directory+"/rna.txt"));           
     68                exportMutations(db, new File(directory+"/mutations.txt"));               
     69                exportContact(db, new File(directory+"/contact.txt"));           
     70                exportGender(db, new File(directory+"/gender.txt"));             
     71                exportPatient(db, new File(directory+"/patient.txt"));           
     72                exportPhenotype(db, new File(directory+"/phenotype.txt"));               
     73                exportDiagnosis(db, new File(directory+"/diagnosis.txt"));               
     74                exportE_M(db, new File(directory+"/e_m.txt"));           
     75                exportI_F(db, new File(directory+"/i_f.txt"));           
     76                exportStatistics(db, new File(directory+"/statistics.txt"));             
     77                exportPictures(db, new File(directory+"/pictures.txt"));                 
     78                exportData(db, new File(directory+"/data.txt"));                 
     79                exportInvestigation(db, new File(directory+"/investigation.txt"));               
     80                exportDimensionElement(db, new File(directory+"/dimensionelement.txt"));                 
     81                exportDescribable(db, new File(directory+"/describable.txt"));           
     82                exportIdentifiable(db, new File(directory+"/identifiable.txt"));                 
     83                exportFugeData(db, new File(directory+"/fugedata.txt"));                 
     84                exportFugeDimensionElement(db, new File(directory+"/fugedimensionelement.txt"));                 
     85                exportFugeInvestigation(db, new File(directory+"/fugeinvestigation.txt"));               
     86                exportTextDataElement(db, new File(directory+"/textdataelement.txt"));           
     87                exportDecimalDataElement(db, new File(directory+"/decimaldataelement.txt"));             
    5488                exportUser_roles(db, new File(directory+"/user_roles.txt"));             
    5589                         
     
    5892 
    5993        /** 
    60          *      export Experiment to file. 
    61          *  @param db the database to export from. 
    62          *  @param f the file to export to. 
    63          */ 
    64         public static void exportExperiment(Database db, File f) throws DatabaseException, IOException 
    65         { 
    66                 if(db.count(Experiment.class) > 0) 
    67                 { 
    68                         CsvFileWriter ExperimentWriter = new CsvFileWriter(f); 
    69                         db.find(Experiment.class, ExperimentWriter); 
    70                         ExperimentWriter.close(); 
    71                 } 
    72         } 
    73         /** 
    74          *      export Sample to file. 
    75          *  @param db the database to export from. 
    76          *  @param f the file to export to. 
    77          */ 
    78         public static void exportSample(Database db, File f) throws DatabaseException, IOException 
    79         { 
    80                 if(db.count(Sample.class, new QueryRule("type",Operator.EQUALS, "Sample")) > 0) 
    81                 { 
    82                         CsvFileWriter SampleWriter = new CsvFileWriter(f); 
    83                         db.find(Sample.class, SampleWriter, new QueryRule("type",Operator.EQUALS, "Sample")); 
    84                         SampleWriter.close(); 
    85                 } 
    86         } 
    87         /** 
    88          *      export SpecialSample to file. 
    89          *  @param db the database to export from. 
    90          *  @param f the file to export to. 
    91          */ 
    92         public static void exportSpecialSample(Database db, File f) throws DatabaseException, IOException 
    93         { 
    94                 if(db.count(SpecialSample.class, new QueryRule("type",Operator.EQUALS, "SpecialSample")) > 0) 
    95                 { 
    96                         CsvFileWriter SpecialSampleWriter = new CsvFileWriter(f); 
    97                         db.find(SpecialSample.class, SpecialSampleWriter, new QueryRule("type",Operator.EQUALS, "SpecialSample")); 
    98                         SpecialSampleWriter.close(); 
    99                 } 
    100         } 
    101         /** 
    102          *      export Trait to file. 
    103          *  @param db the database to export from. 
    104          *  @param f the file to export to. 
    105          */ 
    106         public static void exportTrait(Database db, File f) throws DatabaseException, IOException 
    107         { 
    108                 if(db.count(Trait.class) > 0) 
    109                 { 
    110                         CsvFileWriter TraitWriter = new CsvFileWriter(f); 
    111                         db.find(Trait.class, TraitWriter); 
    112                         TraitWriter.close(); 
    113                 } 
    114         } 
    115         /** 
    116          *      export Measurement to file. 
    117          *  @param db the database to export from. 
    118          *  @param f the file to export to. 
    119          */ 
    120         public static void exportMeasurement(Database db, File f) throws DatabaseException, IOException 
    121         { 
    122                 if(db.count(Measurement.class) > 0) 
    123                 { 
    124                         CsvFileWriter MeasurementWriter = new CsvFileWriter(f); 
    125                         db.find(Measurement.class, MeasurementWriter); 
    126                         MeasurementWriter.close(); 
    127                 } 
    128         } 
    129         /** 
    130          *      export Data to file. 
    131          *  @param db the database to export from. 
    132          *  @param f the file to export to. 
    133          */ 
    134         public static void exportData(Database db, File f) throws DatabaseException, IOException 
    135         { 
    136                 if(db.count(Data.class) > 0) 
    137                 { 
    138                         CsvFileWriter DataWriter = new CsvFileWriter(f); 
    139                         db.find(Data.class, DataWriter); 
    140                         DataWriter.close(); 
    141                 } 
    142         } 
    143         /** 
    14494         *      export Role to file. 
    14595         *  @param db the database to export from. 
     
    198148        } 
    199149        /** 
     150         *      export Consequence to file. 
     151         *  @param db the database to export from. 
     152         *  @param f the file to export to. 
     153         */ 
     154        public static void exportConsequence(Database db, File f) throws DatabaseException, IOException 
     155        { 
     156                if(db.count(Consequence.class) > 0) 
     157                { 
     158                        CsvFileWriter ConsequenceWriter = new CsvFileWriter(f); 
     159                        db.find(Consequence.class, ConsequenceWriter); 
     160                        ConsequenceWriter.close(); 
     161                } 
     162        } 
     163        /** 
     164         *      export Amino_acid to file. 
     165         *  @param db the database to export from. 
     166         *  @param f the file to export to. 
     167         */ 
     168        public static void exportAmino_acid(Database db, File f) throws DatabaseException, IOException 
     169        { 
     170                if(db.count(Amino_acid.class) > 0) 
     171                { 
     172                        CsvFileWriter Amino_acidWriter = new CsvFileWriter(f); 
     173                        db.find(Amino_acid.class, Amino_acidWriter); 
     174                        Amino_acidWriter.close(); 
     175                } 
     176        } 
     177        /** 
     178         *      export RNA to file. 
     179         *  @param db the database to export from. 
     180         *  @param f the file to export to. 
     181         */ 
     182        public static void exportRNA(Database db, File f) throws DatabaseException, IOException 
     183        { 
     184                if(db.count(RNA.class) > 0) 
     185                { 
     186                        CsvFileWriter RNAWriter = new CsvFileWriter(f); 
     187                        db.find(RNA.class, RNAWriter); 
     188                        RNAWriter.close(); 
     189                } 
     190        } 
     191        /** 
     192         *      export Mutations to file. 
     193         *  @param db the database to export from. 
     194         *  @param f the file to export to. 
     195         */ 
     196        public static void exportMutations(Database db, File f) throws DatabaseException, IOException 
     197        { 
     198                if(db.count(Mutations.class) > 0) 
     199                { 
     200                        CsvFileWriter MutationsWriter = new CsvFileWriter(f); 
     201                        db.find(Mutations.class, MutationsWriter); 
     202                        MutationsWriter.close(); 
     203                } 
     204        } 
     205        /** 
     206         *      export Contact to file. 
     207         *  @param db the database to export from. 
     208         *  @param f the file to export to. 
     209         */ 
     210        public static void exportContact(Database db, File f) throws DatabaseException, IOException 
     211        { 
     212                if(db.count(Contact.class) > 0) 
     213                { 
     214                        CsvFileWriter ContactWriter = new CsvFileWriter(f); 
     215                        db.find(Contact.class, ContactWriter); 
     216                        ContactWriter.close(); 
     217                } 
     218        } 
     219        /** 
     220         *      export Gender to file. 
     221         *  @param db the database to export from. 
     222         *  @param f the file to export to. 
     223         */ 
     224        public static void exportGender(Database db, File f) throws DatabaseException, IOException 
     225        { 
     226                if(db.count(Gender.class) > 0) 
     227                { 
     228                        CsvFileWriter GenderWriter = new CsvFileWriter(f); 
     229                        db.find(Gender.class, GenderWriter); 
     230                        GenderWriter.close(); 
     231                } 
     232        } 
     233        /** 
     234         *      export Patient to file. 
     235         *  @param db the database to export from. 
     236         *  @param f the file to export to. 
     237         */ 
     238        public static void exportPatient(Database db, File f) throws DatabaseException, IOException 
     239        { 
     240                if(db.count(Patient.class) > 0) 
     241                { 
     242                        CsvFileWriter PatientWriter = new CsvFileWriter(f); 
     243                        db.find(Patient.class, PatientWriter); 
     244                        PatientWriter.close(); 
     245                } 
     246        } 
     247        /** 
     248         *      export Phenotype to file. 
     249         *  @param db the database to export from. 
     250         *  @param f the file to export to. 
     251         */ 
     252        public static void exportPhenotype(Database db, File f) throws DatabaseException, IOException 
     253        { 
     254                if(db.count(Phenotype.class) > 0) 
     255                { 
     256                        CsvFileWriter PhenotypeWriter = new CsvFileWriter(f); 
     257                        db.find(Phenotype.class, PhenotypeWriter); 
     258                        PhenotypeWriter.close(); 
     259                } 
     260        } 
     261        /** 
     262         *      export Diagnosis to file. 
     263         *  @param db the database to export from. 
     264         *  @param f the file to export to. 
     265         */ 
     266        public static void exportDiagnosis(Database db, File f) throws DatabaseException, IOException 
     267        { 
     268                if(db.count(Diagnosis.class) > 0) 
     269                { 
     270                        CsvFileWriter DiagnosisWriter = new CsvFileWriter(f); 
     271                        db.find(Diagnosis.class, DiagnosisWriter); 
     272                        DiagnosisWriter.close(); 
     273                } 
     274        } 
     275        /** 
     276         *      export E_M to file. 
     277         *  @param db the database to export from. 
     278         *  @param f the file to export to. 
     279         */ 
     280        public static void exportE_M(Database db, File f) throws DatabaseException, IOException 
     281        { 
     282                if(db.count(E_M.class) > 0) 
     283                { 
     284                        CsvFileWriter E_MWriter = new CsvFileWriter(f); 
     285                        db.find(E_M.class, E_MWriter); 
     286                        E_MWriter.close(); 
     287                } 
     288        } 
     289        /** 
     290         *      export I_F to file. 
     291         *  @param db the database to export from. 
     292         *  @param f the file to export to. 
     293         */ 
     294        public static void exportI_F(Database db, File f) throws DatabaseException, IOException 
     295        { 
     296                if(db.count(I_F.class) > 0) 
     297                { 
     298                        CsvFileWriter I_FWriter = new CsvFileWriter(f); 
     299                        db.find(I_F.class, I_FWriter); 
     300                        I_FWriter.close(); 
     301                } 
     302        } 
     303        /** 
     304         *      export Statistics to file. 
     305         *  @param db the database to export from. 
     306         *  @param f the file to export to. 
     307         */ 
     308        public static void exportStatistics(Database db, File f) throws DatabaseException, IOException 
     309        { 
     310                if(db.count(Statistics.class) > 0) 
     311                { 
     312                        CsvFileWriter StatisticsWriter = new CsvFileWriter(f); 
     313                        db.find(Statistics.class, StatisticsWriter); 
     314                        StatisticsWriter.close(); 
     315                } 
     316        } 
     317        /** 
     318         *      export Pictures to file. 
     319         *  @param db the database to export from. 
     320         *  @param f the file to export to. 
     321         */ 
     322        public static void exportPictures(Database db, File f) throws DatabaseException, IOException 
     323        { 
     324                if(db.count(Pictures.class) > 0) 
     325                { 
     326                        CsvFileWriter PicturesWriter = new CsvFileWriter(f); 
     327                        db.find(Pictures.class, PicturesWriter); 
     328                        PicturesWriter.close(); 
     329                } 
     330        } 
     331        /** 
     332         *      export Data to file. 
     333         *  @param db the database to export from. 
     334         *  @param f the file to export to. 
     335         */ 
     336        public static void exportData(Database db, File f) throws DatabaseException, IOException 
     337        { 
     338                if(db.count(Data.class, new QueryRule("type",Operator.EQUALS, "Data")) > 0) 
     339                { 
     340                        CsvFileWriter DataWriter = new CsvFileWriter(f); 
     341                        db.find(Data.class, DataWriter, new QueryRule("type",Operator.EQUALS, "Data")); 
     342                        DataWriter.close(); 
     343                } 
     344        } 
     345        /** 
     346         *      export Investigation to file. 
     347         *  @param db the database to export from. 
     348         *  @param f the file to export to. 
     349         */ 
     350        public static void exportInvestigation(Database db, File f) throws DatabaseException, IOException 
     351        { 
     352                if(db.count(Investigation.class, new QueryRule("type",Operator.EQUALS, "Investigation")) > 0) 
     353                { 
     354                        CsvFileWriter InvestigationWriter = new CsvFileWriter(f); 
     355                        db.find(Investigation.class, InvestigationWriter, new QueryRule("type",Operator.EQUALS, "Investigation")); 
     356                        InvestigationWriter.close(); 
     357                } 
     358        } 
     359        /** 
     360         *      export DimensionElement to file. 
     361         *  @param db the database to export from. 
     362         *  @param f the file to export to. 
     363         */ 
     364        public static void exportDimensionElement(Database db, File f) throws DatabaseException, IOException 
     365        { 
     366                if(db.count(DimensionElement.class, new QueryRule("type",Operator.EQUALS, "DimensionElement")) > 0) 
     367                { 
     368                        CsvFileWriter DimensionElementWriter = new CsvFileWriter(f); 
     369                        db.find(DimensionElement.class, DimensionElementWriter, new QueryRule("type",Operator.EQUALS, "DimensionElement")); 
     370                        DimensionElementWriter.close(); 
     371                } 
     372        } 
     373        /** 
     374         *      export Describable to file. 
     375         *  @param db the database to export from. 
     376         *  @param f the file to export to. 
     377         */ 
     378        public static void exportDescribable(Database db, File f) throws DatabaseException, IOException 
     379        { 
     380                if(db.count(Describable.class, new QueryRule("type",Operator.EQUALS, "Describable")) > 0) 
     381                { 
     382                        CsvFileWriter DescribableWriter = new CsvFileWriter(f); 
     383                        db.find(Describable.class, DescribableWriter, new QueryRule("type",Operator.EQUALS, "Describable")); 
     384                        DescribableWriter.close(); 
     385                } 
     386        } 
     387        /** 
     388         *      export Identifiable to file. 
     389         *  @param db the database to export from. 
     390         *  @param f the file to export to. 
     391         */ 
     392        public static void exportIdentifiable(Database db, File f) throws DatabaseException, IOException 
     393        { 
     394                if(db.count(Identifiable.class, new QueryRule("type",Operator.EQUALS, "Identifiable")) > 0) 
     395                { 
     396                        CsvFileWriter IdentifiableWriter = new CsvFileWriter(f); 
     397                        db.find(Identifiable.class, IdentifiableWriter, new QueryRule("type",Operator.EQUALS, "Identifiable")); 
     398                        IdentifiableWriter.close(); 
     399                } 
     400        } 
     401        /** 
     402         *      export FugeData to file. 
     403         *  @param db the database to export from. 
     404         *  @param f the file to export to. 
     405         */ 
     406        public static void exportFugeData(Database db, File f) throws DatabaseException, IOException 
     407        { 
     408                if(db.count(FugeData.class, new QueryRule("type",Operator.EQUALS, "FugeData")) > 0) 
     409                { 
     410                        CsvFileWriter FugeDataWriter = new CsvFileWriter(f); 
     411                        db.find(FugeData.class, FugeDataWriter, new QueryRule("type",Operator.EQUALS, "FugeData")); 
     412                        FugeDataWriter.close(); 
     413                } 
     414        } 
     415        /** 
     416         *      export FugeDimensionElement to file. 
     417         *  @param db the database to export from. 
     418         *  @param f the file to export to. 
     419         */ 
     420        public static void exportFugeDimensionElement(Database db, File f) throws DatabaseException, IOException 
     421        { 
     422                if(db.count(FugeDimensionElement.class, new QueryRule("type",Operator.EQUALS, "FugeDimensionElement")) > 0) 
     423                { 
     424                        CsvFileWriter FugeDimensionElementWriter = new CsvFileWriter(f); 
     425                        db.find(FugeDimensionElement.class, FugeDimensionElementWriter, new QueryRule("type",Operator.EQUALS, "FugeDimensionElement")); 
     426                        FugeDimensionElementWriter.close(); 
     427                } 
     428        } 
     429        /** 
     430         *      export FugeInvestigation to file. 
     431         *  @param db the database to export from. 
     432         *  @param f the file to export to. 
     433         */ 
     434        public static void exportFugeInvestigation(Database db, File f) throws DatabaseException, IOException 
     435        { 
     436                if(db.count(FugeInvestigation.class, new QueryRule("type",Operator.EQUALS, "FugeInvestigation")) > 0) 
     437                { 
     438                        CsvFileWriter FugeInvestigationWriter = new CsvFileWriter(f); 
     439                        db.find(FugeInvestigation.class, FugeInvestigationWriter, new QueryRule("type",Operator.EQUALS, "FugeInvestigation")); 
     440                        FugeInvestigationWriter.close(); 
     441                } 
     442        } 
     443        /** 
     444         *      export TextDataElement to file. 
     445         *  @param db the database to export from. 
     446         *  @param f the file to export to. 
     447         */ 
     448        public static void exportTextDataElement(Database db, File f) throws DatabaseException, IOException 
     449        { 
     450                if(db.count(TextDataElement.class) > 0) 
     451                { 
     452                        CsvFileWriter TextDataElementWriter = new CsvFileWriter(f); 
     453                        db.find(TextDataElement.class, TextDataElementWriter); 
     454                        TextDataElementWriter.close(); 
     455                } 
     456        } 
     457        /** 
     458         *      export DecimalDataElement to file. 
     459         *  @param db the database to export from. 
     460         *  @param f the file to export to. 
     461         */ 
     462        public static void exportDecimalDataElement(Database db, File f) throws DatabaseException, IOException 
     463        { 
     464                if(db.count(DecimalDataElement.class) > 0) 
     465                { 
     466                        CsvFileWriter DecimalDataElementWriter = new CsvFileWriter(f); 
     467                        db.find(DecimalDataElement.class, DecimalDataElementWriter); 
     468                        DecimalDataElementWriter.close(); 
     469                } 
     470        } 
     471        /** 
    200472         *      export User_roles to file. 
    201473         *  @param db the database to export from. 
  • molgenis4eb/generated/java/tools/CsvImportByName.java

    r2015 r2022  
    11 
    2 /* Date:        July 17, 2009 
     2/* Date:        July 21, 2009 
    33 *  
    44 * generator:   org.molgenis.generators.tools.CsvImportByNameGen 3.3.0-testing 
     
    2929import org.molgenis.util.tuple.SimpleTuple; 
    3030 
    31 import example.data.types.Identifiable; 
    32 import example.data.types.Experiment; 
    33 import example.data.types.Sample; 
    34 import example.data.types.SpecialSample; 
    35 import example.data.types.Trait; 
    36 import example.data.types.Measurement; 
    37 import example.data.types.Data; 
    38 import example.data.types.Role; 
    39 import example.data.types.User; 
    40 import example.data.types.Entity; 
    41 import example.data.types.RoleEntityPermission; 
    42 import example.data.types.User_roles; 
     31import molgenis4eb.data.types.Role; 
     32import molgenis4eb.data.types.User; 
     33import molgenis4eb.data.types.Entity; 
     34import molgenis4eb.data.types.RoleEntityPermission; 
     35import molgenis4eb.data.types.Statistics; 
     36import molgenis4eb.data.types.RNA; 
     37import molgenis4eb.data.types.Amino_acid; 
     38import molgenis4eb.data.types.Mutations; 
     39import molgenis4eb.data.types.Contact; 
     40import molgenis4eb.data.types.Patient; 
     41import molgenis4eb.data.types.Gender; 
     42import molgenis4eb.data.types.Diagnosis; 
     43import molgenis4eb.data.types.Phenotype; 
     44import molgenis4eb.data.types.E_M; 
     45import molgenis4eb.data.types.I_F; 
     46import molgenis4eb.data.types.Consequence; 
     47import molgenis4eb.data.types.Pictures; 
     48import molgenis4eb.data.types.DataElement; 
     49import molgenis4eb.data.types.DecimalDataElement; 
     50import molgenis4eb.data.types.TextDataElement; 
     51import molgenis4eb.data.types.Describable; 
     52import molgenis4eb.data.types.Identifiable; 
     53import molgenis4eb.data.types.FugeData; 
     54import molgenis4eb.data.types.Data; 
     55import molgenis4eb.data.types.FugeDimensionElement; 
     56import molgenis4eb.data.types.FugeInvestigation; 
     57import molgenis4eb.data.types.Investigation; 
     58import molgenis4eb.data.types.DimensionElement; 
     59import molgenis4eb.data.types.User_roles; 
    4360 
    4461public class CsvImportByName 
     
    7996                        if(withTransaction) db.beginTx(); 
    8097                                                 
    81                         importExperiment(db, new File(directory + "/experiment.txt"), defaults); 
    82                         importSample(db, new File(directory + "/sample.txt"), defaults); 
    83                         importSpecialSample(db, new File(directory + "/specialsample.txt"), defaults); 
    84                         importTrait(db, new File(directory + "/trait.txt"), defaults); 
    85                         importMeasurement(db, new File(directory + "/measurement.txt"), defaults); 
    86                         importData(db, new File(directory + "/data.txt"), defaults); 
    8798                        importRole(db, new File(directory + "/role.txt"), defaults); 
    8899                        importUser(db, new File(directory + "/user.txt"), defaults); 
    89100                        importEntity(db, new File(directory + "/entity.txt"), defaults); 
    90101                        importRoleEntityPermission(db, new File(directory + "/roleentitypermission.txt"), defaults); 
     102                        importConsequence(db, new File(directory + "/consequence.txt"), defaults); 
     103                        importAmino_acid(db, new File(directory + "/amino_acid.txt"), defaults); 
     104                        importRNA(db, new File(directory + "/rna.txt"), defaults); 
     105                        importMutations(db, new File(directory + "/mutations.txt"), defaults); 
     106                        importContact(db, new File(directory + "/contact.txt"), defaults); 
     107                        importGender(db, new File(directory + "/gender.txt"), defaults); 
     108                        importPatient(db, new File(directory + "/patient.txt"), defaults); 
     109                        importPhenotype(db, new File(directory + "/phenotype.txt"), defaults); 
     110                        importDiagnosis(db, new File(directory + "/diagnosis.txt"), defaults); 
     111                        importE_M(db, new File(directory + "/e_m.txt"), defaults); 
     112                        importI_F(db, new File(directory + "/i_f.txt"), defaults); 
     113                        importStatistics(db, new File(directory + "/statistics.txt"), defaults); 
     114                        importPictures(db, new File(directory + "/pictures.txt"), defaults); 
     115                        importData(db, new File(directory + "/data.txt"), defaults); 
     116                        importInvestigation(db, new File(directory + "/investigation.txt"), defaults); 
     117                        importDimensionElement(db, new File(directory + "/dimensionelement.txt"), defaults); 
     118                        importDescribable(db, new File(directory + "/describable.txt"), defaults); 
     119                        importIdentifiable(db, new File(directory + "/identifiable.txt"), defaults); 
     120                        importFugeData(db, new File(directory + "/fugedata.txt"), defaults); 
     121                        importFugeDimensionElement(db, new File(directory + "/fugedimensionelement.txt"), defaults); 
     122                        importFugeInvestigation(db, new File(directory + "/fugeinvestigation.txt"), defaults); 
     123                        importTextDataElement(db, new File(directory + "/textdataelement.txt"), defaults); 
     124                        importDecimalDataElement(db, new File(directory + "/decimaldataelement.txt"), defaults); 
    91125                        importUser_roles(db, new File(directory + "/user_roles.txt"), defaults); 
    92126                         
     
    109143                ImportResult result = new ImportResult(); 
    110144 
    111                 if (result.getErrorItem().equals("no error found") && components.contains("experiment")) { 
     145                if (result.getErrorItem().equals("no error found") && components.contains("role")) { 
    112146                        db.beginTx(); 
    113147                        try { 
    114                                 String outcome = importExperiment(db, new File(directory + "/experiment.txt"), defaults, dupHandling); 
    115                                 result.getProgressLog().add("experiment"); 
    116                                 result.getMessages().put("experiment", outcome); 
     148                                String outcome = importRole(db, new File(directory + "/role.txt"), defaults, dupHandling); 
     149                                result.getProgressLog().add("role"); 
     150                                result.getMessages().put("role", outcome); 
    117151                                db.commitTx(); 
    118152                        } catch (Exception e) { 
    119                                 result.setErrorItem("experiment"); 
    120                                 result.getMessages().put("experiment", e.getMessage() != null ? e.getMessage() : "null"); 
     153                                result.setErrorItem("role"); 
     154                                result.getMessages().put("role", e.getMessage() != null ? e.getMessage() : "null"); 
    121155                                db.rollbackTx(); 
    122156                        } 
    123157                } 
    124                 if (result.getErrorItem().equals("no error found") && components.contains("sample")) { 
     158                if (result.getErrorItem().equals("no error found") && components.contains("user")) { 
    125159                        db.beginTx(); 
    126160                        try { 
    127                                 String outcome = importSample(db, new File(directory + "/sample.txt"), defaults, dupHandling); 
    128                                 result.getProgressLog().add("sample"); 
    129                                 result.getMessages().put("sample", outcome); 
     161                                String outcome = importUser(db, new File(directory + "/user.txt"), defaults, dupHandling); 
     162                                result.getProgressLog().add("user"); 
     163                                result.getMessages().put("user", outcome); 
    130164                                db.commitTx(); 
    131165                        } catch (Exception e) { 
    132                                 result.setErrorItem("sample"); 
    133                                 result.getMessages().put("sample", e.getMessage() != null ? e.getMessage() : "null"); 
     166                                result.setErrorItem("user"); 
     167                                result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 
    134168                                db.rollbackTx(); 
    135169                        } 
    136170                } 
    137                 if (result.getErrorItem().equals("no error found") && components.contains("specialsample")) { 
     171                if (result.getErrorItem().equals("no error found") && components.contains("entity")) { 
    138172                        db.beginTx(); 
    139173                        try { 
    140                                 String outcome = importSpecialSample(db, new File(directory + "/specialsample.txt"), defaults, dupHandling); 
    141                                 result.getProgressLog().add("specialsample"); 
    142                                 result.getMessages().put("specialsample", outcome); 
     174                                String outcome = importEntity(db, new File(directory + "/entity.txt"), defaults, dupHandling); 
     175                                result.getProgressLog().add("entity"); 
     176                                result.getMessages().put("entity", outcome); 
    143177                                db.commitTx(); 
    144178                        } catch (Exception e) { 
    145                                 result.setErrorItem("specialsample"); 
    146                                 result.getMessages().put("specialsample", e.getMessage() != null ? e.getMessage() : "null"); 
     179                                result.setErrorItem("entity"); 
     180                                result.getMessages().put("entity", e.getMessage() != null ? e.getMessage() : "null"); 
    147181                                db.rollbackTx(); 
    148182                        } 
    149183                } 
    150                 if (result.getErrorItem().equals("no error found") && components.contains("trait")) { 
     184                if (result.getErrorItem().equals("no error found") && components.contains("roleentitypermission")) { 
    151185                        db.beginTx(); 
    152186                        try { 
    153                                 String outcome = importTrait(db, new File(directory + "/trait.txt"), defaults, dupHandling); 
    154                                 result.getProgressLog().add("trait"); 
    155                                 result.getMessages().put("trait", outcome); 
     187                                String outcome = importRoleEntityPermission(db, new File(directory + "/roleentitypermission.txt"), defaults, dupHandling); 
     188                                result.getProgressLog().add("roleentitypermission"); 
     189                                result.getMessages().put("roleentitypermission", outcome); 
    156190                                db.commitTx(); 
    157191                        } catch (Exception e) { 
    158                                 result.setErrorItem("trait"); 
    159                                 result.getMessages().put("trait", e.getMessage() != null ? e.getMessage() : "null"); 
     192                                result.setErrorItem("roleentitypermission"); 
     193                                result.getMessages().put("roleentitypermission", e.getMessage() != null ? e.getMessage() : "null"); 
    160194                                db.rollbackTx(); 
    161195                        } 
    162196                } 
    163                 if (result.getErrorItem().equals("no error found") && components.contains("measurement")) { 
     197                if (result.getErrorItem().equals("no error found") && components.contains("consequence")) { 
    164198                        db.beginTx(); 
    165199                        try { 
    166                                 String outcome = importMeasurement(db, new File(directory + "/measurement.txt"), defaults, dupHandling); 
    167                                 result.getProgressLog().add("measurement"); 
    168                                 result.getMessages().put("measurement", outcome); 
     200                                String outcome = importConsequence(db, new File(directory + "/consequence.txt"), defaults, dupHandling); 
     201                                result.getProgressLog().add("consequence"); 
     202                                result.getMessages().put("consequence", outcome); 
    169203                                db.commitTx(); 
    170204                        } catch (Exception e) { 
    171                                 result.setErrorItem("measurement"); 
    172                                 result.getMessages().put("measurement", e.getMessage() != null ? e.getMessage() : "null"); 
     205                                result.setErrorItem("consequence"); 
     206                                result.getMessages().put("consequence", e.getMessage() != null ? e.getMessage() : "null"); 
     207                                db.rollbackTx(); 
     208                        } 
     209                } 
     210                if (result.getErrorItem().equals("no error found") && components.contains("amino_acid")) { 
     211                        db.beginTx(); 
     212                        try { 
     213                                String outcome = importAmino_acid(db, new File(directory + "/amino_acid.txt"), defaults, dupHandling); 
     214                                result.getProgressLog().add("amino_acid"); 
     215                                result.getMessages().put("amino_acid", outcome); 
     216                                db.commitTx(); 
     217                        } catch (Exception e) { 
     218                                result.setErrorItem("amino_acid"); 
     219                                result.getMessages().put("amino_acid", e.getMessage() != null ? e.getMessage() : "null"); 
     220                                db.rollbackTx(); 
     221                        } 
     222                } 
     223                if (result.getErrorItem().equals("no error found") && components.contains("rna")) { 
     224                        db.beginTx(); 
     225                        try { 
     226                                String outcome = importRNA(db, new File(directory + "/rna.txt"), defaults, dupHandling); 
     227                                result.getProgressLog().add("rna"); 
     228                                result.getMessages().put("rna", outcome); 
     229                                db.commitTx(); 
     230                        } catch (Exception e) { 
     231                                result.setErrorItem("rna"); 
     232                                result.getMessages().put("rna", e.getMessage() != null ? e.getMessage() : "null"); 
     233                                db.rollbackTx(); 
     234                        } 
     235                } 
     236                if (result.getErrorItem().equals("no error found") && components.contains("mutations")) { 
     237                        db.beginTx(); 
     238                        try { 
     239                                String outcome = importMutations(db, new File(directory + "/mutations.txt"), defaults, dupHandling); 
     240                                result.getProgressLog().add("mutations"); 
     241                                result.getMessages().put("mutations", outcome); 
     242                                db.commitTx(); 
     243                        } catch (Exception e) { 
     244                                result.setErrorItem("mutations"); 
     245                                result.getMessages().put("mutations", e.getMessage() != null ? e.getMessage() : "null"); 
     246                                db.rollbackTx(); 
     247                        } 
     248                } 
     249                if (result.getErrorItem().equals("no error found") && components.contains("contact")) { 
     250                        db.beginTx(); 
     251                        try { 
     252                                String outcome = importContact(db, new File(directory + "/contact.txt"), defaults, dupHandling); 
     253                                result.getProgressLog().add("contact"); 
     254                                result.getMessages().put("contact", outcome); 
     255                                db.commitTx(); 
     256                        } catch (Exception e) { 
     257                                result.setErrorItem("contact"); 
     258                                result.getMessages().put("contact", e.getMessage() != null ? e.getMessage() : "null"); 
     259                                db.rollbackTx(); 
     260                        } 
     261                } 
     262                if (result.getErrorItem().equals("no error found") && components.contains("gender")) { 
     263                        db.beginTx(); 
     264                        try { 
     265                                String outcome = importGender(db, new File(directory + "/gender.txt"), defaults, dupHandling); 
     266                                result.getProgressLog().add("gender"); 
     267                                result.getMessages().put("gender", outcome); 
     268                                db.commitTx(); 
     269                        } catch (Exception e) { 
     270                                result.setErrorItem("gender"); 
     271                                result.getMessages().put("gender", e.getMessage() != null ? e.getMessage() : "null"); 
     272                                db.rollbackTx(); 
     273                        } 
     274                } 
     275                if (result.getErrorItem().equals("no error found") && components.contains("patient")) { 
     276                        db.beginTx(); 
     277                        try { 
     278                                String outcome = importPatient(db, new File(directory + "/patient.txt"), defaults, dupHandling); 
     279                                result.getProgressLog().add("patient"); 
     280                                result.getMessages().put("patient", outcome); 
     281                                db.commitTx(); 
     282                        } catch (Exception e) { 
     283                                result.setErrorItem("patient"); 
     284                                result.getMessages().put("patient", e.getMessage() != null ? e.getMessage() : "null"); 
     285                                db.rollbackTx(); 
     286                        } 
     287                } 
     288                if (result.getErrorItem().equals("no error found") && components.contains("phenotype")) { 
     289                        db.beginTx(); 
     290                        try { 
     291                                String outcome = importPhenotype(db, new File(directory + "/phenotype.txt"), defaults, dupHandling); 
     292                                result.getProgressLog().add("phenotype"); 
     293                                result.getMessages().put("phenotype", outcome); 
     294                                db.commitTx(); 
     295                        } catch (Exception e) { 
     296                                result.setErrorItem("phenotype"); 
     297                                result.getMessages().put("phenotype", e.getMessage() != null ? e.getMessage() : "null"); 
     298                                db.rollbackTx(); 
     299                        } 
     300                } 
     301                if (result.getErrorItem().equals("no error found") && components.contains("diagnosis")) { 
     302                        db.beginTx(); 
     303                        try { 
     304                                String outcome = importDiagnosis(db, new File(directory + "/diagnosis.txt"), defaults, dupHandling); 
     305                                result.getProgressLog().add("diagnosis"); 
     306                                result.getMessages().put("diagnosis", outcome); 
     307                                db.commitTx(); 
     308                        } catch (Exception e) { 
     309                                result.setErrorItem("diagnosis"); 
     310                                result.getMessages().put("diagnosis", e.getMessage() != null ? e.getMessage() : "null"); 
     311                                db.rollbackTx(); 
     312                        } 
     313                } 
     314                if (result.getErrorItem().equals("no error found") && components.contains("e_m")) { 
     315                        db.beginTx(); 
     316                        try { 
     317                                String outcome = importE_M(db, new File(directory + "/e_m.txt"), defaults, dupHandling); 
     318                                result.getProgressLog().add("e_m"); 
     319                                result.getMessages().put("e_m", outcome); 
     320                                db.commitTx(); 
     321                        } catch (Exception e) { 
     322                                result.setErrorItem("e_m"); 
     323                                result.getMessages().put("e_m", e.getMessage() != null ? e.getMessage() : "null"); 
     324                                db.rollbackTx(); 
     325                        } 
     326                } 
     327                if (result.getErrorItem().equals("no error found") && components.contains("i_f")) { 
     328                        db.beginTx(); 
     329                        try { 
     330                                String outcome = importI_F(db, new File(directory + "/i_f.txt"), defaults, dupHandling); 
     331                                result.getProgressLog().add("i_f"); 
     332                                result.getMessages().put("i_f", outcome); 
     333                                db.commitTx(); 
     334                        } catch (Exception e) { 
     335                                result.setErrorItem("i_f"); 
     336                                result.getMessages().put("i_f", e.getMessage() != null ? e.getMessage() : "null"); 
     337                                db.rollbackTx(); 
     338                        } 
     339                } 
     340                if (result.getErrorItem().equals("no error found") && components.contains("statistics")) { 
     341                        db.beginTx(); 
     342                        try { 
     343                                String outcome = importStatistics(db, new File(directory + "/statistics.txt"), defaults, dupHandling); 
     344                                result.getProgressLog().add("statistics"); 
     345                                result.getMessages().put("statistics", outcome); 
     346                                db.commitTx(); 
     347                        } catch (Exception e) { 
     348                                result.setErrorItem("statistics"); 
     349                                result.getMessages().put("statistics", e.getMessage() != null ? e.getMessage() : "null"); 
     350                                db.rollbackTx(); 
     351                        } 
     352                } 
     353                if (result.getErrorItem().equals("no error found") && components.contains("pictures")) { 
     354                        db.beginTx(); 
     355                        try { 
     356                                String outcome = importPictures(db, new File(directory + "/pictures.txt"), defaults, dupHandling); 
     357                                result.getProgressLog().add("pictures"); 
     358                                result.getMessages().put("pictures", outcome); 
     359                                db.commitTx(); 
     360                        } catch (Exception e) { 
     361                                result.setErrorItem("pictures"); 
     362                                result.getMessages().put("pictures", e.getMessage() != null ? e.getMessage() : "null"); 
    173363                                db.rollbackTx(); 
    174364                        } 
     
    187377                        } 
    188378                } 
    189                 if (result.getErrorItem().equals("no error found") && components.contains("role")) { 
     379                if (result.getErrorItem().equals("no error found") && components.contains("investigation")) { 
    190380                        db.beginTx(); 
    191381                        try { 
    192                                 String outcome = importRole(db, new File(directory + "/role.txt"), defaults, dupHandling); 
    193                                 result.getProgressLog().add("role"); 
    194                                 result.getMessages().put("role", outcome); 
     382                                String outcome = importInvestigation(db, new File(directory + "/investigation.txt"), defaults, dupHandling); 
     383                                result.getProgressLog().add("investigation"); 
     384                                result.getMessages().put("investigation", outcome); 
    195385                                db.commitTx(); 
    196386                        } catch (Exception e) { 
    197                                 result.setErrorItem("role"); 
    198                                 result.getMessages().put("role", e.getMessage() != null ? e.getMessage() : "null"); 
     387                                result.setErrorItem("investigation"); 
     388                                result.getMessages().put("investigation", e.getMessage() != null ? e.getMessage() : "null"); 
    199389                                db.rollbackTx(); 
    200390                        } 
    201391                } 
    202                 if (result.getErrorItem().equals("no error found") && components.contains("user")) { 
     392                if (result.getErrorItem().equals("no error found") && components.contains("dimensionelement")) { 
    203393                        db.beginTx(); 
    204394                        try { 
    205                                 String outcome = importUser(db, new File(directory + "/user.txt"), defaults, dupHandling); 
    206                                 result.getProgressLog().add("user"); 
    207                                 result.getMessages().put("user", outcome); 
     395                                String outcome = importDimensionElement(db, new File(directory + "/dimensionelement.txt"), defaults, dupHandling); 
     396                                result.getProgressLog().add("dimensionelement"); 
     397                                result.getMessages().put("dimensionelement", outcome); 
    208398                                db.commitTx(); 
    209399                        } catch (Exception e) { 
    210                                 result.setErrorItem("user"); 
    211                                 result.getMessages().put("user", e.getMessage() != null ? e.getMessage() : "null"); 
     400                                result.setErrorItem("dimensionelement"); 
     401                                result.getMessages().put("dimensionelement", e.getMessage() != null ? e.getMessage() : "null"); 
    212402                                db.rollbackTx(); 
    213403                        } 
    214404                } 
    215                 if (result.getErrorItem().equals("no error found") && components.contains("entity")) { 
     405                if (result.getErrorItem().equals("no error found") && components.contains("describable")) { 
    216406                        db.beginTx(); 
    217407                        try { 
    218                                 String outcome = importEntity(db, new File(directory + "/entity.txt"), defaults, dupHandling); 
    219                                 result.getProgressLog().add("entity"); 
    220                                 result.getMessages().put("entity", outcome); 
     408                                String outcome = importDescribable(db, new File(directory + "/describable.txt"), defaults, dupHandling); 
     409                                result.getProgressLog().add("describable"); 
     410                                result.getMessages().put("describable", outcome); 
    221411                                db.commitTx(); 
    222412                        } catch (Exception e) { 
    223                                 result.setErrorItem("entity"); 
    224                                 result.getMessages().put("entity", e.getMessage() != null ? e.getMessage() : "null"); 
     413                                result.setErrorItem("describable"); 
     414                                result.getMessages().put("describable", e.getMessage() != null ? e.getMessage() : "null"); 
    225415                                db.rollbackTx(); 
    226416                        } 
    227417                } 
    228                 if (result.getErrorItem().equals("no error found") && components.contains("roleentitypermission")) { 
     418                if (result.getErrorItem().equals("no error found") && components.contains("identifiable")) { 
    229419                        db.beginTx(); 
    230420                        try { 
    231                                 String outcome = importRoleEntityPermission(db, new File(directory + "/roleentitypermission.txt"), defaults, dupHandling); 
    232                                 result.getProgressLog().add("roleentitypermission"); 
    233                                 result.getMessages().put("roleentitypermission", outcome); 
     421                                String outcome = importIdentifiable(db, new File(directory + "/identifiable.txt"), defaults, dupHandling); 
     422                                result.getProgressLog().add("identifiable"); 
     423                                result.getMessages().put("identifiable", outcome); 
    234424                                db.commitTx(); 
    235425                        } catch (Exception e) { 
    236                                 result.setErrorItem("roleentitypermission"); 
    237                                 result.getMessages().put("roleentitypermission", e.getMessage() != null ? e.getMessage() : "null"); 
     426                                result.setErrorItem("identifiable"); 
     427                                result.getMessages().put("identifiable", e.getMessage() != null ? e.getMessage() : "null"); 
     428                                db.rollbackTx(); 
     429                        } 
     430                } 
     431                if (result.getErrorItem().equals("no error found") && components.contains("fugedata")) { 
     432                        db.beginTx(); 
     433                        try { 
     434                                String outcome = importFugeData(db, new File(directory + "/fugedata.txt"), defaults, dupHandling); 
     435                                result.getProgressLog().add("fugedata"); 
     436                                result.getMessages().put("fugedata", outcome); 
     437                                db.commitTx(); 
     438                        } catch (Exception e) { 
     439                                result.setErrorItem("fugedata"); 
     440                                result.getMessages().put("fugedata", e.getMessage() != null ? e.getMessage() : "null"); 
     441                                db.rollbackTx(); 
     442                        } 
     443                } 
     444                if (result.getErrorItem().equals("no error found") && components.contains("fugedimensionelement")) { 
     445                        db.beginTx(); 
     446                        try { 
     447                                String outcome = importFugeDimensionElement(db, new File(directory + "/fugedimensionelement.txt"), defaults, dupHandling); 
     448                                result.getProgressLog().add("fugedimensionelement"); 
     449                                result.getMessages().put("fugedimensionelement", outcome); 
     450                                db.commitTx(); 
     451                        } catch (Exception e) { 
     452                                result.setErrorItem("fugedimensionelement"); 
     453                                result.getMessages().put("fugedimensionelement", e.getMessage() != null ? e.getMessage() : "null"); 
     454                                db.rollbackTx(); 
     455                        } 
     456                } 
     457                if (result.getErrorItem().equals("no error found") && components.contains("fugeinvestigation")) { 
     458                        db.beginTx(); 
     459                        try { 
     460                                String outcome = importFugeInvestigation(db, new File(directory + "/fugeinvestigation.txt"), defaults, dupHandling); 
     461                                result.getProgressLog().add("fugeinvestigation"); 
     462                                result.getMessages().put("fugeinvestigation", outcome); 
     463                                db.commitTx(); 
     464                        } catch (Exception e) { 
     465                                result.setErrorItem("fugeinvestigation"); 
     466                                result.getMessages().put("fugeinvestigation", e.getMessage() != null ? e.getMessage() : "null"); 
     467                                db.rollbackTx(); 
     468                        } 
     469                } 
     470                if (result.getErrorItem().equals("no error found") && components.contains("textdataelement")) { 
     471                        db.beginTx(); 
     472                        try { 
     473                                String outcome = importTextDataElement(db, new File(directory + "/textdataelement.txt"), defaults, dupHandling); 
     474                                result.getProgressLog().add("textdataelement"); 
     475                                result.getMessages().put("textdataelement", outcome); 
     476                                db.commitTx(); 
     477                        } catch (Exception e) { 
     478                                result.setErrorItem("textdataelement"); 
     479                                result.getMessages().put("textdataelement", e.getMessage() != null ? e.getMessage() : "null"); 
     480                                db.rollbackTx(); 
     481                        } 
     482                } 
     483                if (result.getErrorItem().equals("no error found") && components.contains("decimaldataelement")) { 
     484                        db.beginTx(); 
     485                        try { 
     486                                String outcome = importDecimalDataElement(db, new File(directory + "/decimaldataelement.txt"), defaults, dupHandling); 
     487                                result.getProgressLog().add("decimaldataelement"); 
     488                                result.getMessages().put("decimaldataelement", outcome); 
     489                                db.commitTx(); 
     490                        } catch (Exception e) { 
     491                                result.setErrorItem("decimaldataelement"); 
     492                                result.getMessages().put("decimaldataelement", e.getMessage() != null ? e.getMessage() : "null"); 
    238493                                db.rollbackTx(); 
    239494                        } 
     
    255510                return result; 
    256511                         
    257         } 
    258         /** 
    259          * Imports Experiment from tab/comma delimited File. 
    260          * @param ExperimentFile A tab delimited file with Experiment data. 
    261          */ 
    262         private static String importExperiment(final Database db, File ExperimentFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    263                 return importExperiment(db, ExperimentFile, defaults, "default"); 
    264         } 
    265  
    266         /** 
    267          * Imports Experiment from tab/comma delimited File. 
    268          * @param ExperimentFile A tab delimited file with Experiment data. 
    269          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    270          */ 
    271         private static String importExperiment(final Database db, File ExperimentFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
    272         { 
    273                 if(     ExperimentFile.exists() ) 
    274                 { 
    275                         //adjust batch size for replace or delete, keep old batch size 
    276                         int oldBatchSize = -1; 
    277                         if (dupHandling.equals("default")) { 
    278                                 oldBatchSize = BATCH_SIZE; 
    279                         } else { 
    280                                 oldBatchSize = BATCH_SIZE; 
    281                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    282                         } 
    283                         logger.info("trying to import "+ExperimentFile); 
    284                         CsvReader reader = new CsvFileReader(ExperimentFile);  
    285                          
    286                         //cache for imported objects 
    287                         final List<Experiment> ExperimentList = new ArrayList<Experiment>(BATCH_SIZE); 
    288                         final IntegerWrapper total = new IntegerWrapper(0); 
    289                         reader.parse(new CsvReaderListener() 
    290                         { 
    291                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    292                                 { 
    293                                         //parse object 
    294                                         Experiment object = new Experiment(); 
    295                                         object.set(tuple, false); 
    296                                         object.set(defaults, false);  
    297                                         //only override values that have been set. 
    298                                         ExperimentList.add(object); 
    299                                          
    300                                         //add in batches 
    301                                         if(ExperimentList.size() == BATCH_SIZE) 
    302                                         { 
    303                                                  
    304                                                  
    305                                                 db.add(ExperimentList); 
    306                                                  
    307                                                 //clear for next batch                                           
    308                                                 ExperimentList.clear(); 
    309                                                  
    310                                                 //keep count 
    311                                                 total.set(total.get() + BATCH_SIZE);                             
    312                                         } 
    313                                 } 
    314                         });      
    315                          
    316                         db.add(ExperimentList); 
    317                          
    318                         //restore original batch size 
    319                         BATCH_SIZE = oldBatchSize; 
    320                          
    321                         //output count 
    322                         total.set(total.get() + ExperimentList.size()); 
    323                         logger.info("imported "+total.get()+" Experiment from "+ExperimentFile); 
    324                         return "Evaluated " + total.get() + " Experiment items."; 
    325                 } 
    326                 else{ 
    327                         return "File not found."; 
    328                 }         
    329         } 
    330         /** 
    331          * Imports Sample from tab/comma delimited File. 
    332          * @param SampleFile A tab delimited file with Sample data. 
    333          */ 
    334         private static String importSample(final Database db, File SampleFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    335                 return importSample(db, SampleFile, defaults, "default"); 
    336         } 
    337  
    338         /** 
    339          * Imports Sample from tab/comma delimited File. 
    340          * @param SampleFile A tab delimited file with Sample data. 
    341          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    342          */ 
    343         private static String importSample(final Database db, File SampleFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
    344         { 
    345                 if(     SampleFile.exists() ) 
    346                 { 
    347                         //adjust batch size for replace or delete, keep old batch size 
    348                         int oldBatchSize = -1; 
    349                         if (dupHandling.equals("default")) { 
    350                                 oldBatchSize = BATCH_SIZE; 
    351                         } else { 
    352                                 oldBatchSize = BATCH_SIZE; 
    353                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    354                         } 
    355                         logger.info("trying to import "+SampleFile); 
    356                         CsvReader reader = new CsvFileReader(SampleFile);  
    357                          
    358                         //cache for imported objects 
    359                         final List<Sample> SampleList = new ArrayList<Sample>(BATCH_SIZE); 
    360                          
    361                         //foreign key map for field 'Experiment' (Experiment.Name -> Experiment.Id)                      
    362                         final Map<String,Integer> ExperimentKeymap = new TreeMap<String,Integer>(); 
    363                         final IntegerWrapper total = new IntegerWrapper(0); 
    364                         reader.parse(new CsvReaderListener() 
    365                         { 
    366                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    367                                 { 
    368                                         //parse object 
    369                                         Sample object = new Sample(); 
    370                                         object.set(tuple, false); 
    371                                         object.set(defaults, false);  
    372                                         //only override values that have been set. 
    373                                         SampleList.add(object); 
    374                                          
    375                                         //foreign key 'Experiment' (Experiment.Name -> ?) 
    376                                         if(object.getExperimentLabel() != null) ExperimentKeymap.put(object.getExperimentLabel(), null);         
    377                                          
    378                                         //add in batches 
    379                                         if(SampleList.size() == BATCH_SIZE) 
    380                                         { 
    381                                                 //resolve foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    382                                                 List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    383                                                 for(Experiment xref :  ExperimentList) 
    384                                                 { 
    385                                                         ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    386                                                 } 
    387                                                  
    388                                                 //update objects with foreign keys 
    389                                                 for(Sample o:  SampleList) 
    390                                                 { 
    391                                                         if(o.getExperimentLabel() != null)  
    392                                                         { 
    393                                                                 if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    394                                                                 o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    395                                                         } 
    396                                                 } 
    397                                                  
    398                                                  
    399                                                  
    400                                                 db.add(SampleList); 
    401                                                  
    402                                                 //clear for next batch                                           
    403                                                 SampleList.clear(); 
    404                                                 ExperimentKeymap.clear(); 
    405                                                  
    406                                                 //keep count 
    407                                                 total.set(total.get() + BATCH_SIZE);                             
    408                                         } 
    409                                 } 
    410                         });      
    411                         //resolve remaining foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    412                         List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    413                         for(Experiment xref :  ExperimentList) 
    414                         { 
    415                                 ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    416                         } 
    417                          
    418                         //update remaining objects with foreign keys 
    419                         for(Sample o:  SampleList) 
    420                         { 
    421                                 if(o.getExperimentLabel() != null)  
    422                                 { 
    423                                         if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    424                                         o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    425                                 } 
    426                         } 
    427                          
    428                          
    429                         db.add(SampleList); 
    430                          
    431                         //restore original batch size 
    432                         BATCH_SIZE = oldBatchSize; 
    433                          
    434                         //output count 
    435                         total.set(total.get() + SampleList.size()); 
    436                         logger.info("imported "+total.get()+" Sample from "+SampleFile); 
    437                         return "Evaluated " + total.get() + " Sample items."; 
    438                 } 
    439                 else{ 
    440                         return "File not found."; 
    441                 }         
    442         } 
    443         /** 
    444          * Imports SpecialSample from tab/comma delimited File. 
    445          * @param SpecialSampleFile A tab delimited file with SpecialSample data. 
    446          */ 
    447         private static String importSpecialSample(final Database db, File SpecialSampleFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    448                 return importSpecialSample(db, SpecialSampleFile, defaults, "default"); 
    449         } 
    450  
    451         /** 
    452          * Imports SpecialSample from tab/comma delimited File. 
    453          * @param SpecialSampleFile A tab delimited file with SpecialSample data. 
    454          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    455          */ 
    456         private static String importSpecialSample(final Database db, File SpecialSampleFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
    457         { 
    458                 if(     SpecialSampleFile.exists() ) 
    459                 { 
    460                         //adjust batch size for replace or delete, keep old batch size 
    461                         int oldBatchSize = -1; 
    462                         if (dupHandling.equals("default")) { 
    463                                 oldBatchSize = BATCH_SIZE; 
    464                         } else { 
    465                                 oldBatchSize = BATCH_SIZE; 
    466                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    467                         } 
    468                         logger.info("trying to import "+SpecialSampleFile); 
    469                         CsvReader reader = new CsvFileReader(SpecialSampleFile);  
    470                          
    471                         //cache for imported objects 
    472                         final List<SpecialSample> SpecialSampleList = new ArrayList<SpecialSample>(BATCH_SIZE); 
    473                          
    474                         //foreign key map for field 'Experiment' (Experiment.Name -> Experiment.Id)                      
    475                         final Map<String,Integer> ExperimentKeymap = new TreeMap<String,Integer>(); 
    476                         final IntegerWrapper total = new IntegerWrapper(0); 
    477                         reader.parse(new CsvReaderListener() 
    478                         { 
    479                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    480                                 { 
    481                                         //parse object 
    482                                         SpecialSample object = new SpecialSample(); 
    483                                         object.set(tuple, false); 
    484                                         object.set(defaults, false);  
    485                                         //only override values that have been set. 
    486                                         SpecialSampleList.add(object); 
    487                                          
    488                                         //foreign key 'Experiment' (Experiment.Name -> ?) 
    489                                         if(object.getExperimentLabel() != null) ExperimentKeymap.put(object.getExperimentLabel(), null);         
    490                                          
    491                                         //add in batches 
    492                                         if(SpecialSampleList.size() == BATCH_SIZE) 
    493                                         { 
    494                                                 //resolve foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    495                                                 List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    496                                                 for(Experiment xref :  ExperimentList) 
    497                                                 { 
    498                                                         ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    499                                                 } 
    500                                                  
    501                                                 //update objects with foreign keys 
    502                                                 for(SpecialSample o:  SpecialSampleList) 
    503                                                 { 
    504                                                         if(o.getExperimentLabel() != null)  
    505                                                         { 
    506                                                                 if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    507                                                                 o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    508                                                         } 
    509                                                 } 
    510                                                  
    511                                                  
    512                                                  
    513                                                 db.add(SpecialSampleList); 
    514                                                  
    515                                                 //clear for next batch                                           
    516                                                 SpecialSampleList.clear(); 
    517                                                 ExperimentKeymap.clear(); 
    518                                                  
    519                                                 //keep count 
    520                                                 total.set(total.get() + BATCH_SIZE);                             
    521                                         } 
    522                                 } 
    523                         });      
    524                         //resolve remaining foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    525                         List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    526                         for(Experiment xref :  ExperimentList) 
    527                         { 
    528                                 ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    529                         } 
    530                          
    531                         //update remaining objects with foreign keys 
    532                         for(SpecialSample o:  SpecialSampleList) 
    533                         { 
    534                                 if(o.getExperimentLabel() != null)  
    535                                 { 
    536                                         if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    537                                         o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    538                                 } 
    539                         } 
    540                          
    541                          
    542                         db.add(SpecialSampleList); 
    543                          
    544                         //restore original batch size 
    545                         BATCH_SIZE = oldBatchSize; 
    546                          
    547                         //output count 
    548                         total.set(total.get() + SpecialSampleList.size()); 
    549                         logger.info("imported "+total.get()+" SpecialSample from "+SpecialSampleFile); 
    550                         return "Evaluated " + total.get() + " SpecialSample items."; 
    551                 } 
    552                 else{ 
    553                         return "File not found."; 
    554                 }         
    555         } 
    556         /** 
    557          * Imports Trait from tab/comma delimited File. 
    558          * @param TraitFile A tab delimited file with Trait data. 
    559          */ 
    560         private static String importTrait(final Database db, File TraitFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    561                 return importTrait(db, TraitFile, defaults, "default"); 
    562         } 
    563  
    564         /** 
    565          * Imports Trait from tab/comma delimited File. 
    566          * @param TraitFile A tab delimited file with Trait data. 
    567          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    568          */ 
    569         private static String importTrait(final Database db, File TraitFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
    570         { 
    571                 if(     TraitFile.exists() ) 
    572                 { 
    573                         //adjust batch size for replace or delete, keep old batch size 
    574                         int oldBatchSize = -1; 
    575                         if (dupHandling.equals("default")) { 
    576                                 oldBatchSize = BATCH_SIZE; 
    577                         } else { 
    578                                 oldBatchSize = BATCH_SIZE; 
    579                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    580                         } 
    581                         logger.info("trying to import "+TraitFile); 
    582                         CsvReader reader = new CsvFileReader(TraitFile);  
    583                          
    584                         //cache for imported objects 
    585                         final List<Trait> TraitList = new ArrayList<Trait>(BATCH_SIZE); 
    586                          
    587                         //foreign key map for field 'Experiment' (Experiment.Name -> Experiment.Id)                      
    588                         final Map<String,Integer> ExperimentKeymap = new TreeMap<String,Integer>(); 
    589                         final IntegerWrapper total = new IntegerWrapper(0); 
    590                         reader.parse(new CsvReaderListener() 
    591                         { 
    592                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    593                                 { 
    594                                         //parse object 
    595                                         Trait object = new Trait(); 
    596                                         object.set(tuple, false); 
    597                                         object.set(defaults, false);  
    598                                         //only override values that have been set. 
    599                                         TraitList.add(object); 
    600                                          
    601                                         //foreign key 'Experiment' (Experiment.Name -> ?) 
    602                                         if(object.getExperimentLabel() != null) ExperimentKeymap.put(object.getExperimentLabel(), null);         
    603                                          
    604                                         //add in batches 
    605                                         if(TraitList.size() == BATCH_SIZE) 
    606                                         { 
    607                                                 //resolve foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    608                                                 List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    609                                                 for(Experiment xref :  ExperimentList) 
    610                                                 { 
    611                                                         ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    612                                                 } 
    613                                                  
    614                                                 //update objects with foreign keys 
    615                                                 for(Trait o:  TraitList) 
    616                                                 { 
    617                                                         if(o.getExperimentLabel() != null)  
    618                                                         { 
    619                                                                 if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    620                                                                 o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    621                                                         } 
    622                                                 } 
    623                                                  
    624                                                  
    625                                                  
    626                                                 db.add(TraitList); 
    627                                                  
    628                                                 //clear for next batch                                           
    629                                                 TraitList.clear(); 
    630                                                 ExperimentKeymap.clear(); 
    631                                                  
    632                                                 //keep count 
    633                                                 total.set(total.get() + BATCH_SIZE);                             
    634                                         } 
    635                                 } 
    636                         });      
    637                         //resolve remaining foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    638                         List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    639                         for(Experiment xref :  ExperimentList) 
    640                         { 
    641                                 ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    642                         } 
    643                          
    644                         //update remaining objects with foreign keys 
    645                         for(Trait o:  TraitList) 
    646                         { 
    647                                 if(o.getExperimentLabel() != null)  
    648                                 { 
    649                                         if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    650                                         o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    651                                 } 
    652                         } 
    653                          
    654                          
    655                         db.add(TraitList); 
    656                          
    657                         //restore original batch size 
    658                         BATCH_SIZE = oldBatchSize; 
    659                          
    660                         //output count 
    661                         total.set(total.get() + TraitList.size()); 
    662                         logger.info("imported "+total.get()+" Trait from "+TraitFile); 
    663                         return "Evaluated " + total.get() + " Trait items."; 
    664                 } 
    665                 else{ 
    666                         return "File not found."; 
    667                 }         
    668         } 
    669         /** 
    670          * Imports Measurement from tab/comma delimited File. 
    671          * @param MeasurementFile A tab delimited file with Measurement data. 
    672          */ 
    673         private static String importMeasurement(final Database db, File MeasurementFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    674                 return importMeasurement(db, MeasurementFile, defaults, "default"); 
    675         } 
    676  
    677         /** 
    678          * Imports Measurement from tab/comma delimited File. 
    679          * @param MeasurementFile A tab delimited file with Measurement data. 
    680          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    681          */ 
    682         private static String importMeasurement(final Database db, File MeasurementFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
    683         { 
    684                 if(     MeasurementFile.exists() ) 
    685                 { 
    686                         //adjust batch size for replace or delete, keep old batch size 
    687                         int oldBatchSize = -1; 
    688                         if (dupHandling.equals("default")) { 
    689                                 oldBatchSize = BATCH_SIZE; 
    690                         } else { 
    691                                 oldBatchSize = BATCH_SIZE; 
    692                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    693                         } 
    694                         logger.info("trying to import "+MeasurementFile); 
    695                         CsvReader reader = new CsvFileReader(MeasurementFile);  
    696                          
    697                         //cache for imported objects 
    698                         final List<Measurement> MeasurementList = new ArrayList<Measurement>(BATCH_SIZE); 
    699                          
    700                         //foreign key map for field 'Experiment' (Experiment.Name -> Experiment.Id)                      
    701                         final Map<String,Integer> ExperimentKeymap = new TreeMap<String,Integer>(); 
    702                         final IntegerWrapper total = new IntegerWrapper(0); 
    703                         reader.parse(new CsvReaderListener() 
    704                         { 
    705                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    706                                 { 
    707                                         //parse object 
    708                                         Measurement object = new Measurement(); 
    709                                         object.set(tuple, false); 
    710                                         object.set(defaults, false);  
    711                                         //only override values that have been set. 
    712                                         MeasurementList.add(object); 
    713                                          
    714                                         //foreign key 'Experiment' (Experiment.Name -> ?) 
    715                                         if(object.getExperimentLabel() != null) ExperimentKeymap.put(object.getExperimentLabel(), null);         
    716                                          
    717                                         //add in batches 
    718                                         if(MeasurementList.size() == BATCH_SIZE) 
    719                                         { 
    720                                                 //resolve foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    721                                                 List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    722                                                 for(Experiment xref :  ExperimentList) 
    723                                                 { 
    724                                                         ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    725                                                 } 
    726                                                  
    727                                                 //update objects with foreign keys 
    728                                                 for(Measurement o:  MeasurementList) 
    729                                                 { 
    730                                                         if(o.getExperimentLabel() != null)  
    731                                                         { 
    732                                                                 if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    733                                                                 o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    734                                                         } 
    735                                                 } 
    736                                                  
    737                                                  
    738                                                  
    739                                                 db.add(MeasurementList); 
    740                                                  
    741                                                 //clear for next batch                                           
    742                                                 MeasurementList.clear(); 
    743                                                 ExperimentKeymap.clear(); 
    744                                                  
    745                                                 //keep count 
    746                                                 total.set(total.get() + BATCH_SIZE);                             
    747                                         } 
    748                                 } 
    749                         });      
    750                         //resolve remaining foreign key 'Experiment' (Experiment.Name -> Experiment.Id) 
    751                         List<Experiment> ExperimentList = db.query(Experiment.class).in("Name",new ArrayList<Object>(ExperimentKeymap.keySet())).find(); 
    752                         for(Experiment xref :  ExperimentList) 
    753                         { 
    754                                 ExperimentKeymap.put(xref.getName().toString(), xref.getId()); 
    755                         } 
    756                          
    757                         //update remaining objects with foreign keys 
    758                         for(Measurement o:  MeasurementList) 
    759                         { 
    760                                 if(o.getExperimentLabel() != null)  
    761                                 { 
    762                                         if(ExperimentKeymap.get(o.getExperimentLabel()) == null) throw new Exception("Cannot find Experiment for Experiment_Name '"+o.getExperimentLabel()+"'"); 
    763                                         o.setExperiment(ExperimentKeymap.get(o.getExperimentLabel())); 
    764                                 } 
    765                         } 
    766                          
    767                          
    768                         db.add(MeasurementList); 
    769                          
    770                         //restore original batch size 
    771                         BATCH_SIZE = oldBatchSize; 
    772                          
    773                         //output count 
    774                         total.set(total.get() + MeasurementList.size()); 
    775                         logger.info("imported "+total.get()+" Measurement from "+MeasurementFile); 
    776                         return "Evaluated " + total.get() + " Measurement items."; 
    777                 } 
    778                 else{ 
    779                         return "File not found."; 
    780                 }         
    781         } 
    782         /** 
    783          * Imports Data from tab/comma delimited File. 
    784          * @param DataFile A tab delimited file with Data data. 
    785          */ 
    786         private static String importData(final Database db, File DataFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
    787                 return importData(db, DataFile, defaults, "default"); 
    788         } 
    789  
    790         /** 
    791          * Imports Data from tab/comma delimited File. 
    792          * @param DataFile A tab delimited file with Data data. 
    793          * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
    794          */ 
    795         private static String importData(final Database db, File DataFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
    796         { 
    797                 if(     DataFile.exists() ) 
    798                 { 
    799                         //adjust batch size for replace or delete, keep old batch size 
    800                         int oldBatchSize = -1; 
    801                         if (dupHandling.equals("default")) { 
    802                                 oldBatchSize = BATCH_SIZE; 
    803                         } else { 
    804                                 oldBatchSize = BATCH_SIZE; 
    805                                 BATCH_SIZE = SMALL_BATCH_SIZE; 
    806                         } 
    807                         logger.info("trying to import "+DataFile); 
    808                         CsvReader reader = new CsvFileReader(DataFile);  
    809                          
    810                         //cache for imported objects 
    811                         final List<Data> DataList = new ArrayList<Data>(BATCH_SIZE); 
    812                          
    813                         //foreign key map for field 'Measurement' (Measurement.Name -> Measurement.Id)                   
    814                         final Map<String,Integer> MeasurementKeymap = new TreeMap<String,Integer>(); 
    815                          
    816                         //foreign key map for field 'Sample' (Sample.Name -> Sample.Id)                  
    817                         final Map<String,Integer> SampleKeymap = new TreeMap<String,Integer>(); 
    818                          
    819                         //foreign key map for field 'Trait' (Trait.Name -> Trait.Id)                     
    820                         final Map<String,Integer> TraitKeymap = new TreeMap<String,Integer>(); 
    821                         final IntegerWrapper total = new IntegerWrapper(0); 
    822                         reader.parse(new CsvReaderListener() 
    823                         { 
    824                                 public void handleLine(int LineNo, Tuple tuple) throws Exception 
    825                                 { 
    826                                         //parse object 
    827                                         Data object = new Data(); 
    828                                         object.set(tuple, false); 
    829                                         object.set(defaults, false);  
    830                                         //only override values that have been set. 
    831                                         DataList.add(object); 
    832                                          
    833                                         //foreign key 'Measurement' (Measurement.Name -> ?) 
    834                                         if(object.getMeasurementLabel() != null) MeasurementKeymap.put(object.getMeasurementLabel(), null);      
    835                                          
    836                                         //foreign key 'Sample' (Sample.Name -> ?) 
    837                                         if(object.getSampleLabel() != null) SampleKeymap.put(object.getSampleLabel(), null);     
    838                                          
    839                                         //foreign key 'Trait' (Trait.Name -> ?) 
    840                                         if(object.getTraitLabel() != null) TraitKeymap.put(object.getTraitLabel(), null);        
    841                                          
    842                                         //add in batches 
    843                                         if(DataList.size() == BATCH_SIZE) 
    844                                         { 
    845                                                 //resolve foreign key 'Measurement' (Measurement.Name -> Measurement.Id) 
    846                                                 List<Measurement> MeasurementList = db.query(Measurement.class).in("Name",new ArrayList<Object>(MeasurementKeymap.keySet())).find(); 
    847                                                 for(Measurement xref :  MeasurementList) 
    848                                                 { 
    849                                                         MeasurementKeymap.put(xref.getName().toString(), xref.getId()); 
    850                                                 } 
    851                                                  
    852                                                 //resolve foreign key 'Sample' (Sample.Name -> Sample.Id) 
    853                                                 List<Sample> SampleList = db.query(Sample.class).in("Name",new ArrayList<Object>(SampleKeymap.keySet())).find(); 
    854                                                 for(Sample xref :  SampleList) 
    855                                                 { 
    856                                                         SampleKeymap.put(xref.getName().toString(), xref.getId()); 
    857                                                 } 
    858                                                  
    859                                                 //resolve foreign key 'Trait' (Trait.Name -> Trait.Id) 
    860                                                 List<Trait> TraitList = db.query(Trait.class).in("Name",new ArrayList<Object>(TraitKeymap.keySet())).find(); 
    861                                                 for(Trait xref :  TraitList) 
    862                                                 { 
    863                                                         TraitKeymap.put(xref.getName().toString(), xref.getId()); 
    864                                                 } 
    865                                                  
    866                                                 //update objects with foreign keys 
    867                                                 for(Data o:  DataList) 
    868                                                 { 
    869                                                         if(o.getMeasurementLabel() != null)  
    870                                                         { 
    871                                                                 if(MeasurementKeymap.get(o.getMeasurementLabel()) == null) throw new Exception("Cannot find Measurement for Measurement_Name '"+o.getMeasurementLabel()+"'"); 
    872                                                                 o.setMeasurement(MeasurementKeymap.get(o.getMeasurementLabel())); 
    873                                                         } 
    874                                                         if(o.getSampleLabel() != null)  
    875                                                         { 
    876                                                                 if(SampleKeymap.get(o.getSampleLabel()) == null) throw new Exception("Cannot find Sample for Sample_Name '"+o.getSampleLabel()+"'"); 
    877                                                                 o.setSample(SampleKeymap.get(o.getSampleLabel())); 
    878                                                         } 
    879                                                         if(o.getTraitLabel() != null)  
    880                                                         { 
    881                                                                 if(TraitKeymap.get(o.getTraitLabel()) == null) throw new Exception("Cannot find Trait for Trait_Name '"+o.getTraitLabel()+"'"); 
    882                                                                 o.setTrait(TraitKeymap.get(o.getTraitLabel())); 
    883                                                         } 
    884                                                 } 
    885                                                  
    886                                                  
    887                                                  
    888                                                 db.add(DataList); 
    889                                                  
    890                                                 //clear for next batch                                           
    891                                                 DataList.clear(); 
    892                                                 MeasurementKeymap.clear(); 
    893                                                 SampleKeymap.clear(); 
    894                                                 TraitKeymap.clear(); 
    895                                                  
    896                                                 //keep count 
    897                                                 total.set(total.get() + BATCH_SIZE);                             
    898                                         } 
    899                                 } 
    900                         });      
    901                         //resolve remaining foreign key 'Measurement' (Measurement.Name -> Measurement.Id) 
    902                         List<Measurement> MeasurementList = db.query(Measurement.class).in("Name",new ArrayList<Object>(MeasurementKeymap.keySet())).find(); 
    903                         for(Measurement xref :  MeasurementList) 
    904                         { 
    905                                 MeasurementKeymap.put(xref.getName().toString(), xref.getId()); 
    906                         } 
    907                          
    908                         //resolve remaining foreign key 'Sample' (Sample.Name -> Sample.Id) 
    909                         List<Sample> SampleList = db.query(Sample.class).in("Name",new ArrayList<Object>(SampleKeymap.keySet())).find(); 
    910                         for(Sample xref :  SampleList) 
    911                         { 
    912                                 SampleKeymap.put(xref.getName().toString(), xref.getId()); 
    913                         } 
    914                          
    915                         //resolve remaining foreign key 'Trait' (Trait.Name -> Trait.Id) 
    916                         List<Trait> TraitList = db.query(Trait.class).in("Name",new ArrayList<Object>(TraitKeymap.keySet())).find(); 
    917                         for(Trait xref :  TraitList) 
    918                         { 
    919                                 TraitKeymap.put(xref.getName().toString(), xref.getId()); 
    920                         } 
    921                          
    922                         //update remaining objects with foreign keys 
    923                         for(Data o:  DataList) 
    924                         { 
    925                                 if(o.getMeasurementLabel() != null)  
    926                                 { 
    927                                         if(MeasurementKeymap.get(o.getMeasurementLabel()) == null) throw new Exception("Cannot find Measurement for Measurement_Name '"+o.getMeasurementLabel()+"'"); 
    928                                         o.setMeasurement(MeasurementKeymap.get(o.getMeasurementLabel())); 
    929                                 } 
    930                                 if(o.getSampleLabel() != null)  
    931                                 { 
    932                                         if(SampleKeymap.get(o.getSampleLabel()) == null) throw new Exception("Cannot find Sample for Sample_Name '"+o.getSampleLabel()+"'"); 
    933                                         o.setSample(SampleKeymap.get(o.getSampleLabel())); 
    934                                 } 
    935                                 if(o.getTraitLabel() != null)  
    936                                 { 
    937                                         if(TraitKeymap.get(o.getTraitLabel()) == null) throw new Exception("Cannot find Trait for Trait_Name '"+o.getTraitLabel()+"'"); 
    938                                         o.setTrait(TraitKeymap.get(o.getTraitLabel())); 
    939                                 } 
    940                         } 
    941                          
    942                          
    943                         db.add(DataList); 
    944                          
    945                         //restore original batch size 
    946                         BATCH_SIZE = oldBatchSize; 
    947                          
    948                         //output count 
    949                         total.set(total.get() + DataList.size()); 
    950                         logger.info("imported "+total.get()+" Data from "+DataFile); 
    951                         return "Evaluated " + total.get() + " Data items."; 
    952                 } 
    953                 else{ 
    954                         return "File not found."; 
    955                 }         
    956512        } 
    957513        /** 
     
    16681224        } 
    16691225        /** 
     1226         * Imports Consequence from tab/comma delimited File. 
     1227         * @param ConsequenceFile A tab delimited file with Consequence data. 
     1228         */ 
     1229        private static String importConsequence(final Database db, File ConsequenceFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1230                return importConsequence(db, ConsequenceFile, defaults, "default"); 
     1231        } 
     1232 
     1233        /** 
     1234         * Imports Consequence from tab/comma delimited File. 
     1235         * @param ConsequenceFile A tab delimited file with Consequence data. 
     1236         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1237         */ 
     1238        private static String importConsequence(final Database db, File ConsequenceFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     1239        { 
     1240                if(     ConsequenceFile.exists() ) 
     1241                { 
     1242                        //adjust batch size for replace or delete, keep old batch size 
     1243                        int oldBatchSize = -1; 
     1244                        if (dupHandling.equals("default")) { 
     1245                                oldBatchSize = BATCH_SIZE; 
     1246                        } else { 
     1247                                oldBatchSize = BATCH_SIZE; 
     1248                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1249                        } 
     1250                        logger.info("trying to import "+ConsequenceFile); 
     1251                        CsvReader reader = new CsvFileReader(ConsequenceFile);  
     1252                         
     1253                        //cache for imported objects 
     1254                        final List<Consequence> ConsequenceList = new ArrayList<Consequence>(BATCH_SIZE); 
     1255                        final IntegerWrapper total = new IntegerWrapper(0); 
     1256                        reader.parse(new CsvReaderListener() 
     1257                        { 
     1258                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1259                                { 
     1260                                        //parse object 
     1261                                        Consequence object = new Consequence(); 
     1262                                        object.set(tuple, false); 
     1263                                        object.set(defaults, false);  
     1264                                        //only override values that have been set. 
     1265                                        ConsequenceList.add(object); 
     1266                                         
     1267                                        //add in batches 
     1268                                        if(ConsequenceList.size() == BATCH_SIZE) 
     1269                                        { 
     1270                                                 
     1271                                                 
     1272                                                db.add(ConsequenceList); 
     1273                                                 
     1274                                                //clear for next batch                                           
     1275                                                ConsequenceList.clear(); 
     1276                                                 
     1277                                                //keep count 
     1278                                                total.set(total.get() + BATCH_SIZE);                             
     1279                                        } 
     1280                                } 
     1281                        });      
     1282                         
     1283                        db.add(ConsequenceList); 
     1284                         
     1285                        //restore original batch size 
     1286                        BATCH_SIZE = oldBatchSize; 
     1287                         
     1288                        //output count 
     1289                        total.set(total.get() + ConsequenceList.size()); 
     1290                        logger.info("imported "+total.get()+" Consequence from "+ConsequenceFile); 
     1291                        return "Evaluated " + total.get() + " Consequence items."; 
     1292                } 
     1293                else{ 
     1294                        return "File not found."; 
     1295                }         
     1296        } 
     1297        /** 
     1298         * Imports Amino_acid from tab/comma delimited File. 
     1299         * @param Amino_acidFile A tab delimited file with Amino_acid data. 
     1300         */ 
     1301        private static String importAmino_acid(final Database db, File Amino_acidFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1302                return importAmino_acid(db, Amino_acidFile, defaults, "default"); 
     1303        } 
     1304 
     1305        /** 
     1306         * Imports Amino_acid from tab/comma delimited File. 
     1307         * @param Amino_acidFile A tab delimited file with Amino_acid data. 
     1308         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1309         */ 
     1310        private static String importAmino_acid(final Database db, File Amino_acidFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
     1311        { 
     1312                if(     Amino_acidFile.exists() ) 
     1313                { 
     1314                        //adjust batch size for replace or delete, keep old batch size 
     1315                        int oldBatchSize = -1; 
     1316                        if (dupHandling.equals("default")) { 
     1317                                oldBatchSize = BATCH_SIZE; 
     1318                        } else { 
     1319                                oldBatchSize = BATCH_SIZE; 
     1320                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1321                        } 
     1322                        logger.info("trying to import "+Amino_acidFile); 
     1323                        CsvReader reader = new CsvFileReader(Amino_acidFile);  
     1324                         
     1325                        //cache for imported objects 
     1326                        final List<Amino_acid> Amino_acidList = new ArrayList<Amino_acid>(BATCH_SIZE); 
     1327                        final IntegerWrapper total = new IntegerWrapper(0); 
     1328                        reader.parse(new CsvReaderListener() 
     1329                        { 
     1330                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1331                                { 
     1332                                        //parse object 
     1333                                        Amino_acid object = new Amino_acid(); 
     1334                                        object.set(tuple, false); 
     1335                                        object.set(defaults, false);  
     1336                                        //only override values that have been set. 
     1337                                        Amino_acidList.add(object); 
     1338                                         
     1339                                        //add in batches 
     1340                                        if(Amino_acidList.size() == BATCH_SIZE) 
     1341                                        { 
     1342                                                 
     1343                                                 
     1344                                                db.add(Amino_acidList); 
     1345                                                 
     1346                                                //clear for next batch                                           
     1347                                                Amino_acidList.clear(); 
     1348                                                 
     1349                                                //keep count 
     1350                                                total.set(total.get() + BATCH_SIZE);                             
     1351                                        } 
     1352                                } 
     1353                        });      
     1354                         
     1355                        db.add(Amino_acidList); 
     1356                         
     1357                        //restore original batch size 
     1358                        BATCH_SIZE = oldBatchSize; 
     1359                         
     1360                        //output count 
     1361                        total.set(total.get() + Amino_acidList.size()); 
     1362                        logger.info("imported "+total.get()+" Amino_acid from "+Amino_acidFile); 
     1363                        return "Evaluated " + total.get() + " Amino_acid items."; 
     1364                } 
     1365                else{ 
     1366                        return "File not found."; 
     1367                }         
     1368        } 
     1369        /** 
     1370         * Imports RNA from tab/comma delimited File. 
     1371         * @param RNAFile A tab delimited file with RNA data. 
     1372         */ 
     1373        private static String importRNA(final Database db, File RNAFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1374                return importRNA(db, RNAFile, defaults, "default"); 
     1375        } 
     1376 
     1377        /** 
     1378         * Imports RNA from tab/comma delimited File. 
     1379         * @param RNAFile A tab delimited file with RNA data. 
     1380         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1381         */ 
     1382        private static String importRNA(final Database db, File RNAFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     1383        { 
     1384                if(     RNAFile.exists() ) 
     1385                { 
     1386                        //adjust batch size for replace or delete, keep old batch size 
     1387                        int oldBatchSize = -1; 
     1388                        if (dupHandling.equals("default")) { 
     1389                                oldBatchSize = BATCH_SIZE; 
     1390                        } else { 
     1391                                oldBatchSize = BATCH_SIZE; 
     1392                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1393                        } 
     1394                        logger.info("trying to import "+RNAFile); 
     1395                        CsvReader reader = new CsvFileReader(RNAFile);  
     1396                         
     1397                        //cache for imported objects 
     1398                        final List<RNA> RNAList = new ArrayList<RNA>(BATCH_SIZE); 
     1399                         
     1400                        //foreign key map for field 'Codon' (Amino_acid.codon -> Amino_acid.id)                  
     1401                        final Map<String,Integer> CodonKeymap = new TreeMap<String,Integer>(); 
     1402                        final IntegerWrapper total = new IntegerWrapper(0); 
     1403                        reader.parse(new CsvReaderListener() 
     1404                        { 
     1405                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1406                                { 
     1407                                        //parse object 
     1408                                        RNA object = new RNA(); 
     1409                                        object.set(tuple, false); 
     1410                                        object.set(defaults, false);  
     1411                                        //only override values that have been set. 
     1412                                        RNAList.add(object); 
     1413                                         
     1414                                        //foreign key 'Codon' (Amino_acid.codon -> ?) 
     1415                                        if(object.getCodonLabel() != null) CodonKeymap.put(object.getCodonLabel(), null);        
     1416                                         
     1417                                        //add in batches 
     1418                                        if(RNAList.size() == BATCH_SIZE) 
     1419                                        { 
     1420                                                //resolve foreign key 'Codon' (Amino_acid.codon -> Amino_acid.id) 
     1421                                                List<Amino_acid> CodonList = db.query(Amino_acid.class).in("codon",new ArrayList<Object>(CodonKeymap.keySet())).find(); 
     1422                                                for(Amino_acid xref :  CodonList) 
     1423                                                { 
     1424                                                        CodonKeymap.put(xref.getCodon().toString(), xref.getId()); 
     1425                                                } 
     1426                                                 
     1427                                                //update objects with foreign keys 
     1428                                                for(RNA o:  RNAList) 
     1429                                                { 
     1430                                                        if(o.getCodonLabel() != null)  
     1431                                                        { 
     1432                                                                if(CodonKeymap.get(o.getCodonLabel()) == null) throw new Exception("Cannot find Amino_acid for Codon_codon '"+o.getCodonLabel()+"'"); 
     1433                                                                o.setCodon(CodonKeymap.get(o.getCodonLabel())); 
     1434                                                        } 
     1435                                                } 
     1436                                                 
     1437                                                 
     1438                                                 
     1439                                                db.add(RNAList); 
     1440                                                 
     1441                                                //clear for next batch                                           
     1442                                                RNAList.clear(); 
     1443                                                CodonKeymap.clear(); 
     1444                                                 
     1445                                                //keep count 
     1446                                                total.set(total.get() + BATCH_SIZE);                             
     1447                                        } 
     1448                                } 
     1449                        });      
     1450                        //resolve remaining foreign key 'Codon' (Amino_acid.codon -> Amino_acid.id) 
     1451                        List<Amino_acid> CodonList = db.query(Amino_acid.class).in("codon",new ArrayList<Object>(CodonKeymap.keySet())).find(); 
     1452                        for(Amino_acid xref :  CodonList) 
     1453                        { 
     1454                                CodonKeymap.put(xref.getCodon().toString(), xref.getId()); 
     1455                        } 
     1456                         
     1457                        //update remaining objects with foreign keys 
     1458                        for(RNA o:  RNAList) 
     1459                        { 
     1460                                if(o.getCodonLabel() != null)  
     1461                                { 
     1462                                        if(CodonKeymap.get(o.getCodonLabel()) == null) throw new Exception("Cannot find Amino_acid for Codon_codon '"+o.getCodonLabel()+"'"); 
     1463                                        o.setCodon(CodonKeymap.get(o.getCodonLabel())); 
     1464                                } 
     1465                        } 
     1466                         
     1467                         
     1468                        db.add(RNAList); 
     1469                         
     1470                        //restore original batch size 
     1471                        BATCH_SIZE = oldBatchSize; 
     1472                         
     1473                        //output count 
     1474                        total.set(total.get() + RNAList.size()); 
     1475                        logger.info("imported "+total.get()+" RNA from "+RNAFile); 
     1476                        return "Evaluated " + total.get() + " RNA items."; 
     1477                } 
     1478                else{ 
     1479                        return "File not found."; 
     1480                }         
     1481        } 
     1482        /** 
     1483         * Imports Mutations from tab/comma delimited File. 
     1484         * @param MutationsFile A tab delimited file with Mutations data. 
     1485         */ 
     1486        private static String importMutations(final Database db, File MutationsFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1487                return importMutations(db, MutationsFile, defaults, "default"); 
     1488        } 
     1489 
     1490        /** 
     1491         * Imports Mutations from tab/comma delimited File. 
     1492         * @param MutationsFile A tab delimited file with Mutations data. 
     1493         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1494         */ 
     1495        private static String importMutations(final Database db, File MutationsFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
     1496        { 
     1497                if(     MutationsFile.exists() ) 
     1498                { 
     1499                        //adjust batch size for replace or delete, keep old batch size 
     1500                        int oldBatchSize = -1; 
     1501                        if (dupHandling.equals("default")) { 
     1502                                oldBatchSize = BATCH_SIZE; 
     1503                        } else { 
     1504                                oldBatchSize = BATCH_SIZE; 
     1505                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1506                        } 
     1507                        logger.info("trying to import "+MutationsFile); 
     1508                        CsvReader reader = new CsvFileReader(MutationsFile);  
     1509                         
     1510                        //cache for imported objects 
     1511                        final List<Mutations> MutationsList = new ArrayList<Mutations>(BATCH_SIZE); 
     1512                         
     1513                        //foreign key map for field 'consequence' (Consequence.consequence -> Consequence.id)                    
     1514                        final Map<String,Integer> consequenceKeymap = new TreeMap<String,Integer>(); 
     1515                        final IntegerWrapper total = new IntegerWrapper(0); 
     1516                        reader.parse(new CsvReaderListener() 
     1517                        { 
     1518                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1519                                { 
     1520                                        //parse object 
     1521                                        Mutations object = new Mutations(); 
     1522                                        object.set(tuple, false); 
     1523                                        object.set(defaults, false);  
     1524                                        //only override values that have been set. 
     1525                                        MutationsList.add(object); 
     1526                                         
     1527                                        //foreign key 'consequence' (Consequence.consequence -> ?) 
     1528                                        if(object.getConsequenceLabel() != null) consequenceKeymap.put(object.getConsequenceLabel(), null);      
     1529                                         
     1530                                        //add in batches 
     1531                                        if(MutationsList.size() == BATCH_SIZE) 
     1532                                        { 
     1533                                                //resolve foreign key 'consequence' (Consequence.consequence -> Consequence.id) 
     1534                                                List<Consequence> consequenceList = db.query(Consequence.class).in("consequence",new ArrayList<Object>(consequenceKeymap.keySet())).find(); 
     1535                                                for(Consequence xref :  consequenceList) 
     1536                                                { 
     1537                                                        consequenceKeymap.put(xref.getConsequence().toString(), xref.getId()); 
     1538                                                } 
     1539                                                 
     1540                                                //update objects with foreign keys 
     1541                                                for(Mutations o:  MutationsList) 
     1542                                                { 
     1543                                                        if(o.getConsequenceLabel() != null)  
     1544                                                        { 
     1545                                                                if(consequenceKeymap.get(o.getConsequenceLabel()) == null) throw new Exception("Cannot find Consequence for consequence_consequence '"+o.getConsequenceLabel()+"'"); 
     1546                                                                o.setConsequence(consequenceKeymap.get(o.getConsequenceLabel())); 
     1547                                                        } 
     1548                                                } 
     1549                                                 
     1550                                                 
     1551                                                 
     1552                                                db.add(MutationsList); 
     1553                                                 
     1554                                                //clear for next batch                                           
     1555                                                MutationsList.clear(); 
     1556                                                consequenceKeymap.clear(); 
     1557                                                 
     1558                                                //keep count 
     1559                                                total.set(total.get() + BATCH_SIZE);                             
     1560                                        } 
     1561                                } 
     1562                        });      
     1563                        //resolve remaining foreign key 'consequence' (Consequence.consequence -> Consequence.id) 
     1564                        List<Consequence> consequenceList = db.query(Consequence.class).in("consequence",new ArrayList<Object>(consequenceKeymap.keySet())).find(); 
     1565                        for(Consequence xref :  consequenceList) 
     1566                        { 
     1567                                consequenceKeymap.put(xref.getConsequence().toString(), xref.getId()); 
     1568                        } 
     1569                         
     1570                        //update remaining objects with foreign keys 
     1571                        for(Mutations o:  MutationsList) 
     1572                        { 
     1573                                if(o.getConsequenceLabel() != null)  
     1574                                { 
     1575                                        if(consequenceKeymap.get(o.getConsequenceLabel()) == null) throw new Exception("Cannot find Consequence for consequence_consequence '"+o.getConsequenceLabel()+"'"); 
     1576                                        o.setConsequence(consequenceKeymap.get(o.getConsequenceLabel())); 
     1577                                } 
     1578                        } 
     1579                         
     1580                         
     1581                        db.add(MutationsList); 
     1582                         
     1583                        //restore original batch size 
     1584                        BATCH_SIZE = oldBatchSize; 
     1585                         
     1586                        //output count 
     1587                        total.set(total.get() + MutationsList.size()); 
     1588                        logger.info("imported "+total.get()+" Mutations from "+MutationsFile); 
     1589                        return "Evaluated " + total.get() + " Mutations items."; 
     1590                } 
     1591                else{ 
     1592                        return "File not found."; 
     1593                }         
     1594        } 
     1595        /** 
     1596         * Imports Contact from tab/comma delimited File. 
     1597         * @param ContactFile A tab delimited file with Contact data. 
     1598         */ 
     1599        private static String importContact(final Database db, File ContactFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1600                return importContact(db, ContactFile, defaults, "default"); 
     1601        } 
     1602 
     1603        /** 
     1604         * Imports Contact from tab/comma delimited File. 
     1605         * @param ContactFile A tab delimited file with Contact data. 
     1606         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1607         */ 
     1608        private static String importContact(final Database db, File ContactFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     1609        { 
     1610                if(     ContactFile.exists() ) 
     1611                { 
     1612                        //adjust batch size for replace or delete, keep old batch size 
     1613                        int oldBatchSize = -1; 
     1614                        if (dupHandling.equals("default")) { 
     1615                                oldBatchSize = BATCH_SIZE; 
     1616                        } else { 
     1617                                oldBatchSize = BATCH_SIZE; 
     1618                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1619                        } 
     1620                        logger.info("trying to import "+ContactFile); 
     1621                        CsvReader reader = new CsvFileReader(ContactFile);  
     1622                         
     1623                        //cache for imported objects 
     1624                        final List<Contact> ContactList = new ArrayList<Contact>(BATCH_SIZE); 
     1625                        final IntegerWrapper total = new IntegerWrapper(0); 
     1626                        reader.parse(new CsvReaderListener() 
     1627                        { 
     1628                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1629                                { 
     1630                                        //parse object 
     1631                                        Contact object = new Contact(); 
     1632                                        object.set(tuple, false); 
     1633                                        object.set(defaults, false);  
     1634                                        //only override values that have been set. 
     1635                                        ContactList.add(object); 
     1636                                         
     1637                                        //add in batches 
     1638                                        if(ContactList.size() == BATCH_SIZE) 
     1639                                        { 
     1640                                                 
     1641                                                 
     1642                                                //add or update or delete objects to database 
     1643                                                if (dupHandling.equals("default")) { 
     1644                                                        db.add(ContactList); 
     1645                                                } else if (dupHandling.equals("ignore")) { 
     1646                                                        try{ 
     1647                                                                db.add(ContactList); 
     1648                                                        }catch(DatabaseException exception){ 
     1649                                                                List<String> listOfContactNames = new ArrayList<String>(); 
     1650                                                                for (Contact e : ContactList) { 
     1651                                                                        listOfContactNames.add(e.getName()); 
     1652                                                                } 
     1653                                                                List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1654                                                                List<Contact> addContactList = new ArrayList<Contact>(); 
     1655                                                                for(Contact e1 : ContactList){ 
     1656                                                                        boolean found = false; 
     1657                                                                        for(Contact e2 : findContactList){ 
     1658                                                                                if(e1.getName().equals(e2.getName())){ 
     1659                                                                                        found = true; 
     1660                                                                                } 
     1661                                                                        } 
     1662                                                                        if(found==false) { 
     1663                                                                                addContactList.add(e1); 
     1664                                                                        } 
     1665                                                                } 
     1666                                                                db.add(addContactList); 
     1667                                                        } 
     1668                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     1669                                                        List<String> listOfContactNames = new ArrayList<String>(); 
     1670                                                        Map<String, Contact> ContactHash = new HashMap<String, Contact>(); 
     1671                                                        for (Contact e : ContactList) { 
     1672                                                                listOfContactNames.add(e.getName()); 
     1673                                                                ContactHash.put(e.getName(), e); 
     1674                                                        } 
     1675                                                        List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1676                                                        List<Contact> updateContactList = new ArrayList<Contact>(); 
     1677                                                        for (Contact e : findContactList) { 
     1678                                                                Contact newContact = ContactHash.get(e.getName()); 
     1679                                                                Tuple t = new SimpleTuple(); 
     1680                                                                for (String field : newContact.getFields()) { 
     1681                                                                        if (!field.equals("id")) { 
     1682                                                                                t.set(field, newContact.get(field)); 
     1683                                                                        } else { 
     1684                                                                                t.set(field, e.get(e.getIdField())); 
     1685                                                                        } 
     1686                                                                } 
     1687                                                                e.set(t); 
     1688                                                                updateContactList.add(e); 
     1689                                                        } 
     1690                                                        db.update(updateContactList); 
     1691                                                         
     1692                                                        if(dupHandling.equals("replaceAdd")){ 
     1693                                                                List<Contact> addContactList = new ArrayList<Contact>(); 
     1694                                                                for(Contact e1 : ContactList){ 
     1695                                                                        boolean found = false; 
     1696                                                                        for(Contact e2 : findContactList){ 
     1697                                                                                if(e1.getName().equals(e2.getName())){ 
     1698                                                                                        found = true; 
     1699                                                                                } 
     1700                                                                        } 
     1701                                                                        if(found==false) { 
     1702                                                                                addContactList.add(e1); 
     1703                                                                        } 
     1704                                                                } 
     1705                                                                db.add(addContactList); 
     1706                                                        } 
     1707                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     1708                                                        List<String> listOfContactNames = new ArrayList<String>(); 
     1709                                                        for (Contact e : ContactList) { 
     1710                                                                listOfContactNames.add(e.getName()); 
     1711                                                        } 
     1712                                                        List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1713                                                        db.remove(findContactList); 
     1714                                                         
     1715                                                        if(dupHandling.equals("deleteAdd")){ 
     1716                                                                List<Contact> addContactList = new ArrayList<Contact>(); 
     1717                                                                for(Contact e1 : ContactList){ 
     1718                                                                        boolean found = false; 
     1719                                                                        for(Contact e2 : findContactList){ 
     1720                                                                                if(e1.getName().equals(e2.getName())){ 
     1721                                                                                        found = true; 
     1722                                                                                } 
     1723                                                                        } 
     1724                                                                        if(found==false) { 
     1725                                                                                addContactList.add(e1); 
     1726                                                                        } 
     1727                                                                } 
     1728                                                                db.add(addContactList); 
     1729                                                        } 
     1730                                                } 
     1731                                                 
     1732                                                //clear for next batch                                           
     1733                                                ContactList.clear(); 
     1734                                                 
     1735                                                //keep count 
     1736                                                total.set(total.get() + BATCH_SIZE);                             
     1737                                        } 
     1738                                } 
     1739                        });      
     1740                         
     1741                        //add or update or delete remaining objects to database 
     1742                        if (dupHandling.equals("default")) { 
     1743                                db.add(ContactList); 
     1744                        } else if (dupHandling.equals("ignore")) { 
     1745                                try{ 
     1746                                        db.add(ContactList); 
     1747                                }catch(DatabaseException exception){ 
     1748                                        List<String> listOfContactNames = new ArrayList<String>(); 
     1749                                        for (Contact e : ContactList) { 
     1750                                                listOfContactNames.add(e.getName()); 
     1751                                        } 
     1752                                        List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1753                                        List<Contact> addContactList = new ArrayList<Contact>(); 
     1754                                        for(Contact e1 : ContactList){ 
     1755                                                boolean found = false; 
     1756                                                for(Contact e2 : findContactList){ 
     1757                                                        if(e1.getName().equals(e2.getName())){ 
     1758                                                                found = true; 
     1759                                                        } 
     1760                                                } 
     1761                                                if(found==false) { 
     1762                                                        addContactList.add(e1); 
     1763                                                } 
     1764                                        } 
     1765                                        db.add(addContactList); 
     1766                                } 
     1767                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     1768                                List<String> listOfContactNames = new ArrayList<String>(); 
     1769                                Map<String, Contact> ContactHash = new HashMap<String, Contact>(); 
     1770                                for (Contact e : ContactList) { 
     1771                                        listOfContactNames.add(e.getName()); 
     1772                                        ContactHash.put(e.getName(), e); 
     1773                                } 
     1774                                List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1775                                List<Contact> updateContactList = new ArrayList<Contact>(); 
     1776                                for (Contact e : findContactList) { 
     1777                                        Contact newContact = ContactHash.get(e.getName()); 
     1778                                        Tuple t = new SimpleTuple(); 
     1779                                        for (String field : newContact.getFields()) { 
     1780                                                if (!field.equals("id")) { 
     1781                                                        t.set(field, newContact.get(field)); 
     1782                                                } else { 
     1783                                                        t.set(field, e.get(e.getIdField())); 
     1784                                                } 
     1785                                        } 
     1786                                        e.set(t); 
     1787                                        updateContactList.add(e); 
     1788                                } 
     1789                                db.update(updateContactList); 
     1790                                 
     1791                                if(dupHandling.equals("replaceAdd")){ 
     1792                                        List<Contact> addContactList = new ArrayList<Contact>(); 
     1793                                        for(Contact e1 : ContactList){ 
     1794                                                boolean found = false; 
     1795                                                for(Contact e2 : findContactList){ 
     1796                                                        if(e1.getName().equals(e2.getName())){ 
     1797                                                                found = true; 
     1798                                                        } 
     1799                                                } 
     1800                                                if(found==false) { 
     1801                                                        addContactList.add(e1); 
     1802                                                } 
     1803                                        } 
     1804                                        db.add(addContactList); 
     1805                                } 
     1806                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     1807                                List<String> listOfContactNames = new ArrayList<String>(); 
     1808                                for (Contact e : ContactList) { 
     1809                                        listOfContactNames.add(e.getName()); 
     1810                                } 
     1811                                List<Contact> findContactList = db.find(Contact.class, new QueryRule("name", Operator.IN, listOfContactNames)); 
     1812                                db.remove(findContactList); 
     1813                                 
     1814                                if(dupHandling.equals("deleteAdd")){ 
     1815                                        List<Contact> addContactList = new ArrayList<Contact>(); 
     1816                                        for(Contact e1 : ContactList){ 
     1817                                                boolean found = false; 
     1818                                                for(Contact e2 : findContactList){ 
     1819                                                        if(e1.getName().equals(e2.getName())){ 
     1820                                                                found = true; 
     1821                                                        } 
     1822                                                } 
     1823                                                if(found==false) { 
     1824                                                        addContactList.add(e1); 
     1825                                                } 
     1826                                        } 
     1827                                        db.add(addContactList); 
     1828                                } 
     1829                        } 
     1830                         
     1831                        //restore original batch size 
     1832                        BATCH_SIZE = oldBatchSize; 
     1833                         
     1834                        //output count 
     1835                        total.set(total.get() + ContactList.size()); 
     1836                        logger.info("imported "+total.get()+" Contact from "+ContactFile); 
     1837                        return "Evaluated " + total.get() + " Contact items."; 
     1838                } 
     1839                else{ 
     1840                        return "File not found."; 
     1841                }         
     1842        } 
     1843        /** 
     1844         * Imports Gender from tab/comma delimited File. 
     1845         * @param GenderFile A tab delimited file with Gender data. 
     1846         */ 
     1847        private static String importGender(final Database db, File GenderFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     1848                return importGender(db, GenderFile, defaults, "default"); 
     1849        } 
     1850 
     1851        /** 
     1852         * Imports Gender from tab/comma delimited File. 
     1853         * @param GenderFile A tab delimited file with Gender data. 
     1854         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     1855         */ 
     1856        private static String importGender(final Database db, File GenderFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
     1857        { 
     1858                if(     GenderFile.exists() ) 
     1859                { 
     1860                        //adjust batch size for replace or delete, keep old batch size 
     1861                        int oldBatchSize = -1; 
     1862                        if (dupHandling.equals("default")) { 
     1863                                oldBatchSize = BATCH_SIZE; 
     1864                        } else { 
     1865                                oldBatchSize = BATCH_SIZE; 
     1866                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     1867                        } 
     1868                        logger.info("trying to import "+GenderFile); 
     1869                        CsvReader reader = new CsvFileReader(GenderFile);  
     1870                         
     1871                        //cache for imported objects 
     1872                        final List<Gender> GenderList = new ArrayList<Gender>(BATCH_SIZE); 
     1873                        final IntegerWrapper total = new IntegerWrapper(0); 
     1874                        reader.parse(new CsvReaderListener() 
     1875                        { 
     1876                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     1877                                { 
     1878                                        //parse object 
     1879                                        Gender object = new Gender(); 
     1880                                        object.set(tuple, false); 
     1881                                        object.set(defaults, false);  
     1882                                        //only override values that have been set. 
     1883                                        GenderList.add(object); 
     1884                                         
     1885                                        //add in batches 
     1886                                        if(GenderList.size() == BATCH_SIZE) 
     1887                                        { 
     1888                                                 
     1889                                                 
     1890                                                //add or update or delete objects to database 
     1891                                                if (dupHandling.equals("default")) { 
     1892                                                        db.add(GenderList); 
     1893                                                } else if (dupHandling.equals("ignore")) { 
     1894                                                        try{ 
     1895                                                                db.add(GenderList); 
     1896                                                        }catch(DatabaseException exception){ 
     1897                                                                List<String> listOfGenderNames = new ArrayList<String>(); 
     1898                                                                for (Gender e : GenderList) { 
     1899                                                                        listOfGenderNames.add(e.getName()); 
     1900                                                                } 
     1901                                                                List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     1902                                                                List<Gender> addGenderList = new ArrayList<Gender>(); 
     1903                                                                for(Gender e1 : GenderList){ 
     1904                                                                        boolean found = false; 
     1905                                                                        for(Gender e2 : findGenderList){ 
     1906                                                                                if(e1.getName().equals(e2.getName())){ 
     1907                                                                                        found = true; 
     1908                                                                                } 
     1909                                                                        } 
     1910                                                                        if(found==false) { 
     1911                                                                                addGenderList.add(e1); 
     1912                                                                        } 
     1913                                                                } 
     1914                                                                db.add(addGenderList); 
     1915                                                        } 
     1916                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     1917                                                        List<String> listOfGenderNames = new ArrayList<String>(); 
     1918                                                        Map<String, Gender> GenderHash = new HashMap<String, Gender>(); 
     1919                                                        for (Gender e : GenderList) { 
     1920                                                                listOfGenderNames.add(e.getName()); 
     1921                                                                GenderHash.put(e.getName(), e); 
     1922                                                        } 
     1923                                                        List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     1924                                                        List<Gender> updateGenderList = new ArrayList<Gender>(); 
     1925                                                        for (Gender e : findGenderList) { 
     1926                                                                Gender newGender = GenderHash.get(e.getName()); 
     1927                                                                Tuple t = new SimpleTuple(); 
     1928                                                                for (String field : newGender.getFields()) { 
     1929                                                                        if (!field.equals("id")) { 
     1930                                                                                t.set(field, newGender.get(field)); 
     1931                                                                        } else { 
     1932                                                                                t.set(field, e.get(e.getIdField())); 
     1933                                                                        } 
     1934                                                                } 
     1935                                                                e.set(t); 
     1936                                                                updateGenderList.add(e); 
     1937                                                        } 
     1938                                                        db.update(updateGenderList); 
     1939                                                         
     1940                                                        if(dupHandling.equals("replaceAdd")){ 
     1941                                                                List<Gender> addGenderList = new ArrayList<Gender>(); 
     1942                                                                for(Gender e1 : GenderList){ 
     1943                                                                        boolean found = false; 
     1944                                                                        for(Gender e2 : findGenderList){ 
     1945                                                                                if(e1.getName().equals(e2.getName())){ 
     1946                                                                                        found = true; 
     1947                                                                                } 
     1948                                                                        } 
     1949                                                                        if(found==false) { 
     1950                                                                                addGenderList.add(e1); 
     1951                                                                        } 
     1952                                                                } 
     1953                                                                db.add(addGenderList); 
     1954                                                        } 
     1955                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     1956                                                        List<String> listOfGenderNames = new ArrayList<String>(); 
     1957                                                        for (Gender e : GenderList) { 
     1958                                                                listOfGenderNames.add(e.getName()); 
     1959                                                        } 
     1960                                                        List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     1961                                                        db.remove(findGenderList); 
     1962                                                         
     1963                                                        if(dupHandling.equals("deleteAdd")){ 
     1964                                                                List<Gender> addGenderList = new ArrayList<Gender>(); 
     1965                                                                for(Gender e1 : GenderList){ 
     1966                                                                        boolean found = false; 
     1967                                                                        for(Gender e2 : findGenderList){ 
     1968                                                                                if(e1.getName().equals(e2.getName())){ 
     1969                                                                                        found = true; 
     1970                                                                                } 
     1971                                                                        } 
     1972                                                                        if(found==false) { 
     1973                                                                                addGenderList.add(e1); 
     1974                                                                        } 
     1975                                                                } 
     1976                                                                db.add(addGenderList); 
     1977                                                        } 
     1978                                                } 
     1979                                                 
     1980                                                //clear for next batch                                           
     1981                                                GenderList.clear(); 
     1982                                                 
     1983                                                //keep count 
     1984                                                total.set(total.get() + BATCH_SIZE);                             
     1985                                        } 
     1986                                } 
     1987                        });      
     1988                         
     1989                        //add or update or delete remaining objects to database 
     1990                        if (dupHandling.equals("default")) { 
     1991                                db.add(GenderList); 
     1992                        } else if (dupHandling.equals("ignore")) { 
     1993                                try{ 
     1994                                        db.add(GenderList); 
     1995                                }catch(DatabaseException exception){ 
     1996                                        List<String> listOfGenderNames = new ArrayList<String>(); 
     1997                                        for (Gender e : GenderList) { 
     1998                                                listOfGenderNames.add(e.getName()); 
     1999                                        } 
     2000                                        List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     2001                                        List<Gender> addGenderList = new ArrayList<Gender>(); 
     2002                                        for(Gender e1 : GenderList){ 
     2003                                                boolean found = false; 
     2004                                                for(Gender e2 : findGenderList){ 
     2005                                                        if(e1.getName().equals(e2.getName())){ 
     2006                                                                found = true; 
     2007                                                        } 
     2008                                                } 
     2009                                                if(found==false) { 
     2010                                                        addGenderList.add(e1); 
     2011                                                } 
     2012                                        } 
     2013                                        db.add(addGenderList); 
     2014                                } 
     2015                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     2016                                List<String> listOfGenderNames = new ArrayList<String>(); 
     2017                                Map<String, Gender> GenderHash = new HashMap<String, Gender>(); 
     2018                                for (Gender e : GenderList) { 
     2019                                        listOfGenderNames.add(e.getName()); 
     2020                                        GenderHash.put(e.getName(), e); 
     2021                                } 
     2022                                List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     2023                                List<Gender> updateGenderList = new ArrayList<Gender>(); 
     2024                                for (Gender e : findGenderList) { 
     2025                                        Gender newGender = GenderHash.get(e.getName()); 
     2026                                        Tuple t = new SimpleTuple(); 
     2027                                        for (String field : newGender.getFields()) { 
     2028                                                if (!field.equals("id")) { 
     2029                                                        t.set(field, newGender.get(field)); 
     2030                                                } else { 
     2031                                                        t.set(field, e.get(e.getIdField())); 
     2032                                                } 
     2033                                        } 
     2034                                        e.set(t); 
     2035                                        updateGenderList.add(e); 
     2036                                } 
     2037                                db.update(updateGenderList); 
     2038                                 
     2039                                if(dupHandling.equals("replaceAdd")){ 
     2040                                        List<Gender> addGenderList = new ArrayList<Gender>(); 
     2041                                        for(Gender e1 : GenderList){ 
     2042                                                boolean found = false; 
     2043                                                for(Gender e2 : findGenderList){ 
     2044                                                        if(e1.getName().equals(e2.getName())){ 
     2045                                                                found = true; 
     2046                                                        } 
     2047                                                } 
     2048                                                if(found==false) { 
     2049                                                        addGenderList.add(e1); 
     2050                                                } 
     2051                                        } 
     2052                                        db.add(addGenderList); 
     2053                                } 
     2054                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     2055                                List<String> listOfGenderNames = new ArrayList<String>(); 
     2056                                for (Gender e : GenderList) { 
     2057                                        listOfGenderNames.add(e.getName()); 
     2058                                } 
     2059                                List<Gender> findGenderList = db.find(Gender.class, new QueryRule("name", Operator.IN, listOfGenderNames)); 
     2060                                db.remove(findGenderList); 
     2061                                 
     2062                                if(dupHandling.equals("deleteAdd")){ 
     2063                                        List<Gender> addGenderList = new ArrayList<Gender>(); 
     2064                                        for(Gender e1 : GenderList){ 
     2065                                                boolean found = false; 
     2066                                                for(Gender e2 : findGenderList){ 
     2067                                                        if(e1.getName().equals(e2.getName())){ 
     2068                                                                found = true; 
     2069                                                        } 
     2070                                                } 
     2071                                                if(found==false) { 
     2072                                                        addGenderList.add(e1); 
     2073                                                } 
     2074                                        } 
     2075                                        db.add(addGenderList); 
     2076                                } 
     2077                        } 
     2078                         
     2079                        //restore original batch size 
     2080                        BATCH_SIZE = oldBatchSize; 
     2081                         
     2082                        //output count 
     2083                        total.set(total.get() + GenderList.size()); 
     2084                        logger.info("imported "+total.get()+" Gender from "+GenderFile); 
     2085                        return "Evaluated " + total.get() + " Gender items."; 
     2086                } 
     2087                else{ 
     2088                        return "File not found."; 
     2089                }         
     2090        } 
     2091        /** 
     2092         * Imports Patient from tab/comma delimited File. 
     2093         * @param PatientFile A tab delimited file with Patient data. 
     2094         */ 
     2095        private static String importPatient(final Database db, File PatientFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2096                return importPatient(db, PatientFile, defaults, "default"); 
     2097        } 
     2098 
     2099        /** 
     2100         * Imports Patient from tab/comma delimited File. 
     2101         * @param PatientFile A tab delimited file with Patient data. 
     2102         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2103         */ 
     2104        private static String importPatient(final Database db, File PatientFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     2105        { 
     2106                if(     PatientFile.exists() ) 
     2107                { 
     2108                        //adjust batch size for replace or delete, keep old batch size 
     2109                        int oldBatchSize = -1; 
     2110                        if (dupHandling.equals("default")) { 
     2111                                oldBatchSize = BATCH_SIZE; 
     2112                        } else { 
     2113                                oldBatchSize = BATCH_SIZE; 
     2114                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2115                        } 
     2116                        logger.info("trying to import "+PatientFile); 
     2117                        CsvReader reader = new CsvFileReader(PatientFile);  
     2118                         
     2119                        //cache for imported objects 
     2120                        final List<Patient> PatientList = new ArrayList<Patient>(BATCH_SIZE); 
     2121                         
     2122                        //foreign key map for field 'gender' (Gender.name -> Gender.id)                  
     2123                        final Map<String,Integer> genderKeymap = new TreeMap<String,Integer>(); 
     2124                         
     2125                        //foreign key map for field 'id_mutation1' (Mutations.nucleotide_change -> Mutations.id)                         
     2126                        final Map<String,Integer> id_mutation1Keymap = new TreeMap<String,Integer>(); 
     2127                         
     2128                        //foreign key map for field 'id_mutation2' (Mutations.nucleotide_change -> Mutations.id)                         
     2129                        final Map<String,Integer> id_mutation2Keymap = new TreeMap<String,Integer>(); 
     2130                        final IntegerWrapper total = new IntegerWrapper(0); 
     2131                        reader.parse(new CsvReaderListener() 
     2132                        { 
     2133                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2134                                { 
     2135                                        //parse object 
     2136                                        Patient object = new Patient(); 
     2137                                        object.set(tuple, false); 
     2138                                        object.set(defaults, false);  
     2139                                        //only override values that have been set. 
     2140                                        PatientList.add(object); 
     2141                                         
     2142                                        //foreign key 'gender' (Gender.name -> ?) 
     2143                                        if(object.getGenderLabel() != null) genderKeymap.put(object.getGenderLabel(), null);     
     2144                                         
     2145                                        //foreign key 'id_mutation1' (Mutations.nucleotide_change -> ?) 
     2146                                        if(object.getId_mutation1Label() != null) id_mutation1Keymap.put(object.getId_mutation1Label(), null);   
     2147                                         
     2148                                        //foreign key 'id_mutation2' (Mutations.nucleotide_change -> ?) 
     2149                                        if(object.getId_mutation2Label() != null) id_mutation2Keymap.put(object.getId_mutation2Label(), null);   
     2150                                         
     2151                                        //add in batches 
     2152                                        if(PatientList.size() == BATCH_SIZE) 
     2153                                        { 
     2154                                                //resolve foreign key 'gender' (Gender.name -> Gender.id) 
     2155                                                List<Gender> genderList = db.query(Gender.class).in("name",new ArrayList<Object>(genderKeymap.keySet())).find(); 
     2156                                                for(Gender xref :  genderList) 
     2157                                                { 
     2158                                                        genderKeymap.put(xref.getName().toString(), xref.getId()); 
     2159                                                } 
     2160                                                 
     2161                                                //resolve foreign key 'id_mutation1' (Mutations.nucleotide_change -> Mutations.id) 
     2162                                                List<Mutations> id_mutation1List = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(id_mutation1Keymap.keySet())).find(); 
     2163                                                for(Mutations xref :  id_mutation1List) 
     2164                                                { 
     2165                                                        id_mutation1Keymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2166                                                } 
     2167                                                 
     2168                                                //resolve foreign key 'id_mutation2' (Mutations.nucleotide_change -> Mutations.id) 
     2169                                                List<Mutations> id_mutation2List = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(id_mutation2Keymap.keySet())).find(); 
     2170                                                for(Mutations xref :  id_mutation2List) 
     2171                                                { 
     2172                                                        id_mutation2Keymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2173                                                } 
     2174                                                 
     2175                                                //update objects with foreign keys 
     2176                                                for(Patient o:  PatientList) 
     2177                                                { 
     2178                                                        if(o.getGenderLabel() != null)  
     2179                                                        { 
     2180                                                                if(genderKeymap.get(o.getGenderLabel()) == null) throw new Exception("Cannot find Gender for gender_name '"+o.getGenderLabel()+"'"); 
     2181                                                                o.setGender(genderKeymap.get(o.getGenderLabel())); 
     2182                                                        } 
     2183                                                        if(o.getId_mutation1Label() != null)  
     2184                                                        { 
     2185                                                                if(id_mutation1Keymap.get(o.getId_mutation1Label()) == null) throw new Exception("Cannot find Mutations for id_mutation1_nucleotide_change '"+o.getId_mutation1Label()+"'"); 
     2186                                                                o.setId_mutation1(id_mutation1Keymap.get(o.getId_mutation1Label())); 
     2187                                                        } 
     2188                                                        if(o.getId_mutation2Label() != null)  
     2189                                                        { 
     2190                                                                if(id_mutation2Keymap.get(o.getId_mutation2Label()) == null) throw new Exception("Cannot find Mutations for id_mutation2_nucleotide_change '"+o.getId_mutation2Label()+"'"); 
     2191                                                                o.setId_mutation2(id_mutation2Keymap.get(o.getId_mutation2Label())); 
     2192                                                        } 
     2193                                                } 
     2194                                                 
     2195                                                 
     2196                                                 
     2197                                                //add or update or delete objects to database 
     2198                                                if (dupHandling.equals("default")) { 
     2199                                                        db.add(PatientList); 
     2200                                                } else if (dupHandling.equals("ignore")) { 
     2201                                                        try{ 
     2202                                                                db.add(PatientList); 
     2203                                                        }catch(DatabaseException exception){ 
     2204                                                                List<String> listOfPatientNames = new ArrayList<String>(); 
     2205                                                                for (Patient e : PatientList) { 
     2206                                                                        listOfPatientNames.add(e.getName()); 
     2207                                                                } 
     2208                                                                List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2209                                                                List<Patient> addPatientList = new ArrayList<Patient>(); 
     2210                                                                for(Patient e1 : PatientList){ 
     2211                                                                        boolean found = false; 
     2212                                                                        for(Patient e2 : findPatientList){ 
     2213                                                                                if(e1.getName().equals(e2.getName())){ 
     2214                                                                                        found = true; 
     2215                                                                                } 
     2216                                                                        } 
     2217                                                                        if(found==false) { 
     2218                                                                                addPatientList.add(e1); 
     2219                                                                        } 
     2220                                                                } 
     2221                                                                db.add(addPatientList); 
     2222                                                        } 
     2223                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     2224                                                        List<String> listOfPatientNames = new ArrayList<String>(); 
     2225                                                        Map<String, Patient> PatientHash = new HashMap<String, Patient>(); 
     2226                                                        for (Patient e : PatientList) { 
     2227                                                                listOfPatientNames.add(e.getName()); 
     2228                                                                PatientHash.put(e.getName(), e); 
     2229                                                        } 
     2230                                                        List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2231                                                        List<Patient> updatePatientList = new ArrayList<Patient>(); 
     2232                                                        for (Patient e : findPatientList) { 
     2233                                                                Patient newPatient = PatientHash.get(e.getName()); 
     2234                                                                Tuple t = new SimpleTuple(); 
     2235                                                                for (String field : newPatient.getFields()) { 
     2236                                                                        if (!field.equals("id")) { 
     2237                                                                                t.set(field, newPatient.get(field)); 
     2238                                                                        } else { 
     2239                                                                                t.set(field, e.get(e.getIdField())); 
     2240                                                                        } 
     2241                                                                } 
     2242                                                                e.set(t); 
     2243                                                                updatePatientList.add(e); 
     2244                                                        } 
     2245                                                        db.update(updatePatientList); 
     2246                                                         
     2247                                                        if(dupHandling.equals("replaceAdd")){ 
     2248                                                                List<Patient> addPatientList = new ArrayList<Patient>(); 
     2249                                                                for(Patient e1 : PatientList){ 
     2250                                                                        boolean found = false; 
     2251                                                                        for(Patient e2 : findPatientList){ 
     2252                                                                                if(e1.getName().equals(e2.getName())){ 
     2253                                                                                        found = true; 
     2254                                                                                } 
     2255                                                                        } 
     2256                                                                        if(found==false) { 
     2257                                                                                addPatientList.add(e1); 
     2258                                                                        } 
     2259                                                                } 
     2260                                                                db.add(addPatientList); 
     2261                                                        } 
     2262                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     2263                                                        List<String> listOfPatientNames = new ArrayList<String>(); 
     2264                                                        for (Patient e : PatientList) { 
     2265                                                                listOfPatientNames.add(e.getName()); 
     2266                                                        } 
     2267                                                        List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2268                                                        db.remove(findPatientList); 
     2269                                                         
     2270                                                        if(dupHandling.equals("deleteAdd")){ 
     2271                                                                List<Patient> addPatientList = new ArrayList<Patient>(); 
     2272                                                                for(Patient e1 : PatientList){ 
     2273                                                                        boolean found = false; 
     2274                                                                        for(Patient e2 : findPatientList){ 
     2275                                                                                if(e1.getName().equals(e2.getName())){ 
     2276                                                                                        found = true; 
     2277                                                                                } 
     2278                                                                        } 
     2279                                                                        if(found==false) { 
     2280                                                                                addPatientList.add(e1); 
     2281                                                                        } 
     2282                                                                } 
     2283                                                                db.add(addPatientList); 
     2284                                                        } 
     2285                                                } 
     2286                                                 
     2287                                                //clear for next batch                                           
     2288                                                PatientList.clear(); 
     2289                                                genderKeymap.clear(); 
     2290                                                id_mutation1Keymap.clear(); 
     2291                                                id_mutation2Keymap.clear(); 
     2292                                                 
     2293                                                //keep count 
     2294                                                total.set(total.get() + BATCH_SIZE);                             
     2295                                        } 
     2296                                } 
     2297                        });      
     2298                        //resolve remaining foreign key 'gender' (Gender.name -> Gender.id) 
     2299                        List<Gender> genderList = db.query(Gender.class).in("name",new ArrayList<Object>(genderKeymap.keySet())).find(); 
     2300                        for(Gender xref :  genderList) 
     2301                        { 
     2302                                genderKeymap.put(xref.getName().toString(), xref.getId()); 
     2303                        } 
     2304                         
     2305                        //resolve remaining foreign key 'id_mutation1' (Mutations.nucleotide_change -> Mutations.id) 
     2306                        List<Mutations> id_mutation1List = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(id_mutation1Keymap.keySet())).find(); 
     2307                        for(Mutations xref :  id_mutation1List) 
     2308                        { 
     2309                                id_mutation1Keymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2310                        } 
     2311                         
     2312                        //resolve remaining foreign key 'id_mutation2' (Mutations.nucleotide_change -> Mutations.id) 
     2313                        List<Mutations> id_mutation2List = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(id_mutation2Keymap.keySet())).find(); 
     2314                        for(Mutations xref :  id_mutation2List) 
     2315                        { 
     2316                                id_mutation2Keymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2317                        } 
     2318                         
     2319                        //update remaining objects with foreign keys 
     2320                        for(Patient o:  PatientList) 
     2321                        { 
     2322                                if(o.getGenderLabel() != null)  
     2323                                { 
     2324                                        if(genderKeymap.get(o.getGenderLabel()) == null) throw new Exception("Cannot find Gender for gender_name '"+o.getGenderLabel()+"'"); 
     2325                                        o.setGender(genderKeymap.get(o.getGenderLabel())); 
     2326                                } 
     2327                                if(o.getId_mutation1Label() != null)  
     2328                                { 
     2329                                        if(id_mutation1Keymap.get(o.getId_mutation1Label()) == null) throw new Exception("Cannot find Mutations for id_mutation1_nucleotide_change '"+o.getId_mutation1Label()+"'"); 
     2330                                        o.setId_mutation1(id_mutation1Keymap.get(o.getId_mutation1Label())); 
     2331                                } 
     2332                                if(o.getId_mutation2Label() != null)  
     2333                                { 
     2334                                        if(id_mutation2Keymap.get(o.getId_mutation2Label()) == null) throw new Exception("Cannot find Mutations for id_mutation2_nucleotide_change '"+o.getId_mutation2Label()+"'"); 
     2335                                        o.setId_mutation2(id_mutation2Keymap.get(o.getId_mutation2Label())); 
     2336                                } 
     2337                        } 
     2338                         
     2339                         
     2340                        //add or update or delete remaining objects to database 
     2341                        if (dupHandling.equals("default")) { 
     2342                                db.add(PatientList); 
     2343                        } else if (dupHandling.equals("ignore")) { 
     2344                                try{ 
     2345                                        db.add(PatientList); 
     2346                                }catch(DatabaseException exception){ 
     2347                                        List<String> listOfPatientNames = new ArrayList<String>(); 
     2348                                        for (Patient e : PatientList) { 
     2349                                                listOfPatientNames.add(e.getName()); 
     2350                                        } 
     2351                                        List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2352                                        List<Patient> addPatientList = new ArrayList<Patient>(); 
     2353                                        for(Patient e1 : PatientList){ 
     2354                                                boolean found = false; 
     2355                                                for(Patient e2 : findPatientList){ 
     2356                                                        if(e1.getName().equals(e2.getName())){ 
     2357                                                                found = true; 
     2358                                                        } 
     2359                                                } 
     2360                                                if(found==false) { 
     2361                                                        addPatientList.add(e1); 
     2362                                                } 
     2363                                        } 
     2364                                        db.add(addPatientList); 
     2365                                } 
     2366                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     2367                                List<String> listOfPatientNames = new ArrayList<String>(); 
     2368                                Map<String, Patient> PatientHash = new HashMap<String, Patient>(); 
     2369                                for (Patient e : PatientList) { 
     2370                                        listOfPatientNames.add(e.getName()); 
     2371                                        PatientHash.put(e.getName(), e); 
     2372                                } 
     2373                                List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2374                                List<Patient> updatePatientList = new ArrayList<Patient>(); 
     2375                                for (Patient e : findPatientList) { 
     2376                                        Patient newPatient = PatientHash.get(e.getName()); 
     2377                                        Tuple t = new SimpleTuple(); 
     2378                                        for (String field : newPatient.getFields()) { 
     2379                                                if (!field.equals("id")) { 
     2380                                                        t.set(field, newPatient.get(field)); 
     2381                                                } else { 
     2382                                                        t.set(field, e.get(e.getIdField())); 
     2383                                                } 
     2384                                        } 
     2385                                        e.set(t); 
     2386                                        updatePatientList.add(e); 
     2387                                } 
     2388                                db.update(updatePatientList); 
     2389                                 
     2390                                if(dupHandling.equals("replaceAdd")){ 
     2391                                        List<Patient> addPatientList = new ArrayList<Patient>(); 
     2392                                        for(Patient e1 : PatientList){ 
     2393                                                boolean found = false; 
     2394                                                for(Patient e2 : findPatientList){ 
     2395                                                        if(e1.getName().equals(e2.getName())){ 
     2396                                                                found = true; 
     2397                                                        } 
     2398                                                } 
     2399                                                if(found==false) { 
     2400                                                        addPatientList.add(e1); 
     2401                                                } 
     2402                                        } 
     2403                                        db.add(addPatientList); 
     2404                                } 
     2405                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     2406                                List<String> listOfPatientNames = new ArrayList<String>(); 
     2407                                for (Patient e : PatientList) { 
     2408                                        listOfPatientNames.add(e.getName()); 
     2409                                } 
     2410                                List<Patient> findPatientList = db.find(Patient.class, new QueryRule("name", Operator.IN, listOfPatientNames)); 
     2411                                db.remove(findPatientList); 
     2412                                 
     2413                                if(dupHandling.equals("deleteAdd")){ 
     2414                                        List<Patient> addPatientList = new ArrayList<Patient>(); 
     2415                                        for(Patient e1 : PatientList){ 
     2416                                                boolean found = false; 
     2417                                                for(Patient e2 : findPatientList){ 
     2418                                                        if(e1.getName().equals(e2.getName())){ 
     2419                                                                found = true; 
     2420                                                        } 
     2421                                                } 
     2422                                                if(found==false) { 
     2423                                                        addPatientList.add(e1); 
     2424                                                } 
     2425                                        } 
     2426                                        db.add(addPatientList); 
     2427                                } 
     2428                        } 
     2429                         
     2430                        //restore original batch size 
     2431                        BATCH_SIZE = oldBatchSize; 
     2432                         
     2433                        //output count 
     2434                        total.set(total.get() + PatientList.size()); 
     2435                        logger.info("imported "+total.get()+" Patient from "+PatientFile); 
     2436                        return "Evaluated " + total.get() + " Patient items."; 
     2437                } 
     2438                else{ 
     2439                        return "File not found."; 
     2440                }         
     2441        } 
     2442        /** 
     2443         * Imports Phenotype from tab/comma delimited File. 
     2444         * @param PhenotypeFile A tab delimited file with Phenotype data. 
     2445         */ 
     2446        private static String importPhenotype(final Database db, File PhenotypeFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2447                return importPhenotype(db, PhenotypeFile, defaults, "default"); 
     2448        } 
     2449 
     2450        /** 
     2451         * Imports Phenotype from tab/comma delimited File. 
     2452         * @param PhenotypeFile A tab delimited file with Phenotype data. 
     2453         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2454         */ 
     2455        private static String importPhenotype(final Database db, File PhenotypeFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
     2456        { 
     2457                if(     PhenotypeFile.exists() ) 
     2458                { 
     2459                        //adjust batch size for replace or delete, keep old batch size 
     2460                        int oldBatchSize = -1; 
     2461                        if (dupHandling.equals("default")) { 
     2462                                oldBatchSize = BATCH_SIZE; 
     2463                        } else { 
     2464                                oldBatchSize = BATCH_SIZE; 
     2465                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2466                        } 
     2467                        logger.info("trying to import "+PhenotypeFile); 
     2468                        CsvReader reader = new CsvFileReader(PhenotypeFile);  
     2469                         
     2470                        //cache for imported objects 
     2471                        final List<Phenotype> PhenotypeList = new ArrayList<Phenotype>(BATCH_SIZE); 
     2472                        final IntegerWrapper total = new IntegerWrapper(0); 
     2473                        reader.parse(new CsvReaderListener() 
     2474                        { 
     2475                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2476                                { 
     2477                                        //parse object 
     2478                                        Phenotype object = new Phenotype(); 
     2479                                        object.set(tuple, false); 
     2480                                        object.set(defaults, false);  
     2481                                        //only override values that have been set. 
     2482                                        PhenotypeList.add(object); 
     2483                                         
     2484                                        //add in batches 
     2485                                        if(PhenotypeList.size() == BATCH_SIZE) 
     2486                                        { 
     2487                                                 
     2488                                                 
     2489                                                db.add(PhenotypeList); 
     2490                                                 
     2491                                                //clear for next batch                                           
     2492                                                PhenotypeList.clear(); 
     2493                                                 
     2494                                                //keep count 
     2495                                                total.set(total.get() + BATCH_SIZE);                             
     2496                                        } 
     2497                                } 
     2498                        });      
     2499                         
     2500                        db.add(PhenotypeList); 
     2501                         
     2502                        //restore original batch size 
     2503                        BATCH_SIZE = oldBatchSize; 
     2504                         
     2505                        //output count 
     2506                        total.set(total.get() + PhenotypeList.size()); 
     2507                        logger.info("imported "+total.get()+" Phenotype from "+PhenotypeFile); 
     2508                        return "Evaluated " + total.get() + " Phenotype items."; 
     2509                } 
     2510                else{ 
     2511                        return "File not found."; 
     2512                }         
     2513        } 
     2514        /** 
     2515         * Imports Diagnosis from tab/comma delimited File. 
     2516         * @param DiagnosisFile A tab delimited file with Diagnosis data. 
     2517         */ 
     2518        private static String importDiagnosis(final Database db, File DiagnosisFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2519                return importDiagnosis(db, DiagnosisFile, defaults, "default"); 
     2520        } 
     2521 
     2522        /** 
     2523         * Imports Diagnosis from tab/comma delimited File. 
     2524         * @param DiagnosisFile A tab delimited file with Diagnosis data. 
     2525         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2526         */ 
     2527        private static String importDiagnosis(final Database db, File DiagnosisFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
     2528        { 
     2529                if(     DiagnosisFile.exists() ) 
     2530                { 
     2531                        //adjust batch size for replace or delete, keep old batch size 
     2532                        int oldBatchSize = -1; 
     2533                        if (dupHandling.equals("default")) { 
     2534                                oldBatchSize = BATCH_SIZE; 
     2535                        } else { 
     2536                                oldBatchSize = BATCH_SIZE; 
     2537                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2538                        } 
     2539                        logger.info("trying to import "+DiagnosisFile); 
     2540                        CsvReader reader = new CsvFileReader(DiagnosisFile);  
     2541                         
     2542                        //cache for imported objects 
     2543                        final List<Diagnosis> DiagnosisList = new ArrayList<Diagnosis>(BATCH_SIZE); 
     2544                         
     2545                        //foreign key map for field 'id_phenotype' (Phenotype.Description -> Phenotype.id)                       
     2546                        final Map<String,Integer> id_phenotypeKeymap = new TreeMap<String,Integer>(); 
     2547                         
     2548                        //foreign key map for field 'id_patient' (Patient.name -> Patient.id)                    
     2549                        final Map<String,Integer> id_patientKeymap = new TreeMap<String,Integer>(); 
     2550                        final IntegerWrapper total = new IntegerWrapper(0); 
     2551                        reader.parse(new CsvReaderListener() 
     2552                        { 
     2553                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2554                                { 
     2555                                        //parse object 
     2556                                        Diagnosis object = new Diagnosis(); 
     2557                                        object.set(tuple, false); 
     2558                                        object.set(defaults, false);  
     2559                                        //only override values that have been set. 
     2560                                        DiagnosisList.add(object); 
     2561                                         
     2562                                        //foreign key 'id_phenotype' (Phenotype.Description -> ?) 
     2563                                        if(object.getId_phenotypeLabel() != null) id_phenotypeKeymap.put(object.getId_phenotypeLabel(), null);   
     2564                                         
     2565                                        //foreign key 'id_patient' (Patient.name -> ?) 
     2566                                        if(object.getId_patientLabel() != null) id_patientKeymap.put(object.getId_patientLabel(), null);         
     2567                                         
     2568                                        //add in batches 
     2569                                        if(DiagnosisList.size() == BATCH_SIZE) 
     2570                                        { 
     2571                                                //resolve foreign key 'id_phenotype' (Phenotype.Description -> Phenotype.id) 
     2572                                                List<Phenotype> id_phenotypeList = db.query(Phenotype.class).in("Description",new ArrayList<Object>(id_phenotypeKeymap.keySet())).find(); 
     2573                                                for(Phenotype xref :  id_phenotypeList) 
     2574                                                { 
     2575                                                        id_phenotypeKeymap.put(xref.getDescription().toString(), xref.getId()); 
     2576                                                } 
     2577                                                 
     2578                                                //resolve foreign key 'id_patient' (Patient.name -> Patient.id) 
     2579                                                List<Patient> id_patientList = db.query(Patient.class).in("name",new ArrayList<Object>(id_patientKeymap.keySet())).find(); 
     2580                                                for(Patient xref :  id_patientList) 
     2581                                                { 
     2582                                                        id_patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2583                                                } 
     2584                                                 
     2585                                                //update objects with foreign keys 
     2586                                                for(Diagnosis o:  DiagnosisList) 
     2587                                                { 
     2588                                                        if(o.getId_phenotypeLabel() != null)  
     2589                                                        { 
     2590                                                                if(id_phenotypeKeymap.get(o.getId_phenotypeLabel()) == null) throw new Exception("Cannot find Phenotype for id_phenotype_Description '"+o.getId_phenotypeLabel()+"'"); 
     2591                                                                o.setId_phenotype(id_phenotypeKeymap.get(o.getId_phenotypeLabel())); 
     2592                                                        } 
     2593                                                        if(o.getId_patientLabel() != null)  
     2594                                                        { 
     2595                                                                if(id_patientKeymap.get(o.getId_patientLabel()) == null) throw new Exception("Cannot find Patient for id_patient_name '"+o.getId_patientLabel()+"'"); 
     2596                                                                o.setId_patient(id_patientKeymap.get(o.getId_patientLabel())); 
     2597                                                        } 
     2598                                                } 
     2599                                                 
     2600                                                 
     2601                                                 
     2602                                                db.add(DiagnosisList); 
     2603                                                 
     2604                                                //clear for next batch                                           
     2605                                                DiagnosisList.clear(); 
     2606                                                id_phenotypeKeymap.clear(); 
     2607                                                id_patientKeymap.clear(); 
     2608                                                 
     2609                                                //keep count 
     2610                                                total.set(total.get() + BATCH_SIZE);                             
     2611                                        } 
     2612                                } 
     2613                        });      
     2614                        //resolve remaining foreign key 'id_phenotype' (Phenotype.Description -> Phenotype.id) 
     2615                        List<Phenotype> id_phenotypeList = db.query(Phenotype.class).in("Description",new ArrayList<Object>(id_phenotypeKeymap.keySet())).find(); 
     2616                        for(Phenotype xref :  id_phenotypeList) 
     2617                        { 
     2618                                id_phenotypeKeymap.put(xref.getDescription().toString(), xref.getId()); 
     2619                        } 
     2620                         
     2621                        //resolve remaining foreign key 'id_patient' (Patient.name -> Patient.id) 
     2622                        List<Patient> id_patientList = db.query(Patient.class).in("name",new ArrayList<Object>(id_patientKeymap.keySet())).find(); 
     2623                        for(Patient xref :  id_patientList) 
     2624                        { 
     2625                                id_patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2626                        } 
     2627                         
     2628                        //update remaining objects with foreign keys 
     2629                        for(Diagnosis o:  DiagnosisList) 
     2630                        { 
     2631                                if(o.getId_phenotypeLabel() != null)  
     2632                                { 
     2633                                        if(id_phenotypeKeymap.get(o.getId_phenotypeLabel()) == null) throw new Exception("Cannot find Phenotype for id_phenotype_Description '"+o.getId_phenotypeLabel()+"'"); 
     2634                                        o.setId_phenotype(id_phenotypeKeymap.get(o.getId_phenotypeLabel())); 
     2635                                } 
     2636                                if(o.getId_patientLabel() != null)  
     2637                                { 
     2638                                        if(id_patientKeymap.get(o.getId_patientLabel()) == null) throw new Exception("Cannot find Patient for id_patient_name '"+o.getId_patientLabel()+"'"); 
     2639                                        o.setId_patient(id_patientKeymap.get(o.getId_patientLabel())); 
     2640                                } 
     2641                        } 
     2642                         
     2643                         
     2644                        db.add(DiagnosisList); 
     2645                         
     2646                        //restore original batch size 
     2647                        BATCH_SIZE = oldBatchSize; 
     2648                         
     2649                        //output count 
     2650                        total.set(total.get() + DiagnosisList.size()); 
     2651                        logger.info("imported "+total.get()+" Diagnosis from "+DiagnosisFile); 
     2652                        return "Evaluated " + total.get() + " Diagnosis items."; 
     2653                } 
     2654                else{ 
     2655                        return "File not found."; 
     2656                }         
     2657        } 
     2658        /** 
     2659         * Imports E_M from tab/comma delimited File. 
     2660         * @param E_MFile A tab delimited file with E_M data. 
     2661         */ 
     2662        private static String importE_M(final Database db, File E_MFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2663                return importE_M(db, E_MFile, defaults, "default"); 
     2664        } 
     2665 
     2666        /** 
     2667         * Imports E_M from tab/comma delimited File. 
     2668         * @param E_MFile A tab delimited file with E_M data. 
     2669         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2670         */ 
     2671        private static String importE_M(final Database db, File E_MFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     2672        { 
     2673                if(     E_MFile.exists() ) 
     2674                { 
     2675                        //adjust batch size for replace or delete, keep old batch size 
     2676                        int oldBatchSize = -1; 
     2677                        if (dupHandling.equals("default")) { 
     2678                                oldBatchSize = BATCH_SIZE; 
     2679                        } else { 
     2680                                oldBatchSize = BATCH_SIZE; 
     2681                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2682                        } 
     2683                        logger.info("trying to import "+E_MFile); 
     2684                        CsvReader reader = new CsvFileReader(E_MFile);  
     2685                         
     2686                        //cache for imported objects 
     2687                        final List<E_M> E_MList = new ArrayList<E_M>(BATCH_SIZE); 
     2688                         
     2689                        //foreign key map for field 'patient' (Patient.name -> Patient.id)                       
     2690                        final Map<String,Integer> patientKeymap = new TreeMap<String,Integer>(); 
     2691                        final IntegerWrapper total = new IntegerWrapper(0); 
     2692                        reader.parse(new CsvReaderListener() 
     2693                        { 
     2694                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2695                                { 
     2696                                        //parse object 
     2697                                        E_M object = new E_M(); 
     2698                                        object.set(tuple, false); 
     2699                                        object.set(defaults, false);  
     2700                                        //only override values that have been set. 
     2701                                        E_MList.add(object); 
     2702                                         
     2703                                        //foreign key 'patient' (Patient.name -> ?) 
     2704                                        if(object.getPatientLabel() != null) patientKeymap.put(object.getPatientLabel(), null);  
     2705                                         
     2706                                        //add in batches 
     2707                                        if(E_MList.size() == BATCH_SIZE) 
     2708                                        { 
     2709                                                //resolve foreign key 'patient' (Patient.name -> Patient.id) 
     2710                                                List<Patient> patientList = db.query(Patient.class).in("name",new ArrayList<Object>(patientKeymap.keySet())).find(); 
     2711                                                for(Patient xref :  patientList) 
     2712                                                { 
     2713                                                        patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2714                                                } 
     2715                                                 
     2716                                                //update objects with foreign keys 
     2717                                                for(E_M o:  E_MList) 
     2718                                                { 
     2719                                                        if(o.getPatientLabel() != null)  
     2720                                                        { 
     2721                                                                if(patientKeymap.get(o.getPatientLabel()) == null) throw new Exception("Cannot find Patient for patient_name '"+o.getPatientLabel()+"'"); 
     2722                                                                o.setPatient(patientKeymap.get(o.getPatientLabel())); 
     2723                                                        } 
     2724                                                } 
     2725                                                 
     2726                                                 
     2727                                                 
     2728                                                db.add(E_MList); 
     2729                                                 
     2730                                                //clear for next batch                                           
     2731                                                E_MList.clear(); 
     2732                                                patientKeymap.clear(); 
     2733                                                 
     2734                                                //keep count 
     2735                                                total.set(total.get() + BATCH_SIZE);                             
     2736                                        } 
     2737                                } 
     2738                        });      
     2739                        //resolve remaining foreign key 'patient' (Patient.name -> Patient.id) 
     2740                        List<Patient> patientList = db.query(Patient.class).in("name",new ArrayList<Object>(patientKeymap.keySet())).find(); 
     2741                        for(Patient xref :  patientList) 
     2742                        { 
     2743                                patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2744                        } 
     2745                         
     2746                        //update remaining objects with foreign keys 
     2747                        for(E_M o:  E_MList) 
     2748                        { 
     2749                                if(o.getPatientLabel() != null)  
     2750                                { 
     2751                                        if(patientKeymap.get(o.getPatientLabel()) == null) throw new Exception("Cannot find Patient for patient_name '"+o.getPatientLabel()+"'"); 
     2752                                        o.setPatient(patientKeymap.get(o.getPatientLabel())); 
     2753                                } 
     2754                        } 
     2755                         
     2756                         
     2757                        db.add(E_MList); 
     2758                         
     2759                        //restore original batch size 
     2760                        BATCH_SIZE = oldBatchSize; 
     2761                         
     2762                        //output count 
     2763                        total.set(total.get() + E_MList.size()); 
     2764                        logger.info("imported "+total.get()+" E_M from "+E_MFile); 
     2765                        return "Evaluated " + total.get() + " E_M items."; 
     2766                } 
     2767                else{ 
     2768                        return "File not found."; 
     2769                }         
     2770        } 
     2771        /** 
     2772         * Imports I_F from tab/comma delimited File. 
     2773         * @param I_FFile A tab delimited file with I_F data. 
     2774         */ 
     2775        private static String importI_F(final Database db, File I_FFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2776                return importI_F(db, I_FFile, defaults, "default"); 
     2777        } 
     2778 
     2779        /** 
     2780         * Imports I_F from tab/comma delimited File. 
     2781         * @param I_FFile A tab delimited file with I_F data. 
     2782         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2783         */ 
     2784        private static String importI_F(final Database db, File I_FFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     2785        { 
     2786                if(     I_FFile.exists() ) 
     2787                { 
     2788                        //adjust batch size for replace or delete, keep old batch size 
     2789                        int oldBatchSize = -1; 
     2790                        if (dupHandling.equals("default")) { 
     2791                                oldBatchSize = BATCH_SIZE; 
     2792                        } else { 
     2793                                oldBatchSize = BATCH_SIZE; 
     2794                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2795                        } 
     2796                        logger.info("trying to import "+I_FFile); 
     2797                        CsvReader reader = new CsvFileReader(I_FFile);  
     2798                         
     2799                        //cache for imported objects 
     2800                        final List<I_F> I_FList = new ArrayList<I_F>(BATCH_SIZE); 
     2801                         
     2802                        //foreign key map for field 'patient' (Patient.name -> Patient.id)                       
     2803                        final Map<String,Integer> patientKeymap = new TreeMap<String,Integer>(); 
     2804                        final IntegerWrapper total = new IntegerWrapper(0); 
     2805                        reader.parse(new CsvReaderListener() 
     2806                        { 
     2807                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2808                                { 
     2809                                        //parse object 
     2810                                        I_F object = new I_F(); 
     2811                                        object.set(tuple, false); 
     2812                                        object.set(defaults, false);  
     2813                                        //only override values that have been set. 
     2814                                        I_FList.add(object); 
     2815                                         
     2816                                        //foreign key 'patient' (Patient.name -> ?) 
     2817                                        if(object.getPatientLabel() != null) patientKeymap.put(object.getPatientLabel(), null);  
     2818                                         
     2819                                        //add in batches 
     2820                                        if(I_FList.size() == BATCH_SIZE) 
     2821                                        { 
     2822                                                //resolve foreign key 'patient' (Patient.name -> Patient.id) 
     2823                                                List<Patient> patientList = db.query(Patient.class).in("name",new ArrayList<Object>(patientKeymap.keySet())).find(); 
     2824                                                for(Patient xref :  patientList) 
     2825                                                { 
     2826                                                        patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2827                                                } 
     2828                                                 
     2829                                                //update objects with foreign keys 
     2830                                                for(I_F o:  I_FList) 
     2831                                                { 
     2832                                                        if(o.getPatientLabel() != null)  
     2833                                                        { 
     2834                                                                if(patientKeymap.get(o.getPatientLabel()) == null) throw new Exception("Cannot find Patient for patient_name '"+o.getPatientLabel()+"'"); 
     2835                                                                o.setPatient(patientKeymap.get(o.getPatientLabel())); 
     2836                                                        } 
     2837                                                } 
     2838                                                 
     2839                                                 
     2840                                                 
     2841                                                db.add(I_FList); 
     2842                                                 
     2843                                                //clear for next batch                                           
     2844                                                I_FList.clear(); 
     2845                                                patientKeymap.clear(); 
     2846                                                 
     2847                                                //keep count 
     2848                                                total.set(total.get() + BATCH_SIZE);                             
     2849                                        } 
     2850                                } 
     2851                        });      
     2852                        //resolve remaining foreign key 'patient' (Patient.name -> Patient.id) 
     2853                        List<Patient> patientList = db.query(Patient.class).in("name",new ArrayList<Object>(patientKeymap.keySet())).find(); 
     2854                        for(Patient xref :  patientList) 
     2855                        { 
     2856                                patientKeymap.put(xref.getName().toString(), xref.getId()); 
     2857                        } 
     2858                         
     2859                        //update remaining objects with foreign keys 
     2860                        for(I_F o:  I_FList) 
     2861                        { 
     2862                                if(o.getPatientLabel() != null)  
     2863                                { 
     2864                                        if(patientKeymap.get(o.getPatientLabel()) == null) throw new Exception("Cannot find Patient for patient_name '"+o.getPatientLabel()+"'"); 
     2865                                        o.setPatient(patientKeymap.get(o.getPatientLabel())); 
     2866                                } 
     2867                        } 
     2868                         
     2869                         
     2870                        db.add(I_FList); 
     2871                         
     2872                        //restore original batch size 
     2873                        BATCH_SIZE = oldBatchSize; 
     2874                         
     2875                        //output count 
     2876                        total.set(total.get() + I_FList.size()); 
     2877                        logger.info("imported "+total.get()+" I_F from "+I_FFile); 
     2878                        return "Evaluated " + total.get() + " I_F items."; 
     2879                } 
     2880                else{ 
     2881                        return "File not found."; 
     2882                }         
     2883        } 
     2884        /** 
     2885         * Imports Statistics from tab/comma delimited File. 
     2886         * @param StatisticsFile A tab delimited file with Statistics data. 
     2887         */ 
     2888        private static String importStatistics(final Database db, File StatisticsFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     2889                return importStatistics(db, StatisticsFile, defaults, "default"); 
     2890        } 
     2891 
     2892        /** 
     2893         * Imports Statistics from tab/comma delimited File. 
     2894         * @param StatisticsFile A tab delimited file with Statistics data. 
     2895         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     2896         */ 
     2897        private static String importStatistics(final Database db, File StatisticsFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
     2898        { 
     2899                if(     StatisticsFile.exists() ) 
     2900                { 
     2901                        //adjust batch size for replace or delete, keep old batch size 
     2902                        int oldBatchSize = -1; 
     2903                        if (dupHandling.equals("default")) { 
     2904                                oldBatchSize = BATCH_SIZE; 
     2905                        } else { 
     2906                                oldBatchSize = BATCH_SIZE; 
     2907                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     2908                        } 
     2909                        logger.info("trying to import "+StatisticsFile); 
     2910                        CsvReader reader = new CsvFileReader(StatisticsFile);  
     2911                         
     2912                        //cache for imported objects 
     2913                        final List<Statistics> StatisticsList = new ArrayList<Statistics>(BATCH_SIZE); 
     2914                         
     2915                        //foreign key map for field 'mutation' (Mutations.nucleotide_change -> Mutations.id)                     
     2916                        final Map<String,Integer> mutationKeymap = new TreeMap<String,Integer>(); 
     2917                        final IntegerWrapper total = new IntegerWrapper(0); 
     2918                        reader.parse(new CsvReaderListener() 
     2919                        { 
     2920                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     2921                                { 
     2922                                        //parse object 
     2923                                        Statistics object = new Statistics(); 
     2924                                        object.set(tuple, false); 
     2925                                        object.set(defaults, false);  
     2926                                        //only override values that have been set. 
     2927                                        StatisticsList.add(object); 
     2928                                         
     2929                                        //foreign key 'mutation' (Mutations.nucleotide_change -> ?) 
     2930                                        if(object.getMutationLabel() != null) mutationKeymap.put(object.getMutationLabel(), null);       
     2931                                         
     2932                                        //add in batches 
     2933                                        if(StatisticsList.size() == BATCH_SIZE) 
     2934                                        { 
     2935                                                //resolve foreign key 'mutation' (Mutations.nucleotide_change -> Mutations.id) 
     2936                                                List<Mutations> mutationList = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(mutationKeymap.keySet())).find(); 
     2937                                                for(Mutations xref :  mutationList) 
     2938                                                { 
     2939                                                        mutationKeymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2940                                                } 
     2941                                                 
     2942                                                //update objects with foreign keys 
     2943                                                for(Statistics o:  StatisticsList) 
     2944                                                { 
     2945                                                        if(o.getMutationLabel() != null)  
     2946                                                        { 
     2947                                                                if(mutationKeymap.get(o.getMutationLabel()) == null) throw new Exception("Cannot find Mutations for mutation_nucleotide_change '"+o.getMutationLabel()+"'"); 
     2948                                                                o.setMutation(mutationKeymap.get(o.getMutationLabel())); 
     2949                                                        } 
     2950                                                } 
     2951                                                 
     2952                                                 
     2953                                                 
     2954                                                db.add(StatisticsList); 
     2955                                                 
     2956                                                //clear for next batch                                           
     2957                                                StatisticsList.clear(); 
     2958                                                mutationKeymap.clear(); 
     2959                                                 
     2960                                                //keep count 
     2961                                                total.set(total.get() + BATCH_SIZE);                             
     2962                                        } 
     2963                                } 
     2964                        });      
     2965                        //resolve remaining foreign key 'mutation' (Mutations.nucleotide_change -> Mutations.id) 
     2966                        List<Mutations> mutationList = db.query(Mutations.class).in("nucleotide_change",new ArrayList<Object>(mutationKeymap.keySet())).find(); 
     2967                        for(Mutations xref :  mutationList) 
     2968                        { 
     2969                                mutationKeymap.put(xref.getNucleotide_change().toString(), xref.getId()); 
     2970                        } 
     2971                         
     2972                        //update remaining objects with foreign keys 
     2973                        for(Statistics o:  StatisticsList) 
     2974                        { 
     2975                                if(o.getMutationLabel() != null)  
     2976                                { 
     2977                                        if(mutationKeymap.get(o.getMutationLabel()) == null) throw new Exception("Cannot find Mutations for mutation_nucleotide_change '"+o.getMutationLabel()+"'"); 
     2978                                        o.setMutation(mutationKeymap.get(o.getMutationLabel())); 
     2979                                } 
     2980                        } 
     2981                         
     2982                         
     2983                        db.add(StatisticsList); 
     2984                         
     2985                        //restore original batch size 
     2986                        BATCH_SIZE = oldBatchSize; 
     2987                         
     2988                        //output count 
     2989                        total.set(total.get() + StatisticsList.size()); 
     2990                        logger.info("imported "+total.get()+" Statistics from "+StatisticsFile); 
     2991                        return "Evaluated " + total.get() + " Statistics items."; 
     2992                } 
     2993                else{ 
     2994                        return "File not found."; 
     2995                }         
     2996        } 
     2997        /** 
     2998         * Imports Pictures from tab/comma delimited File. 
     2999         * @param PicturesFile A tab delimited file with Pictures data. 
     3000         */ 
     3001        private static String importPictures(final Database db, File PicturesFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3002                return importPictures(db, PicturesFile, defaults, "default"); 
     3003        } 
     3004 
     3005        /** 
     3006         * Imports Pictures from tab/comma delimited File. 
     3007         * @param PicturesFile A tab delimited file with Pictures data. 
     3008         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3009         */ 
     3010        private static String importPictures(final Database db, File PicturesFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     3011        { 
     3012                if(     PicturesFile.exists() ) 
     3013                { 
     3014                        //adjust batch size for replace or delete, keep old batch size 
     3015                        int oldBatchSize = -1; 
     3016                        if (dupHandling.equals("default")) { 
     3017                                oldBatchSize = BATCH_SIZE; 
     3018                        } else { 
     3019                                oldBatchSize = BATCH_SIZE; 
     3020                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3021                        } 
     3022                        logger.info("trying to import "+PicturesFile); 
     3023                        CsvReader reader = new CsvFileReader(PicturesFile);  
     3024                         
     3025                        //cache for imported objects 
     3026                        final List<Pictures> PicturesList = new ArrayList<Pictures>(BATCH_SIZE); 
     3027                         
     3028                        //foreign key map for field 'id_patient' (Patient.name -> Patient.id)                    
     3029                        final Map<String,Integer> id_patientKeymap = new TreeMap<String,Integer>(); 
     3030                        final IntegerWrapper total = new IntegerWrapper(0); 
     3031                        reader.parse(new CsvReaderListener() 
     3032                        { 
     3033                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     3034                                { 
     3035                                        //parse object 
     3036                                        Pictures object = new Pictures(); 
     3037                                        object.set(tuple, false); 
     3038                                        object.set(defaults, false);  
     3039                                        //only override values that have been set. 
     3040                                        PicturesList.add(object); 
     3041                                         
     3042                                        //foreign key 'id_patient' (Patient.name -> ?) 
     3043                                        if(object.getId_patientLabel() != null) id_patientKeymap.put(object.getId_patientLabel(), null);         
     3044                                         
     3045                                        //add in batches 
     3046                                        if(PicturesList.size() == BATCH_SIZE) 
     3047                                        { 
     3048                                                //resolve foreign key 'id_patient' (Patient.name -> Patient.id) 
     3049                                                List<Patient> id_patientList = db.query(Patient.class).in("name",new ArrayList<Object>(id_patientKeymap.keySet())).find(); 
     3050                                                for(Patient xref :  id_patientList) 
     3051                                                { 
     3052                                                        id_patientKeymap.put(xref.getName().toString(), xref.getId()); 
     3053                                                } 
     3054                                                 
     3055                                                //update objects with foreign keys 
     3056                                                for(Pictures o:  PicturesList) 
     3057                                                { 
     3058                                                        if(o.getId_patientLabel() != null)  
     3059                                                        { 
     3060                                                                if(id_patientKeymap.get(o.getId_patientLabel()) == null) throw new Exception("Cannot find Patient for id_patient_name '"+o.getId_patientLabel()+"'"); 
     3061                                                                o.setId_patient(id_patientKeymap.get(o.getId_patientLabel())); 
     3062                                                        } 
     3063                                                } 
     3064                                                 
     3065                                                 
     3066                                                 
     3067                                                db.add(PicturesList); 
     3068                                                 
     3069                                                //clear for next batch                                           
     3070                                                PicturesList.clear(); 
     3071                                                id_patientKeymap.clear(); 
     3072                                                 
     3073                                                //keep count 
     3074                                                total.set(total.get() + BATCH_SIZE);                             
     3075                                        } 
     3076                                } 
     3077                        });      
     3078                        //resolve remaining foreign key 'id_patient' (Patient.name -> Patient.id) 
     3079                        List<Patient> id_patientList = db.query(Patient.class).in("name",new ArrayList<Object>(id_patientKeymap.keySet())).find(); 
     3080                        for(Patient xref :  id_patientList) 
     3081                        { 
     3082                                id_patientKeymap.put(xref.getName().toString(), xref.getId()); 
     3083                        } 
     3084                         
     3085                        //update remaining objects with foreign keys 
     3086                        for(Pictures o:  PicturesList) 
     3087                        { 
     3088                                if(o.getId_patientLabel() != null)  
     3089                                { 
     3090                                        if(id_patientKeymap.get(o.getId_patientLabel()) == null) throw new Exception("Cannot find Patient for id_patient_name '"+o.getId_patientLabel()+"'"); 
     3091                                        o.setId_patient(id_patientKeymap.get(o.getId_patientLabel())); 
     3092                                } 
     3093                        } 
     3094                         
     3095                         
     3096                        db.add(PicturesList); 
     3097                         
     3098                        //restore original batch size 
     3099                        BATCH_SIZE = oldBatchSize; 
     3100                         
     3101                        //output count 
     3102                        total.set(total.get() + PicturesList.size()); 
     3103                        logger.info("imported "+total.get()+" Pictures from "+PicturesFile); 
     3104                        return "Evaluated " + total.get() + " Pictures items."; 
     3105                } 
     3106                else{ 
     3107                        return "File not found."; 
     3108                }         
     3109        } 
     3110        /** 
     3111         * Imports Data from tab/comma delimited File. 
     3112         * @param DataFile A tab delimited file with Data data. 
     3113         */ 
     3114        private static String importData(final Database db, File DataFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3115                return importData(db, DataFile, defaults, "default"); 
     3116        } 
     3117 
     3118        /** 
     3119         * Imports Data from tab/comma delimited File. 
     3120         * @param DataFile A tab delimited file with Data data. 
     3121         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3122         */ 
     3123        private static String importData(final Database db, File DataFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     3124        { 
     3125                if(     DataFile.exists() ) 
     3126                { 
     3127                        //adjust batch size for replace or delete, keep old batch size 
     3128                        int oldBatchSize = -1; 
     3129                        if (dupHandling.equals("default")) { 
     3130                                oldBatchSize = BATCH_SIZE; 
     3131                        } else { 
     3132                                oldBatchSize = BATCH_SIZE; 
     3133                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3134                        } 
     3135                        logger.info("trying to import "+DataFile); 
     3136                        CsvReader reader = new CsvFileReader(DataFile);  
     3137                         
     3138                        //cache for imported objects 
     3139                        final List<Data> DataList = new ArrayList<Data>(BATCH_SIZE); 
     3140                        final IntegerWrapper total = new IntegerWrapper(0); 
     3141                        reader.parse(new CsvReaderListener() 
     3142                        { 
     3143                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     3144                                { 
     3145                                        //parse object 
     3146                                        Data object = new Data(); 
     3147                                        object.set(tuple, false); 
     3148                                        object.set(defaults, false);  
     3149                                        //only override values that have been set. 
     3150                                        DataList.add(object); 
     3151                                         
     3152                                        //add in batches 
     3153                                        if(DataList.size() == BATCH_SIZE) 
     3154                                        { 
     3155                                                 
     3156                                                 
     3157                                                //add or update or delete objects to database 
     3158                                                if (dupHandling.equals("default")) { 
     3159                                                        db.add(DataList); 
     3160                                                } else if (dupHandling.equals("ignore")) { 
     3161                                                        try{ 
     3162                                                                db.add(DataList); 
     3163                                                        }catch(DatabaseException exception){ 
     3164                                                                List<String> listOfDataNames = new ArrayList<String>(); 
     3165                                                                for (Data e : DataList) { 
     3166                                                                        listOfDataNames.add(e.getName()); 
     3167                                                                } 
     3168                                                                List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3169                                                                List<Data> addDataList = new ArrayList<Data>(); 
     3170                                                                for(Data e1 : DataList){ 
     3171                                                                        boolean found = false; 
     3172                                                                        for(Data e2 : findDataList){ 
     3173                                                                                if(e1.getName().equals(e2.getName())){ 
     3174                                                                                        found = true; 
     3175                                                                                } 
     3176                                                                        } 
     3177                                                                        if(found==false) { 
     3178                                                                                addDataList.add(e1); 
     3179                                                                        } 
     3180                                                                } 
     3181                                                                db.add(addDataList); 
     3182                                                        } 
     3183                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3184                                                        List<String> listOfDataNames = new ArrayList<String>(); 
     3185                                                        Map<String, Data> DataHash = new HashMap<String, Data>(); 
     3186                                                        for (Data e : DataList) { 
     3187                                                                listOfDataNames.add(e.getName()); 
     3188                                                                DataHash.put(e.getName(), e); 
     3189                                                        } 
     3190                                                        List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3191                                                        List<Data> updateDataList = new ArrayList<Data>(); 
     3192                                                        for (Data e : findDataList) { 
     3193                                                                Data newData = DataHash.get(e.getName()); 
     3194                                                                Tuple t = new SimpleTuple(); 
     3195                                                                for (String field : newData.getFields()) { 
     3196                                                                        if (!field.equals("id")) { 
     3197                                                                                t.set(field, newData.get(field)); 
     3198                                                                        } else { 
     3199                                                                                t.set(field, e.get(e.getIdField())); 
     3200                                                                        } 
     3201                                                                } 
     3202                                                                e.set(t); 
     3203                                                                updateDataList.add(e); 
     3204                                                        } 
     3205                                                        db.update(updateDataList); 
     3206                                                         
     3207                                                        if(dupHandling.equals("replaceAdd")){ 
     3208                                                                List<Data> addDataList = new ArrayList<Data>(); 
     3209                                                                for(Data e1 : DataList){ 
     3210                                                                        boolean found = false; 
     3211                                                                        for(Data e2 : findDataList){ 
     3212                                                                                if(e1.getName().equals(e2.getName())){ 
     3213                                                                                        found = true; 
     3214                                                                                } 
     3215                                                                        } 
     3216                                                                        if(found==false) { 
     3217                                                                                addDataList.add(e1); 
     3218                                                                        } 
     3219                                                                } 
     3220                                                                db.add(addDataList); 
     3221                                                        } 
     3222                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3223                                                        List<String> listOfDataNames = new ArrayList<String>(); 
     3224                                                        for (Data e : DataList) { 
     3225                                                                listOfDataNames.add(e.getName()); 
     3226                                                        } 
     3227                                                        List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3228                                                        db.remove(findDataList); 
     3229                                                         
     3230                                                        if(dupHandling.equals("deleteAdd")){ 
     3231                                                                List<Data> addDataList = new ArrayList<Data>(); 
     3232                                                                for(Data e1 : DataList){ 
     3233                                                                        boolean found = false; 
     3234                                                                        for(Data e2 : findDataList){ 
     3235                                                                                if(e1.getName().equals(e2.getName())){ 
     3236                                                                                        found = true; 
     3237                                                                                } 
     3238                                                                        } 
     3239                                                                        if(found==false) { 
     3240                                                                                addDataList.add(e1); 
     3241                                                                        } 
     3242                                                                } 
     3243                                                                db.add(addDataList); 
     3244                                                        } 
     3245                                                } 
     3246                                                 
     3247                                                //clear for next batch                                           
     3248                                                DataList.clear(); 
     3249                                                 
     3250                                                //keep count 
     3251                                                total.set(total.get() + BATCH_SIZE);                             
     3252                                        } 
     3253                                } 
     3254                        });      
     3255                         
     3256                        //add or update or delete remaining objects to database 
     3257                        if (dupHandling.equals("default")) { 
     3258                                db.add(DataList); 
     3259                        } else if (dupHandling.equals("ignore")) { 
     3260                                try{ 
     3261                                        db.add(DataList); 
     3262                                }catch(DatabaseException exception){ 
     3263                                        List<String> listOfDataNames = new ArrayList<String>(); 
     3264                                        for (Data e : DataList) { 
     3265                                                listOfDataNames.add(e.getName()); 
     3266                                        } 
     3267                                        List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3268                                        List<Data> addDataList = new ArrayList<Data>(); 
     3269                                        for(Data e1 : DataList){ 
     3270                                                boolean found = false; 
     3271                                                for(Data e2 : findDataList){ 
     3272                                                        if(e1.getName().equals(e2.getName())){ 
     3273                                                                found = true; 
     3274                                                        } 
     3275                                                } 
     3276                                                if(found==false) { 
     3277                                                        addDataList.add(e1); 
     3278                                                } 
     3279                                        } 
     3280                                        db.add(addDataList); 
     3281                                } 
     3282                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3283                                List<String> listOfDataNames = new ArrayList<String>(); 
     3284                                Map<String, Data> DataHash = new HashMap<String, Data>(); 
     3285                                for (Data e : DataList) { 
     3286                                        listOfDataNames.add(e.getName()); 
     3287                                        DataHash.put(e.getName(), e); 
     3288                                } 
     3289                                List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3290                                List<Data> updateDataList = new ArrayList<Data>(); 
     3291                                for (Data e : findDataList) { 
     3292                                        Data newData = DataHash.get(e.getName()); 
     3293                                        Tuple t = new SimpleTuple(); 
     3294                                        for (String field : newData.getFields()) { 
     3295                                                if (!field.equals("id")) { 
     3296                                                        t.set(field, newData.get(field)); 
     3297                                                } else { 
     3298                                                        t.set(field, e.get(e.getIdField())); 
     3299                                                } 
     3300                                        } 
     3301                                        e.set(t); 
     3302                                        updateDataList.add(e); 
     3303                                } 
     3304                                db.update(updateDataList); 
     3305                                 
     3306                                if(dupHandling.equals("replaceAdd")){ 
     3307                                        List<Data> addDataList = new ArrayList<Data>(); 
     3308                                        for(Data e1 : DataList){ 
     3309                                                boolean found = false; 
     3310                                                for(Data e2 : findDataList){ 
     3311                                                        if(e1.getName().equals(e2.getName())){ 
     3312                                                                found = true; 
     3313                                                        } 
     3314                                                } 
     3315                                                if(found==false) { 
     3316                                                        addDataList.add(e1); 
     3317                                                } 
     3318                                        } 
     3319                                        db.add(addDataList); 
     3320                                } 
     3321                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3322                                List<String> listOfDataNames = new ArrayList<String>(); 
     3323                                for (Data e : DataList) { 
     3324                                        listOfDataNames.add(e.getName()); 
     3325                                } 
     3326                                List<Data> findDataList = db.find(Data.class, new QueryRule("name", Operator.IN, listOfDataNames)); 
     3327                                db.remove(findDataList); 
     3328                                 
     3329                                if(dupHandling.equals("deleteAdd")){ 
     3330                                        List<Data> addDataList = new ArrayList<Data>(); 
     3331                                        for(Data e1 : DataList){ 
     3332                                                boolean found = false; 
     3333                                                for(Data e2 : findDataList){ 
     3334                                                        if(e1.getName().equals(e2.getName())){ 
     3335                                                                found = true; 
     3336                                                        } 
     3337                                                } 
     3338                                                if(found==false) { 
     3339                                                        addDataList.add(e1); 
     3340                                                } 
     3341                                        } 
     3342                                        db.add(addDataList); 
     3343                                } 
     3344                        } 
     3345                         
     3346                        //restore original batch size 
     3347                        BATCH_SIZE = oldBatchSize; 
     3348                         
     3349                        //output count 
     3350                        total.set(total.get() + DataList.size()); 
     3351                        logger.info("imported "+total.get()+" Data from "+DataFile); 
     3352                        return "Evaluated " + total.get() + " Data items."; 
     3353                } 
     3354                else{ 
     3355                        return "File not found."; 
     3356                }         
     3357        } 
     3358        /** 
     3359         * Imports Investigation from tab/comma delimited File. 
     3360         * @param InvestigationFile A tab delimited file with Investigation data. 
     3361         */ 
     3362        private static String importInvestigation(final Database db, File InvestigationFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3363                return importInvestigation(db, InvestigationFile, defaults, "default"); 
     3364        } 
     3365 
     3366        /** 
     3367         * Imports Investigation from tab/comma delimited File. 
     3368         * @param InvestigationFile A tab delimited file with Investigation data. 
     3369         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3370         */ 
     3371        private static String importInvestigation(final Database db, File InvestigationFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
     3372        { 
     3373                if(     InvestigationFile.exists() ) 
     3374                { 
     3375                        //adjust batch size for replace or delete, keep old batch size 
     3376                        int oldBatchSize = -1; 
     3377                        if (dupHandling.equals("default")) { 
     3378                                oldBatchSize = BATCH_SIZE; 
     3379                        } else { 
     3380                                oldBatchSize = BATCH_SIZE; 
     3381                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3382                        } 
     3383                        logger.info("trying to import "+InvestigationFile); 
     3384                        CsvReader reader = new CsvFileReader(InvestigationFile);  
     3385                         
     3386                        //cache for imported objects 
     3387                        final List<Investigation> InvestigationList = new ArrayList<Investigation>(BATCH_SIZE); 
     3388                        final IntegerWrapper total = new IntegerWrapper(0); 
     3389                        reader.parse(new CsvReaderListener() 
     3390                        { 
     3391                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     3392                                { 
     3393                                        //parse object 
     3394                                        Investigation object = new Investigation(); 
     3395                                        object.set(tuple, false); 
     3396                                        object.set(defaults, false);  
     3397                                        //only override values that have been set. 
     3398                                        InvestigationList.add(object); 
     3399                                         
     3400                                        //add in batches 
     3401                                        if(InvestigationList.size() == BATCH_SIZE) 
     3402                                        { 
     3403                                                 
     3404                                                 
     3405                                                //add or update or delete objects to database 
     3406                                                if (dupHandling.equals("default")) { 
     3407                                                        db.add(InvestigationList); 
     3408                                                } else if (dupHandling.equals("ignore")) { 
     3409                                                        try{ 
     3410                                                                db.add(InvestigationList); 
     3411                                                        }catch(DatabaseException exception){ 
     3412                                                                List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3413                                                                for (Investigation e : InvestigationList) { 
     3414                                                                        listOfInvestigationNames.add(e.getName()); 
     3415                                                                } 
     3416                                                                List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3417                                                                List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3418                                                                for(Investigation e1 : InvestigationList){ 
     3419                                                                        boolean found = false; 
     3420                                                                        for(Investigation e2 : findInvestigationList){ 
     3421                                                                                if(e1.getName().equals(e2.getName())){ 
     3422                                                                                        found = true; 
     3423                                                                                } 
     3424                                                                        } 
     3425                                                                        if(found==false) { 
     3426                                                                                addInvestigationList.add(e1); 
     3427                                                                        } 
     3428                                                                } 
     3429                                                                db.add(addInvestigationList); 
     3430                                                        } 
     3431                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3432                                                        List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3433                                                        Map<String, Investigation> InvestigationHash = new HashMap<String, Investigation>(); 
     3434                                                        for (Investigation e : InvestigationList) { 
     3435                                                                listOfInvestigationNames.add(e.getName()); 
     3436                                                                InvestigationHash.put(e.getName(), e); 
     3437                                                        } 
     3438                                                        List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3439                                                        List<Investigation> updateInvestigationList = new ArrayList<Investigation>(); 
     3440                                                        for (Investigation e : findInvestigationList) { 
     3441                                                                Investigation newInvestigation = InvestigationHash.get(e.getName()); 
     3442                                                                Tuple t = new SimpleTuple(); 
     3443                                                                for (String field : newInvestigation.getFields()) { 
     3444                                                                        if (!field.equals("id")) { 
     3445                                                                                t.set(field, newInvestigation.get(field)); 
     3446                                                                        } else { 
     3447                                                                                t.set(field, e.get(e.getIdField())); 
     3448                                                                        } 
     3449                                                                } 
     3450                                                                e.set(t); 
     3451                                                                updateInvestigationList.add(e); 
     3452                                                        } 
     3453                                                        db.update(updateInvestigationList); 
     3454                                                         
     3455                                                        if(dupHandling.equals("replaceAdd")){ 
     3456                                                                List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3457                                                                for(Investigation e1 : InvestigationList){ 
     3458                                                                        boolean found = false; 
     3459                                                                        for(Investigation e2 : findInvestigationList){ 
     3460                                                                                if(e1.getName().equals(e2.getName())){ 
     3461                                                                                        found = true; 
     3462                                                                                } 
     3463                                                                        } 
     3464                                                                        if(found==false) { 
     3465                                                                                addInvestigationList.add(e1); 
     3466                                                                        } 
     3467                                                                } 
     3468                                                                db.add(addInvestigationList); 
     3469                                                        } 
     3470                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3471                                                        List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3472                                                        for (Investigation e : InvestigationList) { 
     3473                                                                listOfInvestigationNames.add(e.getName()); 
     3474                                                        } 
     3475                                                        List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3476                                                        db.remove(findInvestigationList); 
     3477                                                         
     3478                                                        if(dupHandling.equals("deleteAdd")){ 
     3479                                                                List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3480                                                                for(Investigation e1 : InvestigationList){ 
     3481                                                                        boolean found = false; 
     3482                                                                        for(Investigation e2 : findInvestigationList){ 
     3483                                                                                if(e1.getName().equals(e2.getName())){ 
     3484                                                                                        found = true; 
     3485                                                                                } 
     3486                                                                        } 
     3487                                                                        if(found==false) { 
     3488                                                                                addInvestigationList.add(e1); 
     3489                                                                        } 
     3490                                                                } 
     3491                                                                db.add(addInvestigationList); 
     3492                                                        } 
     3493                                                } 
     3494                                                 
     3495                                                //clear for next batch                                           
     3496                                                InvestigationList.clear(); 
     3497                                                 
     3498                                                //keep count 
     3499                                                total.set(total.get() + BATCH_SIZE);                             
     3500                                        } 
     3501                                } 
     3502                        });      
     3503                         
     3504                        //add or update or delete remaining objects to database 
     3505                        if (dupHandling.equals("default")) { 
     3506                                db.add(InvestigationList); 
     3507                        } else if (dupHandling.equals("ignore")) { 
     3508                                try{ 
     3509                                        db.add(InvestigationList); 
     3510                                }catch(DatabaseException exception){ 
     3511                                        List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3512                                        for (Investigation e : InvestigationList) { 
     3513                                                listOfInvestigationNames.add(e.getName()); 
     3514                                        } 
     3515                                        List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3516                                        List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3517                                        for(Investigation e1 : InvestigationList){ 
     3518                                                boolean found = false; 
     3519                                                for(Investigation e2 : findInvestigationList){ 
     3520                                                        if(e1.getName().equals(e2.getName())){ 
     3521                                                                found = true; 
     3522                                                        } 
     3523                                                } 
     3524                                                if(found==false) { 
     3525                                                        addInvestigationList.add(e1); 
     3526                                                } 
     3527                                        } 
     3528                                        db.add(addInvestigationList); 
     3529                                } 
     3530                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3531                                List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3532                                Map<String, Investigation> InvestigationHash = new HashMap<String, Investigation>(); 
     3533                                for (Investigation e : InvestigationList) { 
     3534                                        listOfInvestigationNames.add(e.getName()); 
     3535                                        InvestigationHash.put(e.getName(), e); 
     3536                                } 
     3537                                List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3538                                List<Investigation> updateInvestigationList = new ArrayList<Investigation>(); 
     3539                                for (Investigation e : findInvestigationList) { 
     3540                                        Investigation newInvestigation = InvestigationHash.get(e.getName()); 
     3541                                        Tuple t = new SimpleTuple(); 
     3542                                        for (String field : newInvestigation.getFields()) { 
     3543                                                if (!field.equals("id")) { 
     3544                                                        t.set(field, newInvestigation.get(field)); 
     3545                                                } else { 
     3546                                                        t.set(field, e.get(e.getIdField())); 
     3547                                                } 
     3548                                        } 
     3549                                        e.set(t); 
     3550                                        updateInvestigationList.add(e); 
     3551                                } 
     3552                                db.update(updateInvestigationList); 
     3553                                 
     3554                                if(dupHandling.equals("replaceAdd")){ 
     3555                                        List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3556                                        for(Investigation e1 : InvestigationList){ 
     3557                                                boolean found = false; 
     3558                                                for(Investigation e2 : findInvestigationList){ 
     3559                                                        if(e1.getName().equals(e2.getName())){ 
     3560                                                                found = true; 
     3561                                                        } 
     3562                                                } 
     3563                                                if(found==false) { 
     3564                                                        addInvestigationList.add(e1); 
     3565                                                } 
     3566                                        } 
     3567                                        db.add(addInvestigationList); 
     3568                                } 
     3569                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3570                                List<String> listOfInvestigationNames = new ArrayList<String>(); 
     3571                                for (Investigation e : InvestigationList) { 
     3572                                        listOfInvestigationNames.add(e.getName()); 
     3573                                } 
     3574                                List<Investigation> findInvestigationList = db.find(Investigation.class, new QueryRule("name", Operator.IN, listOfInvestigationNames)); 
     3575                                db.remove(findInvestigationList); 
     3576                                 
     3577                                if(dupHandling.equals("deleteAdd")){ 
     3578                                        List<Investigation> addInvestigationList = new ArrayList<Investigation>(); 
     3579                                        for(Investigation e1 : InvestigationList){ 
     3580                                                boolean found = false; 
     3581                                                for(Investigation e2 : findInvestigationList){ 
     3582                                                        if(e1.getName().equals(e2.getName())){ 
     3583                                                                found = true; 
     3584                                                        } 
     3585                                                } 
     3586                                                if(found==false) { 
     3587                                                        addInvestigationList.add(e1); 
     3588                                                } 
     3589                                        } 
     3590                                        db.add(addInvestigationList); 
     3591                                } 
     3592                        } 
     3593                         
     3594                        //restore original batch size 
     3595                        BATCH_SIZE = oldBatchSize; 
     3596                         
     3597                        //output count 
     3598                        total.set(total.get() + InvestigationList.size()); 
     3599                        logger.info("imported "+total.get()+" Investigation from "+InvestigationFile); 
     3600                        return "Evaluated " + total.get() + " Investigation items."; 
     3601                } 
     3602                else{ 
     3603                        return "File not found."; 
     3604                }         
     3605        } 
     3606        /** 
     3607         * Imports DimensionElement from tab/comma delimited File. 
     3608         * @param DimensionElementFile A tab delimited file with DimensionElement data. 
     3609         */ 
     3610        private static String importDimensionElement(final Database db, File DimensionElementFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3611                return importDimensionElement(db, DimensionElementFile, defaults, "default"); 
     3612        } 
     3613 
     3614        /** 
     3615         * Imports DimensionElement from tab/comma delimited File. 
     3616         * @param DimensionElementFile A tab delimited file with DimensionElement data. 
     3617         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3618         */ 
     3619        private static String importDimensionElement(final Database db, File DimensionElementFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     3620        { 
     3621                if(     DimensionElementFile.exists() ) 
     3622                { 
     3623                        //adjust batch size for replace or delete, keep old batch size 
     3624                        int oldBatchSize = -1; 
     3625                        if (dupHandling.equals("default")) { 
     3626                                oldBatchSize = BATCH_SIZE; 
     3627                        } else { 
     3628                                oldBatchSize = BATCH_SIZE; 
     3629                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3630                        } 
     3631                        logger.info("trying to import "+DimensionElementFile); 
     3632                        CsvReader reader = new CsvFileReader(DimensionElementFile);  
     3633                         
     3634                        //cache for imported objects 
     3635                        final List<DimensionElement> DimensionElementList = new ArrayList<DimensionElement>(BATCH_SIZE); 
     3636                         
     3637                        //foreign key map for field 'Investigation' (Investigation.name -> Investigation.id)                     
     3638                        final Map<String,Integer> InvestigationKeymap = new TreeMap<String,Integer>(); 
     3639                        final IntegerWrapper total = new IntegerWrapper(0); 
     3640                        reader.parse(new CsvReaderListener() 
     3641                        { 
     3642                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     3643                                { 
     3644                                        //parse object 
     3645                                        DimensionElement object = new DimensionElement(); 
     3646                                        object.set(tuple, false); 
     3647                                        object.set(defaults, false);  
     3648                                        //only override values that have been set. 
     3649                                        DimensionElementList.add(object); 
     3650                                         
     3651                                        //foreign key 'Investigation' (Investigation.name -> ?) 
     3652                                        if(object.getInvestigationLabel() != null) InvestigationKeymap.put(object.getInvestigationLabel(), null);        
     3653                                         
     3654                                        //add in batches 
     3655                                        if(DimensionElementList.size() == BATCH_SIZE) 
     3656                                        { 
     3657                                                //resolve foreign key 'Investigation' (Investigation.name -> Investigation.id) 
     3658                                                List<Investigation> InvestigationList = db.query(Investigation.class).in("name",new ArrayList<Object>(InvestigationKeymap.keySet())).find(); 
     3659                                                for(Investigation xref :  InvestigationList) 
     3660                                                { 
     3661                                                        InvestigationKeymap.put(xref.getName().toString(), xref.getId()); 
     3662                                                } 
     3663                                                 
     3664                                                //update objects with foreign keys 
     3665                                                for(DimensionElement o:  DimensionElementList) 
     3666                                                { 
     3667                                                        if(o.getInvestigationLabel() != null)  
     3668                                                        { 
     3669                                                                if(InvestigationKeymap.get(o.getInvestigationLabel()) == null) throw new Exception("Cannot find Investigation for Investigation_name '"+o.getInvestigationLabel()+"'"); 
     3670                                                                o.setInvestigation(InvestigationKeymap.get(o.getInvestigationLabel())); 
     3671                                                        } 
     3672                                                } 
     3673                                                 
     3674                                                 
     3675                                                 
     3676                                                //add or update or delete objects to database 
     3677                                                if (dupHandling.equals("default")) { 
     3678                                                        db.add(DimensionElementList); 
     3679                                                } else if (dupHandling.equals("ignore")) { 
     3680                                                        try{ 
     3681                                                                db.add(DimensionElementList); 
     3682                                                        }catch(DatabaseException exception){ 
     3683                                                                List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3684                                                                for (DimensionElement e : DimensionElementList) { 
     3685                                                                        listOfDimensionElementNames.add(e.getName()); 
     3686                                                                } 
     3687                                                                List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3688                                                                List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3689                                                                for(DimensionElement e1 : DimensionElementList){ 
     3690                                                                        boolean found = false; 
     3691                                                                        for(DimensionElement e2 : findDimensionElementList){ 
     3692                                                                                if(e1.getName().equals(e2.getName())){ 
     3693                                                                                        found = true; 
     3694                                                                                } 
     3695                                                                        } 
     3696                                                                        if(found==false) { 
     3697                                                                                addDimensionElementList.add(e1); 
     3698                                                                        } 
     3699                                                                } 
     3700                                                                db.add(addDimensionElementList); 
     3701                                                        } 
     3702                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3703                                                        List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3704                                                        Map<String, DimensionElement> DimensionElementHash = new HashMap<String, DimensionElement>(); 
     3705                                                        for (DimensionElement e : DimensionElementList) { 
     3706                                                                listOfDimensionElementNames.add(e.getName()); 
     3707                                                                DimensionElementHash.put(e.getName(), e); 
     3708                                                        } 
     3709                                                        List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3710                                                        List<DimensionElement> updateDimensionElementList = new ArrayList<DimensionElement>(); 
     3711                                                        for (DimensionElement e : findDimensionElementList) { 
     3712                                                                DimensionElement newDimensionElement = DimensionElementHash.get(e.getName()); 
     3713                                                                Tuple t = new SimpleTuple(); 
     3714                                                                for (String field : newDimensionElement.getFields()) { 
     3715                                                                        if (!field.equals("id")) { 
     3716                                                                                t.set(field, newDimensionElement.get(field)); 
     3717                                                                        } else { 
     3718                                                                                t.set(field, e.get(e.getIdField())); 
     3719                                                                        } 
     3720                                                                } 
     3721                                                                e.set(t); 
     3722                                                                updateDimensionElementList.add(e); 
     3723                                                        } 
     3724                                                        db.update(updateDimensionElementList); 
     3725                                                         
     3726                                                        if(dupHandling.equals("replaceAdd")){ 
     3727                                                                List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3728                                                                for(DimensionElement e1 : DimensionElementList){ 
     3729                                                                        boolean found = false; 
     3730                                                                        for(DimensionElement e2 : findDimensionElementList){ 
     3731                                                                                if(e1.getName().equals(e2.getName())){ 
     3732                                                                                        found = true; 
     3733                                                                                } 
     3734                                                                        } 
     3735                                                                        if(found==false) { 
     3736                                                                                addDimensionElementList.add(e1); 
     3737                                                                        } 
     3738                                                                } 
     3739                                                                db.add(addDimensionElementList); 
     3740                                                        } 
     3741                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3742                                                        List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3743                                                        for (DimensionElement e : DimensionElementList) { 
     3744                                                                listOfDimensionElementNames.add(e.getName()); 
     3745                                                        } 
     3746                                                        List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3747                                                        db.remove(findDimensionElementList); 
     3748                                                         
     3749                                                        if(dupHandling.equals("deleteAdd")){ 
     3750                                                                List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3751                                                                for(DimensionElement e1 : DimensionElementList){ 
     3752                                                                        boolean found = false; 
     3753                                                                        for(DimensionElement e2 : findDimensionElementList){ 
     3754                                                                                if(e1.getName().equals(e2.getName())){ 
     3755                                                                                        found = true; 
     3756                                                                                } 
     3757                                                                        } 
     3758                                                                        if(found==false) { 
     3759                                                                                addDimensionElementList.add(e1); 
     3760                                                                        } 
     3761                                                                } 
     3762                                                                db.add(addDimensionElementList); 
     3763                                                        } 
     3764                                                } 
     3765                                                 
     3766                                                //clear for next batch                                           
     3767                                                DimensionElementList.clear(); 
     3768                                                InvestigationKeymap.clear(); 
     3769                                                 
     3770                                                //keep count 
     3771                                                total.set(total.get() + BATCH_SIZE);                             
     3772                                        } 
     3773                                } 
     3774                        });      
     3775                        //resolve remaining foreign key 'Investigation' (Investigation.name -> Investigation.id) 
     3776                        List<Investigation> InvestigationList = db.query(Investigation.class).in("name",new ArrayList<Object>(InvestigationKeymap.keySet())).find(); 
     3777                        for(Investigation xref :  InvestigationList) 
     3778                        { 
     3779                                InvestigationKeymap.put(xref.getName().toString(), xref.getId()); 
     3780                        } 
     3781                         
     3782                        //update remaining objects with foreign keys 
     3783                        for(DimensionElement o:  DimensionElementList) 
     3784                        { 
     3785                                if(o.getInvestigationLabel() != null)  
     3786                                { 
     3787                                        if(InvestigationKeymap.get(o.getInvestigationLabel()) == null) throw new Exception("Cannot find Investigation for Investigation_name '"+o.getInvestigationLabel()+"'"); 
     3788                                        o.setInvestigation(InvestigationKeymap.get(o.getInvestigationLabel())); 
     3789                                } 
     3790                        } 
     3791                         
     3792                         
     3793                        //add or update or delete remaining objects to database 
     3794                        if (dupHandling.equals("default")) { 
     3795                                db.add(DimensionElementList); 
     3796                        } else if (dupHandling.equals("ignore")) { 
     3797                                try{ 
     3798                                        db.add(DimensionElementList); 
     3799                                }catch(DatabaseException exception){ 
     3800                                        List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3801                                        for (DimensionElement e : DimensionElementList) { 
     3802                                                listOfDimensionElementNames.add(e.getName()); 
     3803                                        } 
     3804                                        List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3805                                        List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3806                                        for(DimensionElement e1 : DimensionElementList){ 
     3807                                                boolean found = false; 
     3808                                                for(DimensionElement e2 : findDimensionElementList){ 
     3809                                                        if(e1.getName().equals(e2.getName())){ 
     3810                                                                found = true; 
     3811                                                        } 
     3812                                                } 
     3813                                                if(found==false) { 
     3814                                                        addDimensionElementList.add(e1); 
     3815                                                } 
     3816                                        } 
     3817                                        db.add(addDimensionElementList); 
     3818                                } 
     3819                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     3820                                List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3821                                Map<String, DimensionElement> DimensionElementHash = new HashMap<String, DimensionElement>(); 
     3822                                for (DimensionElement e : DimensionElementList) { 
     3823                                        listOfDimensionElementNames.add(e.getName()); 
     3824                                        DimensionElementHash.put(e.getName(), e); 
     3825                                } 
     3826                                List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3827                                List<DimensionElement> updateDimensionElementList = new ArrayList<DimensionElement>(); 
     3828                                for (DimensionElement e : findDimensionElementList) { 
     3829                                        DimensionElement newDimensionElement = DimensionElementHash.get(e.getName()); 
     3830                                        Tuple t = new SimpleTuple(); 
     3831                                        for (String field : newDimensionElement.getFields()) { 
     3832                                                if (!field.equals("id")) { 
     3833                                                        t.set(field, newDimensionElement.get(field)); 
     3834                                                } else { 
     3835                                                        t.set(field, e.get(e.getIdField())); 
     3836                                                } 
     3837                                        } 
     3838                                        e.set(t); 
     3839                                        updateDimensionElementList.add(e); 
     3840                                } 
     3841                                db.update(updateDimensionElementList); 
     3842                                 
     3843                                if(dupHandling.equals("replaceAdd")){ 
     3844                                        List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3845                                        for(DimensionElement e1 : DimensionElementList){ 
     3846                                                boolean found = false; 
     3847                                                for(DimensionElement e2 : findDimensionElementList){ 
     3848                                                        if(e1.getName().equals(e2.getName())){ 
     3849                                                                found = true; 
     3850                                                        } 
     3851                                                } 
     3852                                                if(found==false) { 
     3853                                                        addDimensionElementList.add(e1); 
     3854                                                } 
     3855                                        } 
     3856                                        db.add(addDimensionElementList); 
     3857                                } 
     3858                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     3859                                List<String> listOfDimensionElementNames = new ArrayList<String>(); 
     3860                                for (DimensionElement e : DimensionElementList) { 
     3861                                        listOfDimensionElementNames.add(e.getName()); 
     3862                                } 
     3863                                List<DimensionElement> findDimensionElementList = db.find(DimensionElement.class, new QueryRule("name", Operator.IN, listOfDimensionElementNames)); 
     3864                                db.remove(findDimensionElementList); 
     3865                                 
     3866                                if(dupHandling.equals("deleteAdd")){ 
     3867                                        List<DimensionElement> addDimensionElementList = new ArrayList<DimensionElement>(); 
     3868                                        for(DimensionElement e1 : DimensionElementList){ 
     3869                                                boolean found = false; 
     3870                                                for(DimensionElement e2 : findDimensionElementList){ 
     3871                                                        if(e1.getName().equals(e2.getName())){ 
     3872                                                                found = true; 
     3873                                                        } 
     3874                                                } 
     3875                                                if(found==false) { 
     3876                                                        addDimensionElementList.add(e1); 
     3877                                                } 
     3878                                        } 
     3879                                        db.add(addDimensionElementList); 
     3880                                } 
     3881                        } 
     3882                         
     3883                        //restore original batch size 
     3884                        BATCH_SIZE = oldBatchSize; 
     3885                         
     3886                        //output count 
     3887                        total.set(total.get() + DimensionElementList.size()); 
     3888                        logger.info("imported "+total.get()+" DimensionElement from "+DimensionElementFile); 
     3889                        return "Evaluated " + total.get() + " DimensionElement items."; 
     3890                } 
     3891                else{ 
     3892                        return "File not found."; 
     3893                }         
     3894        } 
     3895        /** 
     3896         * Imports Describable from tab/comma delimited File. 
     3897         * @param DescribableFile A tab delimited file with Describable data. 
     3898         */ 
     3899        private static String importDescribable(final Database db, File DescribableFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3900                return importDescribable(db, DescribableFile, defaults, "default"); 
     3901        } 
     3902 
     3903        /** 
     3904         * Imports Describable from tab/comma delimited File. 
     3905         * @param DescribableFile A tab delimited file with Describable data. 
     3906         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3907         */ 
     3908        private static String importDescribable(final Database db, File DescribableFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     3909        { 
     3910                if(     DescribableFile.exists() ) 
     3911                { 
     3912                        //adjust batch size for replace or delete, keep old batch size 
     3913                        int oldBatchSize = -1; 
     3914                        if (dupHandling.equals("default")) { 
     3915                                oldBatchSize = BATCH_SIZE; 
     3916                        } else { 
     3917                                oldBatchSize = BATCH_SIZE; 
     3918                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3919                        } 
     3920                        logger.info("trying to import "+DescribableFile); 
     3921                        CsvReader reader = new CsvFileReader(DescribableFile);  
     3922                         
     3923                        //cache for imported objects 
     3924                        final List<Describable> DescribableList = new ArrayList<Describable>(BATCH_SIZE); 
     3925                        final IntegerWrapper total = new IntegerWrapper(0); 
     3926                        reader.parse(new CsvReaderListener() 
     3927                        { 
     3928                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     3929                                { 
     3930                                        //parse object 
     3931                                        Describable object = new Describable(); 
     3932                                        object.set(tuple, false); 
     3933                                        object.set(defaults, false);  
     3934                                        //only override values that have been set. 
     3935                                        DescribableList.add(object); 
     3936                                         
     3937                                        //add in batches 
     3938                                        if(DescribableList.size() == BATCH_SIZE) 
     3939                                        { 
     3940                                                 
     3941                                                 
     3942                                                db.add(DescribableList); 
     3943                                                 
     3944                                                //clear for next batch                                           
     3945                                                DescribableList.clear(); 
     3946                                                 
     3947                                                //keep count 
     3948                                                total.set(total.get() + BATCH_SIZE);                             
     3949                                        } 
     3950                                } 
     3951                        });      
     3952                         
     3953                        db.add(DescribableList); 
     3954                         
     3955                        //restore original batch size 
     3956                        BATCH_SIZE = oldBatchSize; 
     3957                         
     3958                        //output count 
     3959                        total.set(total.get() + DescribableList.size()); 
     3960                        logger.info("imported "+total.get()+" Describable from "+DescribableFile); 
     3961                        return "Evaluated " + total.get() + " Describable items."; 
     3962                } 
     3963                else{ 
     3964                        return "File not found."; 
     3965                }         
     3966        } 
     3967        /** 
     3968         * Imports Identifiable from tab/comma delimited File. 
     3969         * @param IdentifiableFile A tab delimited file with Identifiable data. 
     3970         */ 
     3971        private static String importIdentifiable(final Database db, File IdentifiableFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     3972                return importIdentifiable(db, IdentifiableFile, defaults, "default"); 
     3973        } 
     3974 
     3975        /** 
     3976         * Imports Identifiable from tab/comma delimited File. 
     3977         * @param IdentifiableFile A tab delimited file with Identifiable data. 
     3978         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     3979         */ 
     3980        private static String importIdentifiable(final Database db, File IdentifiableFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     3981        { 
     3982                if(     IdentifiableFile.exists() ) 
     3983                { 
     3984                        //adjust batch size for replace or delete, keep old batch size 
     3985                        int oldBatchSize = -1; 
     3986                        if (dupHandling.equals("default")) { 
     3987                                oldBatchSize = BATCH_SIZE; 
     3988                        } else { 
     3989                                oldBatchSize = BATCH_SIZE; 
     3990                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     3991                        } 
     3992                        logger.info("trying to import "+IdentifiableFile); 
     3993                        CsvReader reader = new CsvFileReader(IdentifiableFile);  
     3994                         
     3995                        //cache for imported objects 
     3996                        final List<Identifiable> IdentifiableList = new ArrayList<Identifiable>(BATCH_SIZE); 
     3997                        final IntegerWrapper total = new IntegerWrapper(0); 
     3998                        reader.parse(new CsvReaderListener() 
     3999                        { 
     4000                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     4001                                { 
     4002                                        //parse object 
     4003                                        Identifiable object = new Identifiable(); 
     4004                                        object.set(tuple, false); 
     4005                                        object.set(defaults, false);  
     4006                                        //only override values that have been set. 
     4007                                        IdentifiableList.add(object); 
     4008                                         
     4009                                        //add in batches 
     4010                                        if(IdentifiableList.size() == BATCH_SIZE) 
     4011                                        { 
     4012                                                 
     4013                                                 
     4014                                                //add or update or delete objects to database 
     4015                                                if (dupHandling.equals("default")) { 
     4016                                                        db.add(IdentifiableList); 
     4017                                                } else if (dupHandling.equals("ignore")) { 
     4018                                                        try{ 
     4019                                                                db.add(IdentifiableList); 
     4020                                                        }catch(DatabaseException exception){ 
     4021                                                                List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4022                                                                for (Identifiable e : IdentifiableList) { 
     4023                                                                        listOfIdentifiableNames.add(e.getName()); 
     4024                                                                } 
     4025                                                                List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4026                                                                List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4027                                                                for(Identifiable e1 : IdentifiableList){ 
     4028                                                                        boolean found = false; 
     4029                                                                        for(Identifiable e2 : findIdentifiableList){ 
     4030                                                                                if(e1.getName().equals(e2.getName())){ 
     4031                                                                                        found = true; 
     4032                                                                                } 
     4033                                                                        } 
     4034                                                                        if(found==false) { 
     4035                                                                                addIdentifiableList.add(e1); 
     4036                                                                        } 
     4037                                                                } 
     4038                                                                db.add(addIdentifiableList); 
     4039                                                        } 
     4040                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4041                                                        List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4042                                                        Map<String, Identifiable> IdentifiableHash = new HashMap<String, Identifiable>(); 
     4043                                                        for (Identifiable e : IdentifiableList) { 
     4044                                                                listOfIdentifiableNames.add(e.getName()); 
     4045                                                                IdentifiableHash.put(e.getName(), e); 
     4046                                                        } 
     4047                                                        List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4048                                                        List<Identifiable> updateIdentifiableList = new ArrayList<Identifiable>(); 
     4049                                                        for (Identifiable e : findIdentifiableList) { 
     4050                                                                Identifiable newIdentifiable = IdentifiableHash.get(e.getName()); 
     4051                                                                Tuple t = new SimpleTuple(); 
     4052                                                                for (String field : newIdentifiable.getFields()) { 
     4053                                                                        if (!field.equals("id")) { 
     4054                                                                                t.set(field, newIdentifiable.get(field)); 
     4055                                                                        } else { 
     4056                                                                                t.set(field, e.get(e.getIdField())); 
     4057                                                                        } 
     4058                                                                } 
     4059                                                                e.set(t); 
     4060                                                                updateIdentifiableList.add(e); 
     4061                                                        } 
     4062                                                        db.update(updateIdentifiableList); 
     4063                                                         
     4064                                                        if(dupHandling.equals("replaceAdd")){ 
     4065                                                                List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4066                                                                for(Identifiable e1 : IdentifiableList){ 
     4067                                                                        boolean found = false; 
     4068                                                                        for(Identifiable e2 : findIdentifiableList){ 
     4069                                                                                if(e1.getName().equals(e2.getName())){ 
     4070                                                                                        found = true; 
     4071                                                                                } 
     4072                                                                        } 
     4073                                                                        if(found==false) { 
     4074                                                                                addIdentifiableList.add(e1); 
     4075                                                                        } 
     4076                                                                } 
     4077                                                                db.add(addIdentifiableList); 
     4078                                                        } 
     4079                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4080                                                        List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4081                                                        for (Identifiable e : IdentifiableList) { 
     4082                                                                listOfIdentifiableNames.add(e.getName()); 
     4083                                                        } 
     4084                                                        List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4085                                                        db.remove(findIdentifiableList); 
     4086                                                         
     4087                                                        if(dupHandling.equals("deleteAdd")){ 
     4088                                                                List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4089                                                                for(Identifiable e1 : IdentifiableList){ 
     4090                                                                        boolean found = false; 
     4091                                                                        for(Identifiable e2 : findIdentifiableList){ 
     4092                                                                                if(e1.getName().equals(e2.getName())){ 
     4093                                                                                        found = true; 
     4094                                                                                } 
     4095                                                                        } 
     4096                                                                        if(found==false) { 
     4097                                                                                addIdentifiableList.add(e1); 
     4098                                                                        } 
     4099                                                                } 
     4100                                                                db.add(addIdentifiableList); 
     4101                                                        } 
     4102                                                } 
     4103                                                 
     4104                                                //clear for next batch                                           
     4105                                                IdentifiableList.clear(); 
     4106                                                 
     4107                                                //keep count 
     4108                                                total.set(total.get() + BATCH_SIZE);                             
     4109                                        } 
     4110                                } 
     4111                        });      
     4112                         
     4113                        //add or update or delete remaining objects to database 
     4114                        if (dupHandling.equals("default")) { 
     4115                                db.add(IdentifiableList); 
     4116                        } else if (dupHandling.equals("ignore")) { 
     4117                                try{ 
     4118                                        db.add(IdentifiableList); 
     4119                                }catch(DatabaseException exception){ 
     4120                                        List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4121                                        for (Identifiable e : IdentifiableList) { 
     4122                                                listOfIdentifiableNames.add(e.getName()); 
     4123                                        } 
     4124                                        List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4125                                        List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4126                                        for(Identifiable e1 : IdentifiableList){ 
     4127                                                boolean found = false; 
     4128                                                for(Identifiable e2 : findIdentifiableList){ 
     4129                                                        if(e1.getName().equals(e2.getName())){ 
     4130                                                                found = true; 
     4131                                                        } 
     4132                                                } 
     4133                                                if(found==false) { 
     4134                                                        addIdentifiableList.add(e1); 
     4135                                                } 
     4136                                        } 
     4137                                        db.add(addIdentifiableList); 
     4138                                } 
     4139                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4140                                List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4141                                Map<String, Identifiable> IdentifiableHash = new HashMap<String, Identifiable>(); 
     4142                                for (Identifiable e : IdentifiableList) { 
     4143                                        listOfIdentifiableNames.add(e.getName()); 
     4144                                        IdentifiableHash.put(e.getName(), e); 
     4145                                } 
     4146                                List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4147                                List<Identifiable> updateIdentifiableList = new ArrayList<Identifiable>(); 
     4148                                for (Identifiable e : findIdentifiableList) { 
     4149                                        Identifiable newIdentifiable = IdentifiableHash.get(e.getName()); 
     4150                                        Tuple t = new SimpleTuple(); 
     4151                                        for (String field : newIdentifiable.getFields()) { 
     4152                                                if (!field.equals("id")) { 
     4153                                                        t.set(field, newIdentifiable.get(field)); 
     4154                                                } else { 
     4155                                                        t.set(field, e.get(e.getIdField())); 
     4156                                                } 
     4157                                        } 
     4158                                        e.set(t); 
     4159                                        updateIdentifiableList.add(e); 
     4160                                } 
     4161                                db.update(updateIdentifiableList); 
     4162                                 
     4163                                if(dupHandling.equals("replaceAdd")){ 
     4164                                        List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4165                                        for(Identifiable e1 : IdentifiableList){ 
     4166                                                boolean found = false; 
     4167                                                for(Identifiable e2 : findIdentifiableList){ 
     4168                                                        if(e1.getName().equals(e2.getName())){ 
     4169                                                                found = true; 
     4170                                                        } 
     4171                                                } 
     4172                                                if(found==false) { 
     4173                                                        addIdentifiableList.add(e1); 
     4174                                                } 
     4175                                        } 
     4176                                        db.add(addIdentifiableList); 
     4177                                } 
     4178                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4179                                List<String> listOfIdentifiableNames = new ArrayList<String>(); 
     4180                                for (Identifiable e : IdentifiableList) { 
     4181                                        listOfIdentifiableNames.add(e.getName()); 
     4182                                } 
     4183                                List<Identifiable> findIdentifiableList = db.find(Identifiable.class, new QueryRule("name", Operator.IN, listOfIdentifiableNames)); 
     4184                                db.remove(findIdentifiableList); 
     4185                                 
     4186                                if(dupHandling.equals("deleteAdd")){ 
     4187                                        List<Identifiable> addIdentifiableList = new ArrayList<Identifiable>(); 
     4188                                        for(Identifiable e1 : IdentifiableList){ 
     4189                                                boolean found = false; 
     4190                                                for(Identifiable e2 : findIdentifiableList){ 
     4191                                                        if(e1.getName().equals(e2.getName())){ 
     4192                                                                found = true; 
     4193                                                        } 
     4194                                                } 
     4195                                                if(found==false) { 
     4196                                                        addIdentifiableList.add(e1); 
     4197                                                } 
     4198                                        } 
     4199                                        db.add(addIdentifiableList); 
     4200                                } 
     4201                        } 
     4202                         
     4203                        //restore original batch size 
     4204                        BATCH_SIZE = oldBatchSize; 
     4205                         
     4206                        //output count 
     4207                        total.set(total.get() + IdentifiableList.size()); 
     4208                        logger.info("imported "+total.get()+" Identifiable from "+IdentifiableFile); 
     4209                        return "Evaluated " + total.get() + " Identifiable items."; 
     4210                } 
     4211                else{ 
     4212                        return "File not found."; 
     4213                }         
     4214        } 
     4215        /** 
     4216         * Imports FugeData from tab/comma delimited File. 
     4217         * @param FugeDataFile A tab delimited file with FugeData data. 
     4218         */ 
     4219        private static String importFugeData(final Database db, File FugeDataFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     4220                return importFugeData(db, FugeDataFile, defaults, "default"); 
     4221        } 
     4222 
     4223        /** 
     4224         * Imports FugeData from tab/comma delimited File. 
     4225         * @param FugeDataFile A tab delimited file with FugeData data. 
     4226         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     4227         */ 
     4228        private static String importFugeData(final Database db, File FugeDataFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     4229        { 
     4230                if(     FugeDataFile.exists() ) 
     4231                { 
     4232                        //adjust batch size for replace or delete, keep old batch size 
     4233                        int oldBatchSize = -1; 
     4234                        if (dupHandling.equals("default")) { 
     4235                                oldBatchSize = BATCH_SIZE; 
     4236                        } else { 
     4237                                oldBatchSize = BATCH_SIZE; 
     4238                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     4239                        } 
     4240                        logger.info("trying to import "+FugeDataFile); 
     4241                        CsvReader reader = new CsvFileReader(FugeDataFile);  
     4242                         
     4243                        //cache for imported objects 
     4244                        final List<FugeData> FugeDataList = new ArrayList<FugeData>(BATCH_SIZE); 
     4245                        final IntegerWrapper total = new IntegerWrapper(0); 
     4246                        reader.parse(new CsvReaderListener() 
     4247                        { 
     4248                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     4249                                { 
     4250                                        //parse object 
     4251                                        FugeData object = new FugeData(); 
     4252                                        object.set(tuple, false); 
     4253                                        object.set(defaults, false);  
     4254                                        //only override values that have been set. 
     4255                                        FugeDataList.add(object); 
     4256                                         
     4257                                        //add in batches 
     4258                                        if(FugeDataList.size() == BATCH_SIZE) 
     4259                                        { 
     4260                                                 
     4261                                                 
     4262                                                //add or update or delete objects to database 
     4263                                                if (dupHandling.equals("default")) { 
     4264                                                        db.add(FugeDataList); 
     4265                                                } else if (dupHandling.equals("ignore")) { 
     4266                                                        try{ 
     4267                                                                db.add(FugeDataList); 
     4268                                                        }catch(DatabaseException exception){ 
     4269                                                                List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4270                                                                for (FugeData e : FugeDataList) { 
     4271                                                                        listOfFugeDataNames.add(e.getName()); 
     4272                                                                } 
     4273                                                                List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4274                                                                List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4275                                                                for(FugeData e1 : FugeDataList){ 
     4276                                                                        boolean found = false; 
     4277                                                                        for(FugeData e2 : findFugeDataList){ 
     4278                                                                                if(e1.getName().equals(e2.getName())){ 
     4279                                                                                        found = true; 
     4280                                                                                } 
     4281                                                                        } 
     4282                                                                        if(found==false) { 
     4283                                                                                addFugeDataList.add(e1); 
     4284                                                                        } 
     4285                                                                } 
     4286                                                                db.add(addFugeDataList); 
     4287                                                        } 
     4288                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4289                                                        List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4290                                                        Map<String, FugeData> FugeDataHash = new HashMap<String, FugeData>(); 
     4291                                                        for (FugeData e : FugeDataList) { 
     4292                                                                listOfFugeDataNames.add(e.getName()); 
     4293                                                                FugeDataHash.put(e.getName(), e); 
     4294                                                        } 
     4295                                                        List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4296                                                        List<FugeData> updateFugeDataList = new ArrayList<FugeData>(); 
     4297                                                        for (FugeData e : findFugeDataList) { 
     4298                                                                FugeData newFugeData = FugeDataHash.get(e.getName()); 
     4299                                                                Tuple t = new SimpleTuple(); 
     4300                                                                for (String field : newFugeData.getFields()) { 
     4301                                                                        if (!field.equals("id")) { 
     4302                                                                                t.set(field, newFugeData.get(field)); 
     4303                                                                        } else { 
     4304                                                                                t.set(field, e.get(e.getIdField())); 
     4305                                                                        } 
     4306                                                                } 
     4307                                                                e.set(t); 
     4308                                                                updateFugeDataList.add(e); 
     4309                                                        } 
     4310                                                        db.update(updateFugeDataList); 
     4311                                                         
     4312                                                        if(dupHandling.equals("replaceAdd")){ 
     4313                                                                List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4314                                                                for(FugeData e1 : FugeDataList){ 
     4315                                                                        boolean found = false; 
     4316                                                                        for(FugeData e2 : findFugeDataList){ 
     4317                                                                                if(e1.getName().equals(e2.getName())){ 
     4318                                                                                        found = true; 
     4319                                                                                } 
     4320                                                                        } 
     4321                                                                        if(found==false) { 
     4322                                                                                addFugeDataList.add(e1); 
     4323                                                                        } 
     4324                                                                } 
     4325                                                                db.add(addFugeDataList); 
     4326                                                        } 
     4327                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4328                                                        List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4329                                                        for (FugeData e : FugeDataList) { 
     4330                                                                listOfFugeDataNames.add(e.getName()); 
     4331                                                        } 
     4332                                                        List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4333                                                        db.remove(findFugeDataList); 
     4334                                                         
     4335                                                        if(dupHandling.equals("deleteAdd")){ 
     4336                                                                List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4337                                                                for(FugeData e1 : FugeDataList){ 
     4338                                                                        boolean found = false; 
     4339                                                                        for(FugeData e2 : findFugeDataList){ 
     4340                                                                                if(e1.getName().equals(e2.getName())){ 
     4341                                                                                        found = true; 
     4342                                                                                } 
     4343                                                                        } 
     4344                                                                        if(found==false) { 
     4345                                                                                addFugeDataList.add(e1); 
     4346                                                                        } 
     4347                                                                } 
     4348                                                                db.add(addFugeDataList); 
     4349                                                        } 
     4350                                                } 
     4351                                                 
     4352                                                //clear for next batch                                           
     4353                                                FugeDataList.clear(); 
     4354                                                 
     4355                                                //keep count 
     4356                                                total.set(total.get() + BATCH_SIZE);                             
     4357                                        } 
     4358                                } 
     4359                        });      
     4360                         
     4361                        //add or update or delete remaining objects to database 
     4362                        if (dupHandling.equals("default")) { 
     4363                                db.add(FugeDataList); 
     4364                        } else if (dupHandling.equals("ignore")) { 
     4365                                try{ 
     4366                                        db.add(FugeDataList); 
     4367                                }catch(DatabaseException exception){ 
     4368                                        List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4369                                        for (FugeData e : FugeDataList) { 
     4370                                                listOfFugeDataNames.add(e.getName()); 
     4371                                        } 
     4372                                        List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4373                                        List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4374                                        for(FugeData e1 : FugeDataList){ 
     4375                                                boolean found = false; 
     4376                                                for(FugeData e2 : findFugeDataList){ 
     4377                                                        if(e1.getName().equals(e2.getName())){ 
     4378                                                                found = true; 
     4379                                                        } 
     4380                                                } 
     4381                                                if(found==false) { 
     4382                                                        addFugeDataList.add(e1); 
     4383                                                } 
     4384                                        } 
     4385                                        db.add(addFugeDataList); 
     4386                                } 
     4387                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4388                                List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4389                                Map<String, FugeData> FugeDataHash = new HashMap<String, FugeData>(); 
     4390                                for (FugeData e : FugeDataList) { 
     4391                                        listOfFugeDataNames.add(e.getName()); 
     4392                                        FugeDataHash.put(e.getName(), e); 
     4393                                } 
     4394                                List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4395                                List<FugeData> updateFugeDataList = new ArrayList<FugeData>(); 
     4396                                for (FugeData e : findFugeDataList) { 
     4397                                        FugeData newFugeData = FugeDataHash.get(e.getName()); 
     4398                                        Tuple t = new SimpleTuple(); 
     4399                                        for (String field : newFugeData.getFields()) { 
     4400                                                if (!field.equals("id")) { 
     4401                                                        t.set(field, newFugeData.get(field)); 
     4402                                                } else { 
     4403                                                        t.set(field, e.get(e.getIdField())); 
     4404                                                } 
     4405                                        } 
     4406                                        e.set(t); 
     4407                                        updateFugeDataList.add(e); 
     4408                                } 
     4409                                db.update(updateFugeDataList); 
     4410                                 
     4411                                if(dupHandling.equals("replaceAdd")){ 
     4412                                        List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4413                                        for(FugeData e1 : FugeDataList){ 
     4414                                                boolean found = false; 
     4415                                                for(FugeData e2 : findFugeDataList){ 
     4416                                                        if(e1.getName().equals(e2.getName())){ 
     4417                                                                found = true; 
     4418                                                        } 
     4419                                                } 
     4420                                                if(found==false) { 
     4421                                                        addFugeDataList.add(e1); 
     4422                                                } 
     4423                                        } 
     4424                                        db.add(addFugeDataList); 
     4425                                } 
     4426                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4427                                List<String> listOfFugeDataNames = new ArrayList<String>(); 
     4428                                for (FugeData e : FugeDataList) { 
     4429                                        listOfFugeDataNames.add(e.getName()); 
     4430                                } 
     4431                                List<FugeData> findFugeDataList = db.find(FugeData.class, new QueryRule("name", Operator.IN, listOfFugeDataNames)); 
     4432                                db.remove(findFugeDataList); 
     4433                                 
     4434                                if(dupHandling.equals("deleteAdd")){ 
     4435                                        List<FugeData> addFugeDataList = new ArrayList<FugeData>(); 
     4436                                        for(FugeData e1 : FugeDataList){ 
     4437                                                boolean found = false; 
     4438                                                for(FugeData e2 : findFugeDataList){ 
     4439                                                        if(e1.getName().equals(e2.getName())){ 
     4440                                                                found = true; 
     4441                                                        } 
     4442                                                } 
     4443                                                if(found==false) { 
     4444                                                        addFugeDataList.add(e1); 
     4445                                                } 
     4446                                        } 
     4447                                        db.add(addFugeDataList); 
     4448                                } 
     4449                        } 
     4450                         
     4451                        //restore original batch size 
     4452                        BATCH_SIZE = oldBatchSize; 
     4453                         
     4454                        //output count 
     4455                        total.set(total.get() + FugeDataList.size()); 
     4456                        logger.info("imported "+total.get()+" FugeData from "+FugeDataFile); 
     4457                        return "Evaluated " + total.get() + " FugeData items."; 
     4458                } 
     4459                else{ 
     4460                        return "File not found."; 
     4461                }         
     4462        } 
     4463        /** 
     4464         * Imports FugeDimensionElement from tab/comma delimited File. 
     4465         * @param FugeDimensionElementFile A tab delimited file with FugeDimensionElement data. 
     4466         */ 
     4467        private static String importFugeDimensionElement(final Database db, File FugeDimensionElementFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     4468                return importFugeDimensionElement(db, FugeDimensionElementFile, defaults, "default"); 
     4469        } 
     4470 
     4471        /** 
     4472         * Imports FugeDimensionElement from tab/comma delimited File. 
     4473         * @param FugeDimensionElementFile A tab delimited file with FugeDimensionElement data. 
     4474         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     4475         */ 
     4476        private static String importFugeDimensionElement(final Database db, File FugeDimensionElementFile, final Tuple defaults, final String dupHandling)      throws DatabaseException, IOException, Exception  
     4477        { 
     4478                if(     FugeDimensionElementFile.exists() ) 
     4479                { 
     4480                        //adjust batch size for replace or delete, keep old batch size 
     4481                        int oldBatchSize = -1; 
     4482                        if (dupHandling.equals("default")) { 
     4483                                oldBatchSize = BATCH_SIZE; 
     4484                        } else { 
     4485                                oldBatchSize = BATCH_SIZE; 
     4486                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     4487                        } 
     4488                        logger.info("trying to import "+FugeDimensionElementFile); 
     4489                        CsvReader reader = new CsvFileReader(FugeDimensionElementFile);  
     4490                         
     4491                        //cache for imported objects 
     4492                        final List<FugeDimensionElement> FugeDimensionElementList = new ArrayList<FugeDimensionElement>(BATCH_SIZE); 
     4493                        final IntegerWrapper total = new IntegerWrapper(0); 
     4494                        reader.parse(new CsvReaderListener() 
     4495                        { 
     4496                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     4497                                { 
     4498                                        //parse object 
     4499                                        FugeDimensionElement object = new FugeDimensionElement(); 
     4500                                        object.set(tuple, false); 
     4501                                        object.set(defaults, false);  
     4502                                        //only override values that have been set. 
     4503                                        FugeDimensionElementList.add(object); 
     4504                                         
     4505                                        //add in batches 
     4506                                        if(FugeDimensionElementList.size() == BATCH_SIZE) 
     4507                                        { 
     4508                                                 
     4509                                                 
     4510                                                //add or update or delete objects to database 
     4511                                                if (dupHandling.equals("default")) { 
     4512                                                        db.add(FugeDimensionElementList); 
     4513                                                } else if (dupHandling.equals("ignore")) { 
     4514                                                        try{ 
     4515                                                                db.add(FugeDimensionElementList); 
     4516                                                        }catch(DatabaseException exception){ 
     4517                                                                List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4518                                                                for (FugeDimensionElement e : FugeDimensionElementList) { 
     4519                                                                        listOfFugeDimensionElementNames.add(e.getName()); 
     4520                                                                } 
     4521                                                                List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4522                                                                List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4523                                                                for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4524                                                                        boolean found = false; 
     4525                                                                        for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4526                                                                                if(e1.getName().equals(e2.getName())){ 
     4527                                                                                        found = true; 
     4528                                                                                } 
     4529                                                                        } 
     4530                                                                        if(found==false) { 
     4531                                                                                addFugeDimensionElementList.add(e1); 
     4532                                                                        } 
     4533                                                                } 
     4534                                                                db.add(addFugeDimensionElementList); 
     4535                                                        } 
     4536                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4537                                                        List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4538                                                        Map<String, FugeDimensionElement> FugeDimensionElementHash = new HashMap<String, FugeDimensionElement>(); 
     4539                                                        for (FugeDimensionElement e : FugeDimensionElementList) { 
     4540                                                                listOfFugeDimensionElementNames.add(e.getName()); 
     4541                                                                FugeDimensionElementHash.put(e.getName(), e); 
     4542                                                        } 
     4543                                                        List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4544                                                        List<FugeDimensionElement> updateFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4545                                                        for (FugeDimensionElement e : findFugeDimensionElementList) { 
     4546                                                                FugeDimensionElement newFugeDimensionElement = FugeDimensionElementHash.get(e.getName()); 
     4547                                                                Tuple t = new SimpleTuple(); 
     4548                                                                for (String field : newFugeDimensionElement.getFields()) { 
     4549                                                                        if (!field.equals("id")) { 
     4550                                                                                t.set(field, newFugeDimensionElement.get(field)); 
     4551                                                                        } else { 
     4552                                                                                t.set(field, e.get(e.getIdField())); 
     4553                                                                        } 
     4554                                                                } 
     4555                                                                e.set(t); 
     4556                                                                updateFugeDimensionElementList.add(e); 
     4557                                                        } 
     4558                                                        db.update(updateFugeDimensionElementList); 
     4559                                                         
     4560                                                        if(dupHandling.equals("replaceAdd")){ 
     4561                                                                List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4562                                                                for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4563                                                                        boolean found = false; 
     4564                                                                        for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4565                                                                                if(e1.getName().equals(e2.getName())){ 
     4566                                                                                        found = true; 
     4567                                                                                } 
     4568                                                                        } 
     4569                                                                        if(found==false) { 
     4570                                                                                addFugeDimensionElementList.add(e1); 
     4571                                                                        } 
     4572                                                                } 
     4573                                                                db.add(addFugeDimensionElementList); 
     4574                                                        } 
     4575                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4576                                                        List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4577                                                        for (FugeDimensionElement e : FugeDimensionElementList) { 
     4578                                                                listOfFugeDimensionElementNames.add(e.getName()); 
     4579                                                        } 
     4580                                                        List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4581                                                        db.remove(findFugeDimensionElementList); 
     4582                                                         
     4583                                                        if(dupHandling.equals("deleteAdd")){ 
     4584                                                                List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4585                                                                for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4586                                                                        boolean found = false; 
     4587                                                                        for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4588                                                                                if(e1.getName().equals(e2.getName())){ 
     4589                                                                                        found = true; 
     4590                                                                                } 
     4591                                                                        } 
     4592                                                                        if(found==false) { 
     4593                                                                                addFugeDimensionElementList.add(e1); 
     4594                                                                        } 
     4595                                                                } 
     4596                                                                db.add(addFugeDimensionElementList); 
     4597                                                        } 
     4598                                                } 
     4599                                                 
     4600                                                //clear for next batch                                           
     4601                                                FugeDimensionElementList.clear(); 
     4602                                                 
     4603                                                //keep count 
     4604                                                total.set(total.get() + BATCH_SIZE);                             
     4605                                        } 
     4606                                } 
     4607                        });      
     4608                         
     4609                        //add or update or delete remaining objects to database 
     4610                        if (dupHandling.equals("default")) { 
     4611                                db.add(FugeDimensionElementList); 
     4612                        } else if (dupHandling.equals("ignore")) { 
     4613                                try{ 
     4614                                        db.add(FugeDimensionElementList); 
     4615                                }catch(DatabaseException exception){ 
     4616                                        List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4617                                        for (FugeDimensionElement e : FugeDimensionElementList) { 
     4618                                                listOfFugeDimensionElementNames.add(e.getName()); 
     4619                                        } 
     4620                                        List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4621                                        List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4622                                        for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4623                                                boolean found = false; 
     4624                                                for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4625                                                        if(e1.getName().equals(e2.getName())){ 
     4626                                                                found = true; 
     4627                                                        } 
     4628                                                } 
     4629                                                if(found==false) { 
     4630                                                        addFugeDimensionElementList.add(e1); 
     4631                                                } 
     4632                                        } 
     4633                                        db.add(addFugeDimensionElementList); 
     4634                                } 
     4635                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4636                                List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4637                                Map<String, FugeDimensionElement> FugeDimensionElementHash = new HashMap<String, FugeDimensionElement>(); 
     4638                                for (FugeDimensionElement e : FugeDimensionElementList) { 
     4639                                        listOfFugeDimensionElementNames.add(e.getName()); 
     4640                                        FugeDimensionElementHash.put(e.getName(), e); 
     4641                                } 
     4642                                List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4643                                List<FugeDimensionElement> updateFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4644                                for (FugeDimensionElement e : findFugeDimensionElementList) { 
     4645                                        FugeDimensionElement newFugeDimensionElement = FugeDimensionElementHash.get(e.getName()); 
     4646                                        Tuple t = new SimpleTuple(); 
     4647                                        for (String field : newFugeDimensionElement.getFields()) { 
     4648                                                if (!field.equals("id")) { 
     4649                                                        t.set(field, newFugeDimensionElement.get(field)); 
     4650                                                } else { 
     4651                                                        t.set(field, e.get(e.getIdField())); 
     4652                                                } 
     4653                                        } 
     4654                                        e.set(t); 
     4655                                        updateFugeDimensionElementList.add(e); 
     4656                                } 
     4657                                db.update(updateFugeDimensionElementList); 
     4658                                 
     4659                                if(dupHandling.equals("replaceAdd")){ 
     4660                                        List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4661                                        for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4662                                                boolean found = false; 
     4663                                                for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4664                                                        if(e1.getName().equals(e2.getName())){ 
     4665                                                                found = true; 
     4666                                                        } 
     4667                                                } 
     4668                                                if(found==false) { 
     4669                                                        addFugeDimensionElementList.add(e1); 
     4670                                                } 
     4671                                        } 
     4672                                        db.add(addFugeDimensionElementList); 
     4673                                } 
     4674                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4675                                List<String> listOfFugeDimensionElementNames = new ArrayList<String>(); 
     4676                                for (FugeDimensionElement e : FugeDimensionElementList) { 
     4677                                        listOfFugeDimensionElementNames.add(e.getName()); 
     4678                                } 
     4679                                List<FugeDimensionElement> findFugeDimensionElementList = db.find(FugeDimensionElement.class, new QueryRule("name", Operator.IN, listOfFugeDimensionElementNames)); 
     4680                                db.remove(findFugeDimensionElementList); 
     4681                                 
     4682                                if(dupHandling.equals("deleteAdd")){ 
     4683                                        List<FugeDimensionElement> addFugeDimensionElementList = new ArrayList<FugeDimensionElement>(); 
     4684                                        for(FugeDimensionElement e1 : FugeDimensionElementList){ 
     4685                                                boolean found = false; 
     4686                                                for(FugeDimensionElement e2 : findFugeDimensionElementList){ 
     4687                                                        if(e1.getName().equals(e2.getName())){ 
     4688                                                                found = true; 
     4689                                                        } 
     4690                                                } 
     4691                                                if(found==false) { 
     4692                                                        addFugeDimensionElementList.add(e1); 
     4693                                                } 
     4694                                        } 
     4695                                        db.add(addFugeDimensionElementList); 
     4696                                } 
     4697                        } 
     4698                         
     4699                        //restore original batch size 
     4700                        BATCH_SIZE = oldBatchSize; 
     4701                         
     4702                        //output count 
     4703                        total.set(total.get() + FugeDimensionElementList.size()); 
     4704                        logger.info("imported "+total.get()+" FugeDimensionElement from "+FugeDimensionElementFile); 
     4705                        return "Evaluated " + total.get() + " FugeDimensionElement items."; 
     4706                } 
     4707                else{ 
     4708                        return "File not found."; 
     4709                }         
     4710        } 
     4711        /** 
     4712         * Imports FugeInvestigation from tab/comma delimited File. 
     4713         * @param FugeInvestigationFile A tab delimited file with FugeInvestigation data. 
     4714         */ 
     4715        private static String importFugeInvestigation(final Database db, File FugeInvestigationFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     4716                return importFugeInvestigation(db, FugeInvestigationFile, defaults, "default"); 
     4717        } 
     4718 
     4719        /** 
     4720         * Imports FugeInvestigation from tab/comma delimited File. 
     4721         * @param FugeInvestigationFile A tab delimited file with FugeInvestigation data. 
     4722         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     4723         */ 
     4724        private static String importFugeInvestigation(final Database db, File FugeInvestigationFile, final Tuple defaults, final String dupHandling)    throws DatabaseException, IOException, Exception  
     4725        { 
     4726                if(     FugeInvestigationFile.exists() ) 
     4727                { 
     4728                        //adjust batch size for replace or delete, keep old batch size 
     4729                        int oldBatchSize = -1; 
     4730                        if (dupHandling.equals("default")) { 
     4731                                oldBatchSize = BATCH_SIZE; 
     4732                        } else { 
     4733                                oldBatchSize = BATCH_SIZE; 
     4734                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     4735                        } 
     4736                        logger.info("trying to import "+FugeInvestigationFile); 
     4737                        CsvReader reader = new CsvFileReader(FugeInvestigationFile);  
     4738                         
     4739                        //cache for imported objects 
     4740                        final List<FugeInvestigation> FugeInvestigationList = new ArrayList<FugeInvestigation>(BATCH_SIZE); 
     4741                        final IntegerWrapper total = new IntegerWrapper(0); 
     4742                        reader.parse(new CsvReaderListener() 
     4743                        { 
     4744                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     4745                                { 
     4746                                        //parse object 
     4747                                        FugeInvestigation object = new FugeInvestigation(); 
     4748                                        object.set(tuple, false); 
     4749                                        object.set(defaults, false);  
     4750                                        //only override values that have been set. 
     4751                                        FugeInvestigationList.add(object); 
     4752                                         
     4753                                        //add in batches 
     4754                                        if(FugeInvestigationList.size() == BATCH_SIZE) 
     4755                                        { 
     4756                                                 
     4757                                                 
     4758                                                //add or update or delete objects to database 
     4759                                                if (dupHandling.equals("default")) { 
     4760                                                        db.add(FugeInvestigationList); 
     4761                                                } else if (dupHandling.equals("ignore")) { 
     4762                                                        try{ 
     4763                                                                db.add(FugeInvestigationList); 
     4764                                                        }catch(DatabaseException exception){ 
     4765                                                                List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4766                                                                for (FugeInvestigation e : FugeInvestigationList) { 
     4767                                                                        listOfFugeInvestigationNames.add(e.getName()); 
     4768                                                                } 
     4769                                                                List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4770                                                                List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4771                                                                for(FugeInvestigation e1 : FugeInvestigationList){ 
     4772                                                                        boolean found = false; 
     4773                                                                        for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4774                                                                                if(e1.getName().equals(e2.getName())){ 
     4775                                                                                        found = true; 
     4776                                                                                } 
     4777                                                                        } 
     4778                                                                        if(found==false) { 
     4779                                                                                addFugeInvestigationList.add(e1); 
     4780                                                                        } 
     4781                                                                } 
     4782                                                                db.add(addFugeInvestigationList); 
     4783                                                        } 
     4784                                                } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4785                                                        List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4786                                                        Map<String, FugeInvestigation> FugeInvestigationHash = new HashMap<String, FugeInvestigation>(); 
     4787                                                        for (FugeInvestigation e : FugeInvestigationList) { 
     4788                                                                listOfFugeInvestigationNames.add(e.getName()); 
     4789                                                                FugeInvestigationHash.put(e.getName(), e); 
     4790                                                        } 
     4791                                                        List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4792                                                        List<FugeInvestigation> updateFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4793                                                        for (FugeInvestigation e : findFugeInvestigationList) { 
     4794                                                                FugeInvestigation newFugeInvestigation = FugeInvestigationHash.get(e.getName()); 
     4795                                                                Tuple t = new SimpleTuple(); 
     4796                                                                for (String field : newFugeInvestigation.getFields()) { 
     4797                                                                        if (!field.equals("id")) { 
     4798                                                                                t.set(field, newFugeInvestigation.get(field)); 
     4799                                                                        } else { 
     4800                                                                                t.set(field, e.get(e.getIdField())); 
     4801                                                                        } 
     4802                                                                } 
     4803                                                                e.set(t); 
     4804                                                                updateFugeInvestigationList.add(e); 
     4805                                                        } 
     4806                                                        db.update(updateFugeInvestigationList); 
     4807                                                         
     4808                                                        if(dupHandling.equals("replaceAdd")){ 
     4809                                                                List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4810                                                                for(FugeInvestigation e1 : FugeInvestigationList){ 
     4811                                                                        boolean found = false; 
     4812                                                                        for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4813                                                                                if(e1.getName().equals(e2.getName())){ 
     4814                                                                                        found = true; 
     4815                                                                                } 
     4816                                                                        } 
     4817                                                                        if(found==false) { 
     4818                                                                                addFugeInvestigationList.add(e1); 
     4819                                                                        } 
     4820                                                                } 
     4821                                                                db.add(addFugeInvestigationList); 
     4822                                                        } 
     4823                                                } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4824                                                        List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4825                                                        for (FugeInvestigation e : FugeInvestigationList) { 
     4826                                                                listOfFugeInvestigationNames.add(e.getName()); 
     4827                                                        } 
     4828                                                        List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4829                                                        db.remove(findFugeInvestigationList); 
     4830                                                         
     4831                                                        if(dupHandling.equals("deleteAdd")){ 
     4832                                                                List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4833                                                                for(FugeInvestigation e1 : FugeInvestigationList){ 
     4834                                                                        boolean found = false; 
     4835                                                                        for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4836                                                                                if(e1.getName().equals(e2.getName())){ 
     4837                                                                                        found = true; 
     4838                                                                                } 
     4839                                                                        } 
     4840                                                                        if(found==false) { 
     4841                                                                                addFugeInvestigationList.add(e1); 
     4842                                                                        } 
     4843                                                                } 
     4844                                                                db.add(addFugeInvestigationList); 
     4845                                                        } 
     4846                                                } 
     4847                                                 
     4848                                                //clear for next batch                                           
     4849                                                FugeInvestigationList.clear(); 
     4850                                                 
     4851                                                //keep count 
     4852                                                total.set(total.get() + BATCH_SIZE);                             
     4853                                        } 
     4854                                } 
     4855                        });      
     4856                         
     4857                        //add or update or delete remaining objects to database 
     4858                        if (dupHandling.equals("default")) { 
     4859                                db.add(FugeInvestigationList); 
     4860                        } else if (dupHandling.equals("ignore")) { 
     4861                                try{ 
     4862                                        db.add(FugeInvestigationList); 
     4863                                }catch(DatabaseException exception){ 
     4864                                        List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4865                                        for (FugeInvestigation e : FugeInvestigationList) { 
     4866                                                listOfFugeInvestigationNames.add(e.getName()); 
     4867                                        } 
     4868                                        List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4869                                        List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4870                                        for(FugeInvestigation e1 : FugeInvestigationList){ 
     4871                                                boolean found = false; 
     4872                                                for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4873                                                        if(e1.getName().equals(e2.getName())){ 
     4874                                                                found = true; 
     4875                                                        } 
     4876                                                } 
     4877                                                if(found==false) { 
     4878                                                        addFugeInvestigationList.add(e1); 
     4879                                                } 
     4880                                        } 
     4881                                        db.add(addFugeInvestigationList); 
     4882                                } 
     4883                        } else if (dupHandling.equals("replace") || dupHandling.equals("replaceAdd")) { 
     4884                                List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4885                                Map<String, FugeInvestigation> FugeInvestigationHash = new HashMap<String, FugeInvestigation>(); 
     4886                                for (FugeInvestigation e : FugeInvestigationList) { 
     4887                                        listOfFugeInvestigationNames.add(e.getName()); 
     4888                                        FugeInvestigationHash.put(e.getName(), e); 
     4889                                } 
     4890                                List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4891                                List<FugeInvestigation> updateFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4892                                for (FugeInvestigation e : findFugeInvestigationList) { 
     4893                                        FugeInvestigation newFugeInvestigation = FugeInvestigationHash.get(e.getName()); 
     4894                                        Tuple t = new SimpleTuple(); 
     4895                                        for (String field : newFugeInvestigation.getFields()) { 
     4896                                                if (!field.equals("id")) { 
     4897                                                        t.set(field, newFugeInvestigation.get(field)); 
     4898                                                } else { 
     4899                                                        t.set(field, e.get(e.getIdField())); 
     4900                                                } 
     4901                                        } 
     4902                                        e.set(t); 
     4903                                        updateFugeInvestigationList.add(e); 
     4904                                } 
     4905                                db.update(updateFugeInvestigationList); 
     4906                                 
     4907                                if(dupHandling.equals("replaceAdd")){ 
     4908                                        List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4909                                        for(FugeInvestigation e1 : FugeInvestigationList){ 
     4910                                                boolean found = false; 
     4911                                                for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4912                                                        if(e1.getName().equals(e2.getName())){ 
     4913                                                                found = true; 
     4914                                                        } 
     4915                                                } 
     4916                                                if(found==false) { 
     4917                                                        addFugeInvestigationList.add(e1); 
     4918                                                } 
     4919                                        } 
     4920                                        db.add(addFugeInvestigationList); 
     4921                                } 
     4922                        } else if (dupHandling.equals("delete") || dupHandling.equals("deleteAdd")) { 
     4923                                List<String> listOfFugeInvestigationNames = new ArrayList<String>(); 
     4924                                for (FugeInvestigation e : FugeInvestigationList) { 
     4925                                        listOfFugeInvestigationNames.add(e.getName()); 
     4926                                } 
     4927                                List<FugeInvestigation> findFugeInvestigationList = db.find(FugeInvestigation.class, new QueryRule("name", Operator.IN, listOfFugeInvestigationNames)); 
     4928                                db.remove(findFugeInvestigationList); 
     4929                                 
     4930                                if(dupHandling.equals("deleteAdd")){ 
     4931                                        List<FugeInvestigation> addFugeInvestigationList = new ArrayList<FugeInvestigation>(); 
     4932                                        for(FugeInvestigation e1 : FugeInvestigationList){ 
     4933                                                boolean found = false; 
     4934                                                for(FugeInvestigation e2 : findFugeInvestigationList){ 
     4935                                                        if(e1.getName().equals(e2.getName())){ 
     4936                                                                found = true; 
     4937                                                        } 
     4938                                                } 
     4939                                                if(found==false) { 
     4940                                                        addFugeInvestigationList.add(e1); 
     4941                                                } 
     4942                                        } 
     4943                                        db.add(addFugeInvestigationList); 
     4944                                } 
     4945                        } 
     4946                         
     4947                        //restore original batch size 
     4948                        BATCH_SIZE = oldBatchSize; 
     4949                         
     4950                        //output count 
     4951                        total.set(total.get() + FugeInvestigationList.size()); 
     4952                        logger.info("imported "+total.get()+" FugeInvestigation from "+FugeInvestigationFile); 
     4953                        return "Evaluated " + total.get() + " FugeInvestigation items."; 
     4954                } 
     4955                else{ 
     4956                        return "File not found."; 
     4957                }         
     4958        } 
     4959        /** 
     4960         * Imports TextDataElement from tab/comma delimited File. 
     4961         * @param TextDataElementFile A tab delimited file with TextDataElement data. 
     4962         */ 
     4963        private static String importTextDataElement(final Database db, File TextDataElementFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     4964                return importTextDataElement(db, TextDataElementFile, defaults, "default"); 
     4965        } 
     4966 
     4967        /** 
     4968         * Imports TextDataElement from tab/comma delimited File. 
     4969         * @param TextDataElementFile A tab delimited file with TextDataElement data. 
     4970         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     4971         */ 
     4972        private static String importTextDataElement(final Database db, File TextDataElementFile, final Tuple defaults, final String dupHandling)        throws DatabaseException, IOException, Exception  
     4973        { 
     4974                if(     TextDataElementFile.exists() ) 
     4975                { 
     4976                        //adjust batch size for replace or delete, keep old batch size 
     4977                        int oldBatchSize = -1; 
     4978                        if (dupHandling.equals("default")) { 
     4979                                oldBatchSize = BATCH_SIZE; 
     4980                        } else { 
     4981                                oldBatchSize = BATCH_SIZE; 
     4982                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     4983                        } 
     4984                        logger.info("trying to import "+TextDataElementFile); 
     4985                        CsvReader reader = new CsvFileReader(TextDataElementFile);  
     4986                         
     4987                        //cache for imported objects 
     4988                        final List<TextDataElement> TextDataElementList = new ArrayList<TextDataElement>(BATCH_SIZE); 
     4989                         
     4990                        //foreign key map for field 'Data' (Data.name -> Data.id)                        
     4991                        final Map<String,Integer> DataKeymap = new TreeMap<String,Integer>(); 
     4992                         
     4993                        //foreign key map for field 'Col' (DimensionElement.name -> DimensionElement.id)                         
     4994                        final Map<String,Integer> ColKeymap = new TreeMap<String,Integer>(); 
     4995                         
     4996                        //foreign key map for field 'Row' (DimensionElement.name -> DimensionElement.id)                         
     4997                        final Map<String,Integer> RowKeymap = new TreeMap<String,Integer>(); 
     4998                        final IntegerWrapper total = new IntegerWrapper(0); 
     4999                        reader.parse(new CsvReaderListener() 
     5000                        { 
     5001                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     5002                                { 
     5003                                        //parse object 
     5004                                        TextDataElement object = new TextDataElement(); 
     5005                                        object.set(tuple, false); 
     5006                                        object.set(defaults, false);  
     5007                                        //only override values that have been set. 
     5008                                        TextDataElementList.add(object); 
     5009                                         
     5010                                        //foreign key 'Data' (Data.name -> ?) 
     5011                                        if(object.getDataLabel() != null) DataKeymap.put(object.getDataLabel(), null);   
     5012                                         
     5013                                        //foreign key 'Col' (DimensionElement.name -> ?) 
     5014                                        if(object.getColLabel() != null) ColKeymap.put(object.getColLabel(), null);      
     5015                                         
     5016                                        //foreign key 'Row' (DimensionElement.name -> ?) 
     5017                                        if(object.getRowLabel() != null) RowKeymap.put(object.getRowLabel(), null);      
     5018                                         
     5019                                        //add in batches 
     5020                                        if(TextDataElementList.size() == BATCH_SIZE) 
     5021                                        { 
     5022                                                //resolve foreign key 'Data' (Data.name -> Data.id) 
     5023                                                List<Data> DataList = db.query(Data.class).in("name",new ArrayList<Object>(DataKeymap.keySet())).find(); 
     5024                                                for(Data xref :  DataList) 
     5025                                                { 
     5026                                                        DataKeymap.put(xref.getName().toString(), xref.getId()); 
     5027                                                } 
     5028                                                 
     5029                                                //resolve foreign key 'Col' (DimensionElement.name -> DimensionElement.id) 
     5030                                                List<DimensionElement> ColList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(ColKeymap.keySet())).find(); 
     5031                                                for(DimensionElement xref :  ColList) 
     5032                                                { 
     5033                                                        ColKeymap.put(xref.getName().toString(), xref.getId()); 
     5034                                                } 
     5035                                                 
     5036                                                //resolve foreign key 'Row' (DimensionElement.name -> DimensionElement.id) 
     5037                                                List<DimensionElement> RowList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(RowKeymap.keySet())).find(); 
     5038                                                for(DimensionElement xref :  RowList) 
     5039                                                { 
     5040                                                        RowKeymap.put(xref.getName().toString(), xref.getId()); 
     5041                                                } 
     5042                                                 
     5043                                                //update objects with foreign keys 
     5044                                                for(TextDataElement o:  TextDataElementList) 
     5045                                                { 
     5046                                                        if(o.getDataLabel() != null)  
     5047                                                        { 
     5048                                                                if(DataKeymap.get(o.getDataLabel()) == null) throw new Exception("Cannot find Data for Data_name '"+o.getDataLabel()+"'"); 
     5049                                                                o.setData(DataKeymap.get(o.getDataLabel())); 
     5050                                                        } 
     5051                                                        if(o.getColLabel() != null)  
     5052                                                        { 
     5053                                                                if(ColKeymap.get(o.getColLabel()) == null) throw new Exception("Cannot find DimensionElement for Col_name '"+o.getColLabel()+"'"); 
     5054                                                                o.setCol(ColKeymap.get(o.getColLabel())); 
     5055                                                        } 
     5056                                                        if(o.getRowLabel() != null)  
     5057                                                        { 
     5058                                                                if(RowKeymap.get(o.getRowLabel()) == null) throw new Exception("Cannot find DimensionElement for Row_name '"+o.getRowLabel()+"'"); 
     5059                                                                o.setRow(RowKeymap.get(o.getRowLabel())); 
     5060                                                        } 
     5061                                                } 
     5062                                                 
     5063                                                 
     5064                                                 
     5065                                                db.add(TextDataElementList); 
     5066                                                 
     5067                                                //clear for next batch                                           
     5068                                                TextDataElementList.clear(); 
     5069                                                DataKeymap.clear(); 
     5070                                                ColKeymap.clear(); 
     5071                                                RowKeymap.clear(); 
     5072                                                 
     5073                                                //keep count 
     5074                                                total.set(total.get() + BATCH_SIZE);                             
     5075                                        } 
     5076                                } 
     5077                        });      
     5078                        //resolve remaining foreign key 'Data' (Data.name -> Data.id) 
     5079                        List<Data> DataList = db.query(Data.class).in("name",new ArrayList<Object>(DataKeymap.keySet())).find(); 
     5080                        for(Data xref :  DataList) 
     5081                        { 
     5082                                DataKeymap.put(xref.getName().toString(), xref.getId()); 
     5083                        } 
     5084                         
     5085                        //resolve remaining foreign key 'Col' (DimensionElement.name -> DimensionElement.id) 
     5086                        List<DimensionElement> ColList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(ColKeymap.keySet())).find(); 
     5087                        for(DimensionElement xref :  ColList) 
     5088                        { 
     5089                                ColKeymap.put(xref.getName().toString(), xref.getId()); 
     5090                        } 
     5091                         
     5092                        //resolve remaining foreign key 'Row' (DimensionElement.name -> DimensionElement.id) 
     5093                        List<DimensionElement> RowList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(RowKeymap.keySet())).find(); 
     5094                        for(DimensionElement xref :  RowList) 
     5095                        { 
     5096                                RowKeymap.put(xref.getName().toString(), xref.getId()); 
     5097                        } 
     5098                         
     5099                        //update remaining objects with foreign keys 
     5100                        for(TextDataElement o:  TextDataElementList) 
     5101                        { 
     5102                                if(o.getDataLabel() != null)  
     5103                                { 
     5104                                        if(DataKeymap.get(o.getDataLabel()) == null) throw new Exception("Cannot find Data for Data_name '"+o.getDataLabel()+"'"); 
     5105                                        o.setData(DataKeymap.get(o.getDataLabel())); 
     5106                                } 
     5107                                if(o.getColLabel() != null)  
     5108                                { 
     5109                                        if(ColKeymap.get(o.getColLabel()) == null) throw new Exception("Cannot find DimensionElement for Col_name '"+o.getColLabel()+"'"); 
     5110                                        o.setCol(ColKeymap.get(o.getColLabel())); 
     5111                                } 
     5112                                if(o.getRowLabel() != null)  
     5113                                { 
     5114                                        if(RowKeymap.get(o.getRowLabel()) == null) throw new Exception("Cannot find DimensionElement for Row_name '"+o.getRowLabel()+"'"); 
     5115                                        o.setRow(RowKeymap.get(o.getRowLabel())); 
     5116                                } 
     5117                        } 
     5118                         
     5119                         
     5120                        db.add(TextDataElementList); 
     5121                         
     5122                        //restore original batch size 
     5123                        BATCH_SIZE = oldBatchSize; 
     5124                         
     5125                        //output count 
     5126                        total.set(total.get() + TextDataElementList.size()); 
     5127                        logger.info("imported "+total.get()+" TextDataElement from "+TextDataElementFile); 
     5128                        return "Evaluated " + total.get() + " TextDataElement items."; 
     5129                } 
     5130                else{ 
     5131                        return "File not found."; 
     5132                }         
     5133        } 
     5134        /** 
     5135         * Imports DecimalDataElement from tab/comma delimited File. 
     5136         * @param DecimalDataElementFile A tab delimited file with DecimalDataElement data. 
     5137         */ 
     5138        private static String importDecimalDataElement(final Database db, File DecimalDataElementFile, final Tuple defaults) throws DatabaseException, IOException, Exception { 
     5139                return importDecimalDataElement(db, DecimalDataElementFile, defaults, "default"); 
     5140        } 
     5141 
     5142        /** 
     5143         * Imports DecimalDataElement from tab/comma delimited File. 
     5144         * @param DecimalDataElementFile A tab delimited file with DecimalDataElement data. 
     5145         * @param dupHandling The kind of requested duplicate handling: 'default', 'ignore', 'replace' or 'delete', not specified calls 'default'. 
     5146         */ 
     5147        private static String importDecimalDataElement(final Database db, File DecimalDataElementFile, final Tuple defaults, final String dupHandling)  throws DatabaseException, IOException, Exception  
     5148        { 
     5149                if(     DecimalDataElementFile.exists() ) 
     5150                { 
     5151                        //adjust batch size for replace or delete, keep old batch size 
     5152                        int oldBatchSize = -1; 
     5153                        if (dupHandling.equals("default")) { 
     5154                                oldBatchSize = BATCH_SIZE; 
     5155                        } else { 
     5156                                oldBatchSize = BATCH_SIZE; 
     5157                                BATCH_SIZE = SMALL_BATCH_SIZE; 
     5158                        } 
     5159                        logger.info("trying to import "+DecimalDataElementFile); 
     5160                        CsvReader reader = new CsvFileReader(DecimalDataElementFile);  
     5161                         
     5162                        //cache for imported objects 
     5163                        final List<DecimalDataElement> DecimalDataElementList = new ArrayList<DecimalDataElement>(BATCH_SIZE); 
     5164                         
     5165                        //foreign key map for field 'Data' (Data.name -> Data.id)                        
     5166                        final Map<String,Integer> DataKeymap = new TreeMap<String,Integer>(); 
     5167                         
     5168                        //foreign key map for field 'Col' (DimensionElement.name -> DimensionElement.id)                         
     5169                        final Map<String,Integer> ColKeymap = new TreeMap<String,Integer>(); 
     5170                         
     5171                        //foreign key map for field 'Row' (DimensionElement.name -> DimensionElement.id)                         
     5172                        final Map<String,Integer> RowKeymap = new TreeMap<String,Integer>(); 
     5173                        final IntegerWrapper total = new IntegerWrapper(0); 
     5174                        reader.parse(new CsvReaderListener() 
     5175                        { 
     5176                                public void handleLine(int LineNo, Tuple tuple) throws Exception 
     5177                                { 
     5178                                        //parse object 
     5179                                        DecimalDataElement object = new DecimalDataElement(); 
     5180                                        object.set(tuple, false); 
     5181                                        object.set(defaults, false);  
     5182                                        //only override values that have been set. 
     5183                                        DecimalDataElementList.add(object); 
     5184                                         
     5185                                        //foreign key 'Data' (Data.name -> ?) 
     5186                                        if(object.getDataLabel() != null) DataKeymap.put(object.getDataLabel(), null);   
     5187                                         
     5188                                        //foreign key 'Col' (DimensionElement.name -> ?) 
     5189                                        if(object.getColLabel() != null) ColKeymap.put(object.getColLabel(), null);      
     5190                                         
     5191                                        //foreign key 'Row' (DimensionElement.name -> ?) 
     5192                                        if(object.getRowLabel() != null) RowKeymap.put(object.getRowLabel(), null);      
     5193                                         
     5194                                        //add in batches 
     5195                                        if(DecimalDataElementList.size() == BATCH_SIZE) 
     5196                                        { 
     5197                                                //resolve foreign key 'Data' (Data.name -> Data.id) 
     5198                                                List<Data> DataList = db.query(Data.class).in("name",new ArrayList<Object>(DataKeymap.keySet())).find(); 
     5199                                                for(Data xref :  DataList) 
     5200                                                { 
     5201                                                        DataKeymap.put(xref.getName().toString(), xref.getId()); 
     5202                                                } 
     5203                                                 
     5204                                                //resolve foreign key 'Col' (DimensionElement.name -> DimensionElement.id) 
     5205                                                List<DimensionElement> ColList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(ColKeymap.keySet())).find(); 
     5206                                                for(DimensionElement xref :  ColList) 
     5207                                                { 
     5208                                                        ColKeymap.put(xref.getName().toString(), xref.getId()); 
     5209                                                } 
     5210                                                 
     5211                                                //resolve foreign key 'Row' (DimensionElement.name -> DimensionElement.id) 
     5212                                                List<DimensionElement> RowList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(RowKeymap.keySet())).find(); 
     5213                                                for(DimensionElement xref :  RowList) 
     5214                                                { 
     5215                                                        RowKeymap.put(xref.getName().toString(), xref.getId()); 
     5216                                                } 
     5217                                                 
     5218                                                //update objects with foreign keys 
     5219                                                for(DecimalDataElement o:  DecimalDataElementList) 
     5220                                                { 
     5221                                                        if(o.getDataLabel() != null)  
     5222                                                        { 
     5223                                                                if(DataKeymap.get(o.getDataLabel()) == null) throw new Exception("Cannot find Data for Data_name '"+o.getDataLabel()+"'"); 
     5224                                                                o.setData(DataKeymap.get(o.getDataLabel())); 
     5225                                                        } 
     5226                                                        if(o.getColLabel() != null)  
     5227                                                        { 
     5228                                                                if(ColKeymap.get(o.getColLabel()) == null) throw new Exception("Cannot find DimensionElement for Col_name '"+o.getColLabel()+"'"); 
     5229                                                                o.setCol(ColKeymap.get(o.getColLabel())); 
     5230                                                        } 
     5231                                                        if(o.getRowLabel() != null)  
     5232                                                        { 
     5233                                                                if(RowKeymap.get(o.getRowLabel()) == null) throw new Exception("Cannot find DimensionElement for Row_name '"+o.getRowLabel()+"'"); 
     5234                                                                o.setRow(RowKeymap.get(o.getRowLabel())); 
     5235                                                        } 
     5236                                                } 
     5237                                                 
     5238                                                 
     5239                                                 
     5240                                                db.add(DecimalDataElementList); 
     5241                                                 
     5242                                                //clear for next batch                                           
     5243                                                DecimalDataElementList.clear(); 
     5244                                                DataKeymap.clear(); 
     5245                                                ColKeymap.clear(); 
     5246                                                RowKeymap.clear(); 
     5247                                                 
     5248                                                //keep count 
     5249                                                total.set(total.get() + BATCH_SIZE);                             
     5250                                        } 
     5251                                } 
     5252                        });      
     5253                        //resolve remaining foreign key 'Data' (Data.name -> Data.id) 
     5254                        List<Data> DataList = db.query(Data.class).in("name",new ArrayList<Object>(DataKeymap.keySet())).find(); 
     5255                        for(Data xref :  DataList) 
     5256                        { 
     5257                                DataKeymap.put(xref.getName().toString(), xref.getId()); 
     5258                        } 
     5259                         
     5260                        //resolve remaining foreign key 'Col' (DimensionElement.name -> DimensionElement.id) 
     5261                        List<DimensionElement> ColList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(ColKeymap.keySet())).find(); 
     5262                        for(DimensionElement xref :  ColList) 
     5263                        { 
     5264                                ColKeymap.put(xref.getName().toString(), xref.getId()); 
     5265                        } 
     5266                         
     5267                        //resolve remaining foreign key 'Row' (DimensionElement.name -> DimensionElement.id) 
     5268                        List<DimensionElement> RowList = db.query(DimensionElement.class).in("name",new ArrayList<Object>(RowKeymap.keySet())).find(); 
     5269                        for(DimensionElement xref :  RowList) 
     5270                        { 
     5271                                RowKeymap.put(xref.getName().toString(), xref.getId()); 
     5272                        } 
     5273                         
     5274                        //update remaining objects with foreign keys 
     5275                        for(DecimalDataElement o:  DecimalDataElementList) 
     5276                        { 
     5277                                if(o.getDataLabel() != null)  
     5278                                { 
     5279                                        if(DataKeymap.get(o.getDataLabel()) == null) throw new Exception("Cannot find Data for Data_name '"+o.getDataLabel()+"'"); 
     5280                                        o.setData(DataKeymap.get(o.getDataLabel())); 
     5281                                } 
     5282                                if(o.getColLabel() != null)  
     5283                                { 
     5284                                        if(ColKeymap.get(o.getColLabel()) == null) throw new Exception("Cannot find DimensionElement for Col_name '"+o.getColLabel()+"'"); 
     5285                                        o.setCol(ColKeymap.get(o.getColLabel())); 
     5286                                } 
     5287                                if(o.getRowLabel() != null)  
     5288                                { 
     5289                                        if(RowKeymap.get(o.getRowLabel()) == null) throw new Exception("Cannot find DimensionElement for Row_name '"+o.getRowLabel()+"'"); 
     5290                                        o.setRow(RowKeymap.get(o.getRowLabel())); 
     5291                                } 
     5292                        } 
     5293                         
     5294                         
     5295                        db.add(DecimalDataElementList); 
     5296                         
     5297                        //restore original batch size 
     5298                        BATCH_SIZE = oldBatchSize; 
     5299                         
     5300                        //output count 
     5301                        total.set(total.get() + DecimalDataElementList.size()); 
     5302                        logger.info("imported "+total.get()+" DecimalDataElement from "+DecimalDataElementFile); 
     5303                        return "Evaluated " + total.get() + " DecimalDataElement items."; 
     5304                } 
     5305                else{ 
     5306                        return "File not found."; 
     5307                }         
     5308        } 
     5309        /** 
    16705310         * Imports User_roles from tab/comma delimited File. 
    16715311         * @param User_rolesFile A tab delimited file with User_roles data. 
  • molgenis4eb/generated/sql/count_per_entity.sql

    r1980 r2022  
    1 SELECT 'experiment' AS entity, count(*) AS count FROM experiment 
    2  UNION  
    3 SELECT 'sample' AS entity, count(*) AS count FROM sample WHERE type = 'Sample' 
    4  UNION  
    5 SELECT 'specialsample' AS entity, count(*) AS count FROM sample NATURAL JOIN specialsample WHERE type = 'SpecialSample' 
    6  UNION  
    7 SELECT 'trait' AS entity, count(*) AS count FROM trait 
    8  UNION  
    9 SELECT 'measurement' AS entity, count(*) AS count FROM measurement 
    10  UNION  
    11 SELECT 'data' AS entity, count(*) AS count FROM data 
    12  UNION  
    131SELECT 'role' AS entity, count(*) AS count FROM role 
    142 UNION  
     
    197SELECT 'roleentitypermission' AS entity, count(*) AS count FROM roleentitypermission 
    208 UNION  
     9SELECT 'statistics' AS entity, count(*) AS count FROM statistics 
     10 UNION  
     11SELECT 'rna' AS entity, count(*) AS count FROM rna 
     12 UNION  
     13SELECT 'amino_acid' AS entity, count(*) AS count FROM amino_acid 
     14 UNION  
     15SELECT 'mutations' AS entity, count(*) AS count FROM mutations 
     16 UNION  
     17SELECT 'contact' AS entity, count(*) AS count FROM contact 
     18 UNION  
     19SELECT 'patient' AS entity, count(*) AS count FROM patient 
     20 UNION  
     21SELECT 'gender' AS entity, count(*) AS count FROM gender 
     22 UNION  
     23SELECT 'diagnosis' AS entity, count(*) AS count FROM diagnosis 
     24 UNION  
     25SELECT 'phenotype' AS entity, count(*) AS count FROM phenotype 
     26 UNION  
     27SELECT 'e_m' AS entity, count(*) AS count FROM e_m 
     28 UNION  
     29SELECT 'i_f' AS entity, count(*) AS count FROM i_f 
     30 UNION  
     31SELECT 'consequence' AS entity, count(*) AS count FROM consequence 
     32 UNION  
     33SELECT 'pictures' AS entity, count(*) AS count FROM pictures 
     34 UNION  
     35SELECT 'decimaldataelement' AS entity, count(*) AS count FROM decimaldataelement 
     36 UNION  
     37SELECT 'textdataelement' AS entity, count(*) AS count FROM textdataelement 
     38 UNION  
     39SELECT 'describable' AS entity, count(*) AS count FROM describable WHERE type = 'Describable' 
     40 UNION  
     41SELECT 'identifiable' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable WHERE type = 'Identifiable' 
     42 UNION  
     43SELECT 'fugedata' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugedata WHERE type = 'FugeData' 
     44 UNION  
     45SELECT 'data' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugedata NATURAL JOIN data WHERE type = 'Data' 
     46 UNION  
     47SELECT 'fugedimensionelement' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugedimensionelement WHERE type = 'FugeDimensionElement' 
     48 UNION  
     49SELECT 'fugeinvestigation' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugeinvestigation WHERE type = 'FugeInvestigation' 
     50 UNION  
     51SELECT 'investigation' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugeinvestigation NATURAL JOIN investigation WHERE type = 'Investigation' 
     52 UNION  
     53SELECT 'dimensionelement' AS entity, count(*) AS count FROM describable NATURAL JOIN identifiable NATURAL JOIN fugedimensionelement NATURAL JOIN dimensionelement WHERE type = 'DimensionElement' 
     54 UNION  
    2155SELECT 'user_roles' AS entity, count(*) AS count FROM user_roles 
    2256 
  • molgenis4eb/generated/sql/count_per_table.sql

    r1980 r2022  
    1 SELECT 'experiment' AS entity, count(*) AS count FROM Experiment 
    2  UNION  
    3 SELECT 'sample' AS entity, count(*) AS count FROM Sample 
    4  UNION  
    5 SELECT 'specialsample' AS entity, count(*) AS count FROM SpecialSample 
    6  UNION  
    7 SELECT 'trait' AS entity, count(*) AS count FROM Trait 
    8  UNION  
    9 SELECT 'measurement' AS entity, count(*) AS count FROM Measurement 
    10  UNION  
    11 SELECT 'data' AS entity, count(*) AS count FROM Data 
    12  UNION  
    131SELECT 'role' AS entity, count(*) AS count FROM Role 
    142 UNION  
     
    197SELECT 'roleentitypermission' AS entity, count(*) AS count FROM RoleEntityPermission 
    208 UNION  
     9SELECT 'statistics' AS entity, count(*) AS count FROM Statistics 
     10 UNION  
     11SELECT 'rna' AS entity, count(*) AS count FROM RNA 
     12 UNION  
     13SELECT 'amino_acid' AS entity, count(*) AS count FROM Amino_acid 
     14 UNION  
     15SELECT 'mutations' AS entity, count(*) AS count FROM Mutations 
     16 UNION  
     17SELECT 'contact' AS entity, count(*) AS count FROM Contact 
     18 UNION  
     19SELECT 'patient' AS entity, count(*) AS count FROM Patient 
     20 UNION  
     21SELECT 'gender' AS entity, count(*) AS count FROM Gender 
     22 UNION  
     23SELECT 'diagnosis' AS entity, count(*) AS count FROM Diagnosis 
     24 UNION  
     25SELECT 'phenotype' AS entity, count(*) AS count FROM Phenotype 
     26 UNION  
     27SELECT 'e_m' AS entity, count(*) AS count FROM E_M 
     28 UNION  
     29SELECT 'i_f' AS entity, count(*) AS count FROM I_F 
     30 UNION  
     31SELECT 'consequence' AS entity, count(*) AS count FROM Consequence 
     32 UNION  
     33SELECT 'pictures' AS entity, count(*) AS count FROM Pictures 
     34 UNION  
     35SELECT 'decimaldataelement' AS entity, count(*) AS count FROM DecimalDataElement 
     36 UNION  
     37SELECT 'textdataelement' AS entity, count(*) AS count FROM TextDataElement 
     38 UNION  
     39SELECT 'describable' AS entity, count(*) AS count FROM Describable 
     40 UNION  
     41SELECT 'identifiable' AS entity, count(*) AS count FROM Identifiable 
     42 UNION  
     43SELECT 'fugedata' AS entity, count(*) AS count FROM FugeData 
     44 UNION  
     45SELECT 'data' AS entity, count(*) AS count FROM Data 
     46 UNION  
     47SELECT 'fugedimensionelement' AS entity, count(*) AS count FROM FugeDimensionElement 
     48 UNION  
     49SELECT 'fugeinvestigation' AS entity, count(*) AS count FROM FugeInvestigation 
     50 UNION  
     51SELECT 'investigation' AS entity, count(*) AS count FROM Investigation 
     52 UNION  
     53SELECT 'dimensionelement' AS entity, count(*) AS count FROM DimensionElement 
     54 UNION  
    2155SELECT 'user_roles' AS entity, count(*) AS count FROM User_roles 
    2256 
  • molgenis4eb/generated/sql/create_tables.sql

    r2015 r2022  
    11/* 
    22 * Created by: org.molgenis.generators.sql.MySqlCreateSubclassPerTableGen 
    3  * Date: July 17, 2009 
     3 * Date: July 21, 2009 
    44 */ 
    55 
    66/**********CREATE TABLES**********/ 
    77SET FOREIGN_KEY_CHECKS = 0; ##allows us to drop fkeyed tables 
    8  
    9 /*Experiment implements Identifiable*/ 
    10 DROP TABLE IF EXISTS experiment; 
    11 CREATE TABLE experiment ( 
    12         id INT NOT NULL AUTO_INCREMENT 
    13         , name VARCHAR(255) NOT NULL 
    14         , description TEXT NULL 
    15         , date DATE NOT NULL 
    16         , PRIMARY KEY(id) 
    17         , UNIQUE(name) 
    18         , UNIQUE(id) 
    19 ) ENGINE=InnoDB; 
    20  
    21 /*Sample implements Identifiable*/ 
    22 DROP TABLE IF EXISTS sample; 
    23 CREATE TABLE sample ( 
    24         id INT NOT NULL AUTO_INCREMENT 
    25         , name VARCHAR(255) NOT NULL 
    26         , type ENUM('Sample','SpecialSample') NOT NULL 
    27         , species VARCHAR(255) NOT NULL DEFAULT "Arabidopsis thaliana" 
    28         , tissue VARCHAR(255) NULL 
    29         , sex ENUM('male','female','unknown') NOT NULL 
    30         , experiment INT NOT NULL 
    31         , PRIMARY KEY(id) 
    32         , UNIQUE(name) 
    33         , UNIQUE(id) 
    34 ) ENGINE=InnoDB; 
    35  
    36 /*SpecialSample extends Sample*/ 
    37 DROP TABLE IF EXISTS specialsample; 
    38 CREATE TABLE specialsample ( 
    39         detail VARCHAR(255) NOT NULL 
    40         , id INT NOT NULL 
    41         , PRIMARY KEY(id) 
    42 ) ENGINE=InnoDB; 
    43  
    44 /*Trait implements Identifiable*/ 
    45 DROP TABLE IF EXISTS trait; 
    46 CREATE TABLE trait ( 
    47         id INT NOT NULL AUTO_INCREMENT 
    48         , name VARCHAR(255) NOT NULL 
    49         , molcular BOOL NOT NULL 
    50         , experiment INT NOT NULL 
    51         , PRIMARY KEY(id) 
    52         , UNIQUE(name) 
    53         , UNIQUE(id) 
    54 ) ENGINE=InnoDB; 
    55  
    56 /*Measurement implements Identifiable*/ 
    57 DROP TABLE IF EXISTS measurement; 
    58 CREATE TABLE measurement ( 
    59         id INT NOT NULL AUTO_INCREMENT 
    60         , name VARCHAR(255) NOT NULL 
    61         , experiment INT NOT NULL 
    62         , datafile VARCHAR(1024) NOT NULL 
    63         , PRIMARY KEY(id) 
    64         , UNIQUE(name) 
    65         , UNIQUE(id) 
    66 ) ENGINE=InnoDB; 
    67  
    68 /*Data*/ 
    69 DROP TABLE IF EXISTS data; 
    70 CREATE TABLE data ( 
    71         id INT NOT NULL AUTO_INCREMENT 
    72         , measurement INT NOT NULL 
    73         , sample INT NOT NULL 
    74         , trait INT NOT NULL 
    75         , value VARCHAR(255) NOT NULL 
    76         , PRIMARY KEY(id) 
    77         , UNIQUE(measurement,sample,trait) 
    78 ) ENGINE=InnoDB; 
    798 
    809/*Role*/ 
     
    11443        , permission ENUM('read','edit') NOT NULL 
    11544        , PRIMARY KEY(id) 
     45) ENGINE=InnoDB; 
     46 
     47/*Consequence*/ 
     48DROP TABLE IF EXISTS consequence; 
     49CREATE TABLE consequence ( 
     50        id INT NOT NULL AUTO_INCREMENT 
     51        , consequence VARCHAR(255) NOT NULL 
     52        , PRIMARY KEY(id) 
     53) ENGINE=InnoDB; 
     54 
     55/*Amino_acid*/ 
     56DROP TABLE IF EXISTS amino_acid; 
     57CREATE TABLE amino_acid ( 
     58        id INT NOT NULL AUTO_INCREMENT 
     59        , codon VARCHAR(255) NOT NULL 
     60        , amino_acid VARCHAR(255) NOT NULL 
     61        , PRIMARY KEY(id) 
     62) ENGINE=InnoDB; 
     63 
     64/*RNA*/ 
     65DROP TABLE IF EXISTS rna; 
     66CREATE TABLE rna ( 
     67        id INT NOT NULL AUTO_INCREMENT 
     68        , nucleotides VARCHAR(255) NOT NULL 
     69        , exon INT NOT NULL 
     70        , codon INT NOT NULL 
     71        , PRIMARY KEY(id) 
     72) ENGINE=InnoDB; 
     73 
     74/*Mutations*/ 
     75DROP TABLE IF EXISTS mutations; 
     76CREATE TABLE mutations ( 
     77        id INT NOT NULL AUTO_INCREMENT 
     78        , nucleotide_change VARCHAR(255) NOT NULL 
     79        , amino_acid VARCHAR(255) NOT NULL 
     80        , consequence INT NULL 
     81        , PRIMARY KEY(id) 
     82        , UNIQUE(nucleotide_change) 
     83) ENGINE=InnoDB; 
     84 
     85/*Contact*/ 
     86DROP TABLE IF EXISTS contact; 
     87CREATE TABLE contact ( 
     88        id INT NOT NULL AUTO_INCREMENT 
     89        , name VARCHAR(255) NOT NULL 
     90        , address VARCHAR(255) NULL 
     91        , tel VARCHAR(255) NULL 
     92        , PRIMARY KEY(id) 
     93        , UNIQUE(name) 
     94) ENGINE=InnoDB; 
     95 
     96/*Gender*/ 
     97DROP TABLE IF EXISTS gender; 
     98CREATE TABLE gender ( 
     99        id INT NOT NULL AUTO_INCREMENT 
     100        , name VARCHAR(255) NOT NULL 
     101        , PRIMARY KEY(id) 
     102) ENGINE=InnoDB; 
     103 
     104/*Patient*/ 
     105DROP TABLE IF EXISTS patient; 
     106CREATE TABLE patient ( 
     107        id INT NOT NULL AUTO_INCREMENT 
     108        , name VARCHAR(255) NOT NULL 
     109        , age INT NULL 
     110        , alive BOOL NOT NULL DEFAULT true 
     111        , gender INT NOT NULL 
     112        , id_mutation1 INT NULL 
     113        , id_mutation2 INT NULL 
     114        , PRIMARY KEY(id) 
     115) ENGINE=InnoDB; 
     116 
     117/*Phenotype*/ 
     118DROP TABLE IF EXISTS phenotype; 
     119CREATE TABLE phenotype ( 
     120        id INT NOT NULL AUTO_INCREMENT 
     121        , description TEXT NOT NULL 
     122        , date DATE NULL 
     123        , PRIMARY KEY(id) 
     124) ENGINE=InnoDB; 
     125 
     126/*Diagnosis*/ 
     127DROP TABLE IF EXISTS diagnosis; 
     128CREATE TABLE diagnosis ( 
     129        id INT NOT NULL AUTO_INCREMENT 
     130        , value TEXT NOT NULL 
     131        , id_phenotype INT NOT NULL 
     132        , id_patient INT NOT NULL 
     133        , PRIMARY KEY(id) 
     134) ENGINE=InnoDB; 
     135 
     136/*E_M*/ 
     137DROP TABLE IF EXISTS e_m; 
     138CREATE TABLE e_m ( 
     139        id INT NOT NULL AUTO_INCREMENT 
     140        , patient INT NOT NULL 
     141        , value VARCHAR(255) NOT NULL 
     142        , anchoring_fibers VARCHAR(255) NULL 
     143        , hemi_desmosomes VARCHAR(255) NULL 
     144        , description TEXT NOT NULL 
     145        , PRIMARY KEY(id) 
     146) ENGINE=InnoDB; 
     147 
     148/*I_F*/ 
     149DROP TABLE IF EXISTS i_f; 
     150CREATE TABLE i_f ( 
     151        id INT NOT NULL AUTO_INCREMENT 
     152        , patient INT NULL 
     153        , test_lh72 VARCHAR(255) NULL 
     154        , test_2q633 VARCHAR(255) NULL 
     155        , keratine_14 VARCHAR(255) NULL 
     156        , bp180_1d1 VARCHAR(255) NULL 
     157        , niceine_gb3 VARCHAR(255) NULL 
     158        , collagen VARCHAR(255) NULL 
     159        , description TEXT NOT NULL 
     160        , PRIMARY KEY(id) 
     161) ENGINE=InnoDB; 
     162 
     163/*Statistics*/ 
     164DROP TABLE IF EXISTS statistics; 
     165CREATE TABLE statistics ( 
     166        id INT NOT NULL AUTO_INCREMENT 
     167        , mutation INT NOT NULL 
     168        , value INT NULL 
     169        , date DATE NOT NULL 
     170        , PRIMARY KEY(id) 
     171) ENGINE=InnoDB; 
     172 
     173/*Pictures*/ 
     174DROP TABLE IF EXISTS pictures; 
     175CREATE TABLE pictures ( 
     176        id INT NOT NULL AUTO_INCREMENT 
     177        , small VARCHAR(1024) NOT NULL 
     178        , large VARCHAR(1024) NOT NULL 
     179        , id_patient INT NOT NULL 
     180        , PRIMARY KEY(id) 
     181) ENGINE=InnoDB; 
     182 
     183/*Data extends FugeData*/ 
     184DROP TABLE IF EXISTS data; 
     185CREATE TABLE data ( 
     186        rowtype ENUM('Patient','Phenotype') NOT NULL 
     187        , coltype ENUM('Patient','Phenotype') NOT NULL 
     188        , valuetype ENUM('Text','Decimal') NOT NULL 
     189        , totalrows INT NOT NULL DEFAULT 0 
     190        , totalcols INT NOT NULL DEFAULT 0 
     191        , id INT NOT NULL 
     192        , name VARCHAR(127) NOT NULL 
     193        , PRIMARY KEY(id) 
     194        , UNIQUE(name) 
     195) ENGINE=InnoDB; 
     196 
     197/*Investigation extends FugeInvestigation*/ 
     198DROP TABLE IF EXISTS investigation; 
     199CREATE TABLE investigation ( 
     200        id INT NOT NULL 
     201        , name VARCHAR(127) NOT NULL 
     202        , PRIMARY KEY(id) 
     203        , UNIQUE(name) 
     204) ENGINE=InnoDB; 
     205 
     206/*DimensionElement extends FugeDimensionElement*/ 
     207DROP TABLE IF EXISTS dimensionelement; 
     208CREATE TABLE dimensionelement ( 
     209        investigation INT NOT NULL 
     210        , id INT NOT NULL 
     211        , name VARCHAR(127) NOT NULL 
     212        , type ENUM('DimensionElement') NOT NULL 
     213        , PRIMARY KEY(id) 
     214        , UNIQUE(name,investigation,type) 
     215) ENGINE=InnoDB; 
     216 
     217/*Describable*/ 
     218DROP TABLE IF EXISTS describable; 
     219CREATE TABLE describable ( 
     220        type ENUM('Describable','Data','FugeData','DimensionElement','FugeDimensionElement','Investigation','FugeInvestigation','Identifiable') NOT NULL 
     221        , id INT NOT NULL AUTO_INCREMENT 
     222        , PRIMARY KEY(id) 
     223) ENGINE=InnoDB; 
     224 
     225/*Identifiable extends Describable*/ 
     226DROP TABLE IF EXISTS identifiable; 
     227CREATE TABLE identifiable ( 
     228        name VARCHAR(127) NOT NULL 
     229        , id INT NOT NULL 
     230        , PRIMARY KEY(id) 
     231        , INDEX (name) 
     232) ENGINE=InnoDB; 
     233 
     234/*FugeData extends Identifiable*/ 
     235DROP TABLE IF EXISTS fugedata; 
     236CREATE TABLE fugedata ( 
     237        id INT NOT NULL 
     238        , PRIMARY KEY(id) 
     239) ENGINE=InnoDB; 
     240 
     241/*FugeDimensionElement extends Identifiable*/ 
     242DROP TABLE IF EXISTS fugedimensionelement; 
     243CREATE TABLE fugedimensionelement ( 
     244        id INT NOT NULL 
     245        , PRIMARY KEY(id) 
     246) ENGINE=InnoDB; 
     247 
     248/*FugeInvestigation extends Identifiable*/ 
     249DROP TABLE IF EXISTS fugeinvestigation; 
     250CREATE TABLE fugeinvestigation ( 
     251        start DATETIME NULL 
     252        , end DATETIME NULL 
     253        , id INT NOT NULL 
     254        , PRIMARY KEY(id) 
     255) ENGINE=InnoDB; 
     256 
     257/*TextDataElement implements DataElement*/ 
     258DROP TABLE IF EXISTS textdataelement; 
     259CREATE TABLE textdataelement ( 
     260        id INT NOT NULL AUTO_INCREMENT 
     261        , data INT NOT NULL 
     262        , col INT NOT NULL 
     263        , row INT NOT NULL 
     264        , rowindex INT NOT NULL 
     265        , colindex INT NOT NULL 
     266        , value TEXT NULL 
     267        , PRIMARY KEY(id) 
     268        , UNIQUE(colindex,rowindex,data) 
     269        , UNIQUE(rowindex,colindex,data) 
     270        , UNIQUE(id) 
     271) ENGINE=InnoDB; 
     272 
     273/*DecimalDataElement implements DataElement*/ 
     274DROP TABLE IF EXISTS decimaldataelement; 
     275CREATE TABLE decimaldataelement ( 
     276        id INT NOT NULL AUTO_INCREMENT 
     277        , data INT NOT NULL 
     278        , col INT NOT NULL 
     279        , row INT NOT NULL 
     280        , rowindex INT NOT NULL 
     281        , colindex INT NOT NULL 
     282        , value DOUBLE NULL 
     283        , PRIMARY KEY(id) 
     284        , UNIQUE(colindex,rowindex,data) 
     285        , UNIQUE(rowindex,colindex,data) 
     286        , UNIQUE(id) 
    116287) ENGINE=InnoDB; 
    117288 
     
    126297 
    127298/**********ADD FOREIGN KEYS**********/ 
    128 ALTER TABLE specialsample ADD FOREIGN KEY (id) REFERENCES sample (id) ON DELETE RESTRICT; 
    129  
    130 ALTER TABLE sample ADD FOREIGN KEY (experiment) REFERENCES experiment (id) ON DELETE RESTRICT; 
    131 ALTER TABLE trait ADD FOREIGN KEY (experiment) REFERENCES experiment (id) ON DELETE RESTRICT; 
    132 ALTER TABLE measurement ADD FOREIGN KEY (experiment) REFERENCES experiment (id) ON DELETE RESTRICT; 
    133 ALTER TABLE data ADD FOREIGN KEY (measurement) REFERENCES measurement (id) ON DELETE RESTRICT; 
    134 ALTER TABLE data ADD FOREIGN KEY (sample) REFERENCES sample (id) ON DELETE RESTRICT; 
    135 ALTER TABLE data ADD FOREIGN KEY (trait) REFERENCES trait (id) ON DELETE RESTRICT; 
     299ALTER TABLE data ADD FOREIGN KEY (id) REFERENCES fugedata (id) ON DELETE RESTRICT; 
     300ALTER TABLE investigation ADD FOREIGN KEY (id) REFERENCES fugeinvestigation (id) ON DELETE RESTRICT; 
     301ALTER TABLE dimensionelement ADD FOREIGN KEY (id) REFERENCES fugedimensionelement (id) ON DELETE RESTRICT; 
     302ALTER TABLE identifiable ADD FOREIGN KEY (id) REFERENCES describable (id) ON DELETE RESTRICT; 
     303ALTER TABLE fugedata ADD FOREIGN KEY (id) REFERENCES identifiable (id) ON DELETE RESTRICT; 
     304ALTER TABLE fugedimensionelement ADD FOREIGN KEY (id) REFERENCES identifiable (id) ON DELETE RESTRICT; 
     305ALTER TABLE fugeinvestigation ADD FOREIGN KEY (id) REFERENCES identifiable (id) ON DELETE RESTRICT; 
     306 
    136307ALTER TABLE roleentitypermission ADD FOREIGN KEY (role) REFERENCES role (id) ON DELETE RESTRICT; 
    137308ALTER TABLE roleentitypermission ADD FOREIGN KEY (entity) REFERENCES entity (id) ON DELETE RESTRICT; 
     309ALTER TABLE rna ADD FOREIGN KEY (codon) REFERENCES amino_acid (id) ON DELETE RESTRICT; 
     310ALTER TABLE mutations ADD FOREIGN KEY (consequence) REFERENCES consequence (id) ON DELETE RESTRICT; 
     311ALTER TABLE patient ADD FOREIGN KEY (gender) REFERENCES gender (id) ON DELETE RESTRICT; 
     312ALTER TABLE patient ADD FOREIGN KEY (id_mutation1) REFERENCES mutations (id) ON DELETE RESTRICT; 
     313ALTER TABLE patient ADD FOREIGN KEY (id_mutation2) REFERENCES mutations (id) ON DELETE RESTRICT; 
     314ALTER TABLE diagnosis ADD FOREIGN KEY (id_phenotype) REFERENCES phenotype (id) ON DELETE RESTRICT; 
     315ALTER TABLE diagnosis ADD FOREIGN KEY (id_patient) REFERENCES patient (id) ON DELETE RESTRICT; 
     316ALTER TABLE e_m ADD FOREIGN KEY (patient) REFERENCES patient (id) ON DELETE RESTRICT; 
     317ALTER TABLE i_f ADD FOREIGN KEY (patient) REFERENCES patient (id) ON DELETE RESTRICT; 
     318ALTER TABLE statistics ADD FOREIGN KEY (mutation) REFERENCES mutations (id) ON DELETE RESTRICT; 
     319ALTER TABLE pictures ADD FOREIGN KEY (id_patient) REFERENCES patient (id) ON DELETE RESTRICT; 
     320ALTER TABLE dimensionelement ADD FOREIGN KEY (investigation) REFERENCES investigation (id) ON DELETE RESTRICT; 
     321ALTER TABLE textdataelement ADD FOREIGN KEY (data) REFERENCES data (id) ON DELETE RESTRICT; 
     322ALTER TABLE textdataelement ADD FOREIGN KEY (col) REFERENCES dimensionelement (id) ON DELETE RESTRICT; 
     323ALTER TABLE textdataelement ADD FOREIGN KEY (row) REFERENCES dimensionelement (id) ON DELETE RESTRICT; 
     324ALTER TABLE decimaldataelement ADD FOREIGN KEY (data) REFERENCES data (id) ON DELETE RESTRICT; 
     325ALTER TABLE decimaldataelement ADD FOREIGN KEY (col) REFERENCES dimensionelement (id) ON DELETE RESTRICT; 
     326ALTER TABLE decimaldataelement ADD FOREIGN KEY (row) REFERENCES dimensionelement (id) ON DELETE RESTRICT; 
    138327ALTER TABLE user_roles ADD FOREIGN KEY (role) REFERENCES role (id) ON DELETE RESTRICT; 
    139328ALTER TABLE user_roles ADD FOREIGN KEY (user) REFERENCES user (id) ON DELETE RESTRICT; 
  • molgenis4eb/generated/sql/insert_metadata.sql

    r1980 r2022  
    11delete from molgenis_fieldmetadata; 
    2 delete from molgenis_entitymetadata; 
    3 INSERT INTO molgenis_entitymetadata(name,classname) values ("Experiment","example.data.types.Experiment"); 
    4 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Description", "Optional description text" from molgenis_entitymetadata where name="Experiment"; 
    5 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Date", "Creation date, with an automatic default to 'today'" from molgenis_entitymetadata where name="Experiment"; 
    6 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number (autoid)" from molgenis_entitymetadata where name="Experiment"; 
    7 INSERT INTO molgenis_entitymetadata(name,classname) values ("Sample","example.data.types.Sample"); 
    8 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "type", "Subtypes have to be set to allow searching" from molgenis_entitymetadata where name="Sample"; 
    9 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Species", "Species, default to Arabidopsis" from molgenis_entitymetadata where name="Sample"; 
    10 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Tissue", "Optional specification of tissue" from molgenis_entitymetadata where name="Sample"; 
    11 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Sex", "Fixed choice on Sex" from molgenis_entitymetadata where name="Sample"; 
    12 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Experiment", "Samples are part-of one experiment (by cross reference to Experiment.id)" from molgenis_entitymetadata where name="Sample"; 
    13 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number (autoid)" from molgenis_entitymetadata where name="Sample"; 
    14 INSERT INTO molgenis_entitymetadata(name,classname) values ("SpecialSample","example.data.types.SpecialSample"); 
    15 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "detail", "" from molgenis_entitymetadata where name="SpecialSample"; 
    16 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number (autoid)" from molgenis_entitymetadata where name="SpecialSample"; 
    17 INSERT INTO molgenis_entitymetadata(name,classname) values ("Trait","example.data.types.Trait"); 
    18 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Molcular", "Indication whether this is a molecular trait" from molgenis_entitymetadata where name="Trait"; 
    19 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Experiment", "Traits are defined per experiment (by cross reference to Experiment.id)" from molgenis_entitymetadata where name="Trait"; 
    20 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number (autoid)" from molgenis_entitymetadata where name="Trait"; 
    21 INSERT INTO molgenis_entitymetadata(name,classname) values ("Measurement","example.data.types.Measurement"); 
    22 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Experiment", "Measurements are part-of one experiment" from molgenis_entitymetadata where name="Measurement"; 
    23 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "DataFile", "A file attachment that summarizes the results" from molgenis_entitymetadata where name="Measurement"; 
    24 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number (autoid)" from molgenis_entitymetadata where name="Measurement"; 
    25 INSERT INTO molgenis_entitymetadata(name,classname) values ("Data","example.data.types.Data"); 
    26 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Id", "autogenerated id number" from molgenis_entitymetadata where name="Data"; 
    27 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Measurement", "Data values are part-of one Measurement" from molgenis_entitymetadata where name="Data"; 
    28 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Sample", "The sample this measurement is on" from molgenis_entitymetadata where name="Data"; 
    29 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Trait", "The trait this measurement is on" from molgenis_entitymetadata where name="Data"; 
    30 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Value", "The value measured/calculated" from molgenis_entitymetadata where name="Data"; 
    31 INSERT INTO molgenis_entitymetadata(name,classname) values ("Role","example.data.types.Role"); 
    32 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "id", "" from molgenis_entitymetadata where name="Role"; 
    33 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "name", "" from molgenis_entitymetadata where name="Role"; 
    34 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "superuser", "" from molgenis_entitymetadata where name="Role"; 
    35 INSERT INTO molgenis_entitymetadata(name,classname) values ("User","example.data.types.User"); 
    36 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "id", "" from molgenis_entitymetadata where name="User"; 
    37 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "name", "" from molgenis_entitymetadata where name="User"; 
    38 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "password", "" from molgenis_entitymetadata where name="User"; 
    39 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "roles", "Roles that this user has adopted. Its rights are inherited." from molgenis_entitymetadata where name="User"; 
    40 INSERT INTO molgenis_entitymetadata(name,classname) values ("Entity","example.data.types.Entity"); 
    41 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "id", "" from molgenis_entitymetadata where name="Entity"; 
    42 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "className", "Full name of the data type" from molgenis_entitymetadata where name="Entity"; 
    43 INSERT INTO molgenis_entitymetadata(name,classname) values ("RoleEntityPermission","example.data.types.RoleEntityPermission"); 
    44 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "id", "" from molgenis_entitymetadata where name="RoleEntityPermission"; 
    45 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "role", "" from molgenis_entitymetadata where name="RoleEntityPermission"; 
    46 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "entity", "" from molgenis_entitymetadata where name="RoleEntityPermission"; 
    47 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "permission", "" from molgenis_entitymetadata where name="RoleEntityPermission"; 
    48 INSERT INTO molgenis_entitymetadata(name,classname) values ("User_roles","example.data.types.User_roles"); 
    49 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "Role", "" from molgenis_entitymetadata where name="User_roles"; 
    50 INSERT INTO molgenis_fieldmetadata(entity,name,description) SELECT id, "User", "" from molgenis_entitymetadata where name="User_roles"; 
     2INSERT INTO molgenisuser(name,password,superuser) values ("admin","admin",true); 
     3INSERT INTO molgenisentity(name,classname) values ("Role","molgenis4eb.data.types.Role"); 
     4INSERT INTO molgenisentity(name,classname) values ("User","molgenis4eb.data.types.User"); 
     5INSERT INTO molgenisentity(name,classname) values ("Entity","molgenis4eb.data.types.Entity"); 
     6INSERT INTO molgenisentity(name,classname) values ("RoleEntityPermission","molgenis4eb.data.types.RoleEntityPermission"); 
     7INSERT INTO molgenisentity(name,classname) values ("Statistics","molgenis4eb.data.types.Statistics"); 
     8INSERT INTO molgenisentity(name,classname) values ("RNA","molgenis4eb.data.types.RNA"); 
     9INSERT INTO molgenisentity(name,classname) values ("Amino_acid","molgenis4eb.data.types.Amino_acid"); 
     10INSERT INTO molgenisentity(name,classname) values ("Mutations","molgenis4eb.data.types.Mutations"); 
     11INSERT INTO molgenisentity(name,classname) values ("Contact","molgenis4eb.data.types.Contact"); 
     12INSERT INTO molgenisentity(name,classname) values ("Patient","molgenis4eb.data.types.Patient"); 
     13INSERT INTO molgenisentity(name,classname) values ("Gender","molgenis4eb.data.types.Gender"); 
     14INSERT INTO molgenisentity(name,classname) values ("Diagnosis","molgenis4eb.data.types.Diagnosis"); 
     15INSERT INTO molgenisentity(name,classname) values ("Phenotype","molgenis4eb.data.types.Phenotype"); 
     16INSERT INTO molgenisentity(name,classname) values ("E_M","molgenis4eb.data.types.E_M"); 
     17INSERT INTO molgenisentity(name,classname) values ("I_F","molgenis4eb.data.types.I_F"); 
     18INSERT INTO molgenisentity(name,classname) values ("Consequence","molgenis4eb.data.types.Consequence"); 
     19INSERT INTO molgenisentity(name,classname) values ("Pictures","molgenis4eb.data.types.Pictures"); 
     20INSERT INTO molgenisentity(name,classname) values ("DecimalDataElement","molgenis4eb.data.types.DecimalDataElement"); 
     21INSERT INTO molgenisentity(name,classname) values ("TextDataElement","molgenis4eb.data.types.TextDataElement"); 
     22INSERT INTO molgenisentity(name,classname) values ("Describable","molgenis4eb.data.types.Describable"); 
     23INSERT INTO molgenisentity(name,classname) values ("Identifiable","molgenis4eb.data.types.Identifiable"); 
     24INSERT INTO molgenisentity(name,classname) values ("FugeData","molgenis4eb.data.types.FugeData"); 
     25INSERT INTO molgenisentity(name,classname) values ("Data","molgenis4eb.data.types.Data"); 
     26INSERT INTO molgenisentity(name,classname) values ("FugeDimensionElement","molgenis4eb.data.types.FugeDimensionElement"); 
     27INSERT INTO molgenisentity(name,classname) values ("FugeInvestigation","molgenis4eb.data.types.FugeInvestigation"); 
     28INSERT INTO molgenisentity(name,classname) values ("Investigation","molgenis4eb.data.types.Investigation"); 
     29INSERT INTO molgenisentity(name,classname) values ("DimensionElement","molgenis4eb.data.types.DimensionElement"); 
     30INSERT INTO molgenisentity(name,classname) values ("User_roles","molgenis4eb.data.types.User_roles"); 
  • molgenis4eb/handwritten/java/plugin/login/DatabaseLogin.java

    r2015 r2022  
    1 package plugin.login; 
     1/*package plugin.login; 
    22 
    33import java.text.ParseException; 
     
    1313import org.molgenis.util.Entity; 
    1414 
    15  
    16 public class DatabaseLogin implements Security 
    17 { 
    18         enum Permission 
    19         { 
     15public class DatabaseLogin implements Security { 
     16        enum Permission { 
    2017                read, edit 
    2118        }; 
    2219 
    23         /** The current use that has been authenticated (if any) */ 
     20        *//** The current use that has been authenticated (if any) *//* 
    2421        MolgenisUser user; 
    25         /** Map to quickly retrieve a permission */ 
     22        *//** Map to quickly retrieve a permission *//* 
    2623        Map<String, Permission> permissionMap = new TreeMap<String, Permission>(); 
    27         /** for logging */ 
     24        *//** for logging *//* 
    2825        Logger logger = Logger.getLogger(this.getClass().getSimpleName()); 
    2926 
    30         public DatabaseLogin() 
    31         { 
    32         } 
    33  
    34         @Override 
    35         public QueryRule getRowlevelSecurityFilters(Entity entity) 
    36         { 
    37  
    38                  
    39         } 
    40  
    41         @Override 
    42         public Integer getUserId() 
    43         { 
    44                 if (user != null) return user.getId(); 
     27        public DatabaseLogin() { 
     28        } 
     29 
     30        @Override 
     31        public QueryRule getRowlevelSecurityFilters(Entity entity) { 
     32 
     33        } 
     34 
     35        @Override 
     36        public Integer getUserId() { 
     37                if (user != null) 
     38                        return user.getId(); 
    4539                return null; 
    4640        } 
    4741 
    4842        @Override 
    49         public String getUserName() 
    50         { 
    51                 if (user != null) return user.getNaam(); 
     43        public String getUserName() { 
     44                if (user != null) 
     45                        return user.getNaam(); 
    5246                return null; 
    5347        } 
    5448 
    5549        @Override 
    56         public <E extends Entity> boolean hasEditPermission(Class<E> entityClass) 
    57         { 
    58                 logger.debug("Checking edit permission for entity " + entityClass.getName()); 
    59                 if (user != null && user.getSuperuser()) return true; 
     50        public <E extends Entity> boolean hasEditPermission(Class<E> entityClass) { 
     51                logger.debug("Checking edit permission for entity " 
     52                                + entityClass.getName()); 
     53                if (user != null && user.getSuperuser()) 
     54                        return true; 
    6055                if (permissionMap.get(entityClass.getName()) != null 
    61                                 && permissionMap.get(entityClass.getName()).equals(Permission.edit)) 
    62                 { 
     56                                && permissionMap.get(entityClass.getName()).equals( 
     57                                                Permission.edit)) { 
    6358                        logger.debug("true"); 
    6459                        return true; 
     
    6863 
    6964        @Override 
    70         public <E extends Entity> boolean hasReadPermission(Class <E> entityClass) 
    71         { 
    72                 //logger.debug("Checking read permission for entity " + entityClass.getName()); 
    73                 if (user != null && user.getSuperuser()) return true; 
    74                 if (this.hasEditPermission(entityClass) || permissionMap.get(entityClass.getName()) != null 
    75                                 && permissionMap.get(entityClass.getName()).equals(Permission.read)) 
    76                 { 
    77                         //logger.debug("true"); 
     65        public <E extends Entity> boolean hasReadPermission(Class<E> entityClass) { 
     66                // logger.debug("Checking read permission for entity " + 
     67                // entityClass.getName()); 
     68                if (user != null && user.getSuperuser()) 
     69                        return true; 
     70                if (this.hasEditPermission(entityClass) 
     71                                || permissionMap.get(entityClass.getName()) != null 
     72                                && permissionMap.get(entityClass.getName()).equals( 
     73                                                Permission.read)) { 
     74                        // logger.debug("true"); 
    7875                        return true; 
    7976                } 
     
    8178        } 
    8279 
    83  
    84         @Override 
    85         public boolean isAuthenticated() 
    86         { 
     80        @Override 
     81        public boolean isAuthenticated() { 
    8782                return user != null; 
    8883        } 
    8984 
    9085        @Override 
    91         public boolean login(Database db, String name, String password) 
    92         { 
     86        public boolean login(Database db, String name, String password) { 
    9387                // username is required 
    94                 if (name == null || "".equals(name)) return false; 
     88                if (name == null || "".equals(name)) 
     89                        return false; 
    9590                // password is required 
    96                 if (password == null || "".equals(password)) return false; 
    97  
    98                 try 
    99                 { 
     91                if (password == null || "".equals(password)) 
     92                        return false; 
     93 
     94                try { 
    10095                        MolgenisUser example = new MolgenisUser(); 
    10196                        example.setNaam(name); 
     
    10499                        example.setType(null); 
    105100                        List<MolgenisUser> users = db.findByExample(example); 
    106                         if (users.size() == 1 && users.get(0).getNaam().equals(name) && users.get(0).getPassword().equals(password)) 
    107                         { 
     101                        if (users.size() == 1 && users.get(0).getNaam().equals(name) 
     102                                        && users.get(0).getPassword().equals(password)) { 
    108103                                user = users.get(0); 
    109104                                this.reload(db); 
    110105                                return true; 
    111106                        } 
    112                 } 
    113                 catch (Exception e) 
    114                 { 
     107                } catch (Exception e) { 
    115108                        e.printStackTrace(); 
    116109                } 
     
    119112 
    120113        @Override 
    121         public void logout() 
    122         { 
     114        public void logout() { 
    123115                this.user = null; 
    124116                this.permissionMap.clear(); 
     
    126118 
    127119        @Override 
    128         public void reload(Database db) throws DatabaseException, ParseException 
    129         { 
    130                 if (this.user == null) return; 
    131  
    132 //              // get the groups this user is member of 
    133 //              groups = db.query(MolgenisUserGroup.class).equals("members", user.getId()).find(); 
     120        public void reload(Database db) throws DatabaseException, ParseException { 
     121                if (this.user == null) 
     122                        return; 
     123 
     124                // // get the groups this user is member of 
     125                // groups = db.query(MolgenisUserGroup.class).equals("members", 
     126                // user.getId()).find(); 
    134127 
    135128                // create the permissions map 
    136129                permissionMap = new TreeMap<String, Permission>(); 
    137130 
    138 //              for (MolgenisUserGroup group : groups) 
    139 //              { 
    140 //                      // get the editable entities 
    141 //                      if (group.getAllowedToEdit().size() > 0) 
    142 //                      { 
    143 //                              List<MolgenisEntity> editableEntities = db.query(MolgenisEntity.class).in("id", 
    144 //                                              group.getAllowedToEdit()).find(); 
    145 //                              for (MolgenisEntity entity : editableEntities) 
    146 //                              { 
    147 //                                      permissionMap.put(entity.getClassName(), Permission.edit); 
    148 //                              } 
    149 //                      } 
    150 //                      // get the viewable entities 
    151 //                      if (group.getAllowedToView().size() > 0) 
    152 //                      { 
    153 //                              List<MolgenisEntity> viewableEntities = db.query(MolgenisEntity.class).in("id", 
    154 //                                              group.getAllowedToView()).find(); 
    155 //                              for (MolgenisEntity entity : viewableEntities) 
    156 //                              { 
    157 //                                      // only add if not already editable permission 
    158 //                                      if (permissionMap.get(entity.getClassName()) == null) 
    159 //                                      { 
    160 //                                              permissionMap.put(entity.getClassName(), Permission.read); 
    161 //                                      } 
    162 //                              } 
    163 //                      } 
    164 //              } 
     131                // for (MolgenisUserGroup group : groups) 
     132                // { 
     133                // // get the editable entities 
     134                // if (group.getAllowedToEdit().size() > 0) 
     135                // { 
     136                // List<MolgenisEntity> editableEntities = 
     137                // db.query(MolgenisEntity.class).in("id", 
     138                // group.getAllowedToEdit()).find(); 
     139                // for (MolgenisEntity entity : editableEntities) 
     140                // { 
     141                // permissionMap.put(entity.getClassName(), Permission.edit); 
     142                // } 
     143                // } 
     144                // // get the viewable entities 
     145                // if (group.getAllowedToView().size() > 0) 
     146                // { 
     147                // List<MolgenisEntity> viewableEntities = 
     148                // db.query(MolgenisEntity.class).in("id", 
     149                // group.getAllowedToView()).find(); 
     150                // for (MolgenisEntity entity : viewableEntities) 
     151                // { 
     152                // // only add if not already editable permission 
     153                // if (permissionMap.get(entity.getClassName()) == null) 
     154                // { 
     155                // permissionMap.put(entity.getClassName(), Permission.read); 
     156                // } 
     157                // } 
     158                // } 
     159                // } 
    165160 
    166161                logger.debug(toString()); 
    167162        } 
    168163 
    169         public String toString() 
    170         { 
     164        public String toString() { 
    171165                StringBuffer result = new StringBuffer(); 
    172166                result.append("Login(user=" + this.getUserName() + " roles="); 
    173 //              for (int i = 0; i < groups.size(); i++) 
    174 //              { 
    175 //                      if (i > 0) result.append("," + groups.get(i).getName()); 
    176 //                      else 
    177 //                              result.append(groups.get(i).getName()); 
    178 //              } 
    179 //              for (String key : permissionMap.keySet()) 
    180 //              { 
    181 //                      result.append(" " + key + "=" + permissionMap.get(key)); 
    182 //              } 
    183 //              result.append(")"); 
     167                // for (int i = 0; i < groups.size(); i++) 
     168                // { 
     169                // if (i > 0) result.append("," + groups.get(i).getName()); 
     170                // else 
     171                // result.append(groups.get(i).getName()); 
     172                // } 
     173                // for (String key : permissionMap.keySet()) 
     174                // { 
     175                // result.append(" " + key + "=" + permissionMap.get(key)); 
     176                // } 
     177                // result.append(")"); 
    184178 
    185179                return result.toString(); 
     
    187181 
    188182        @Override 
    189         public boolean isLoginRequired() 
    190         { 
    191                 return false; 
    192         } 
    193  
    194         @Override 
    195         public <E extends Entity> boolean hasEditPermission(E entity) throws DatabaseException 
    196         { 
     183        public boolean isLoginRequired() { 
     184                return false; 
     185        } 
     186 
     187        @Override 
     188        public <E extends Entity> boolean hasEditPermission(E entity) 
     189                        throws DatabaseException { 
     190                // TODO Auto-generated method stub 
     191                return false; 
     192        } 
     193 
     194        @Override 
     195        public <E extends Entity> boolean editAllowed(Class<E> entityClass) 
     196                        throws DatabaseException { 
     197                // TODO Auto-generated method stub 
     198                return false; 
     199        } 
     200 
     201        @Override 
     202        public <E extends Entity> boolean editAllowed(E entity) 
     203                        throws DatabaseException { 
     204                // TODO Auto-generated method stub 
     205                return false; 
     206        } 
     207 
     208        @Override 
     209        public <E extends Entity> boolean readAllowed(Class<E> entityClass) { 
    197210                // TODO Auto-generated method stub 
    198211                return false; 
    199212        } 
    200213} 
     214*/ 
  • molgenis4eb/handwritten/java/plugin/login/UserLogin.java

    r2015 r2022  
    44 *  
    55 * THIS FILE IS A TEMPLATE. PLEASE EDIT :-) 
    6  */ 
     6  
    77 
    88package plugin.login; 
    99 
    1010import org.molgenis.framework.Database; 
    11 import org.molgenis.framework.auth.Login; 
    1211import org.molgenis.framework.html.ActionInput; 
    1312import org.molgenis.framework.html.Form; 
     
    1918import org.molgenis.util.Tuple; 
    2019 
    21 /** 
     20*//** 
    2221 * This screen shows a login box, or if someone is already logged in, the user 
    2322 * information and a logout button. 
    24  */ 
     23 *//* 
    2524public class UserLogin extends PluginScreen 
    2625{ 
     
    104103        } 
    105104} 
     105*/ 
  • molgenis4eb/molgenis.properties

    r1997 r2022  
    44 
    55############################################################### 
    6 # 1. FILES DESCRIBING YOUR DESIGN USING MOLGENIS XML LANGUAGE  
     6# 1. FILES DESCRIBING THE DESIGN 
    77# can be multiple files ',' separated 
    88############################################################### 
    99 
    10 # xml file with data model in terms of 'entity' descriptions 
    11 model_database = molgenis_db.xml 
     10# xml file with entity descriptions 
     11model_database = molgenis_db_xgapnized.xml 
    1212 
    13 # xml file with user screen descriptions in terms of 'form', 'menu',.. 
     13# xml file with user screen descriptions 
     14#model_userinterface = molgenis_ui.xml,test_ui.xml 
    1415model_userinterface = molgenis_ui.xml 
    1516 
     
    1920 
    2021# MySQL: 
    21 # jdbc compatible connection parameters to a database (see doc of database supplier) 
     22#jdbc compatible connection parameters to a database (see doc of database supplier) 
    2223db_driver = com.mysql.jdbc.Driver 
    2324db_user = molgenis 
    2425db_password = molgenis 
    25 db_uri= jdbc:mysql://localhost/molgenis?innodb_autoinc_lock_mode=2 
    26 db_jndiname = jdbc/molgenisdb 
     26db_uri= jdbc:mysql://localhost/molgenis4eb?innodb_autoinc_lock_mode=2 
     27db_jndiname = jdbc/molgenis4eb 
     28 
     29#path where attached files should be stored (if <field type="file" ...> is used) 
     30db_filepath = null 
     31 
     32# HypersonicSQL: embedded, experimental! 
     33#db_driver = org.hsqldb.jdbcDriver 
     34#db_user = sa 
     35#db_password =  
     36#db_uri = jdbc:hsqldb:file:/database/molgenisdb 
    2737 
    2838# PostgreSQL: experimental! 
    29 # jdbc compatible connection parameters to a database (see doc of database supplier) 
    30 # db_driver = org.postgresql.Driver 
    31 # db_user = molgenis 
    32 # db_password = molgenis 
    33 # db_uri = jdbc:postgresql://localhost/molgenis 
    34  
    35 # HypersonicSQL: embedded and filebased system, experimental! 
    36 # jdbc compatible connection parameters to a database (see doc of database supplier) 
    37 # db_driver = org.hsqldb.jdbcDriver 
    38 # db_user = sa 
    39 # db_password =  
    40 # db_uri = jdbc:hsqldb:file:/database/molgenisdb 
    41  
    42 #absolute path where attached files should be stored (if <field type="file" ...> is used) 
    43 db_filepath = attachedfiles 
     39#db_driver = org.hsqldb.jdbcDriver 
     40#db_user = sa 
     41#db_password =  
     42#db_uri = jdbc:hsqldb:file:/database/molgenisdb 
    4443 
    4544############################################################### 
     
    4847 
    4948# select components to be generated 
    50 ############################################################### 
     49############################ 
    5150generate_data = true 
    5251generate_gui = true 
     
    5655 
    5756# Output options  
    58 ############################################################### 
     57################ 
    5958 
    6059# the directory where the source files are generated into 
     
    6968output_hand = handwritten/java 
    7069 
    71 # advanced generator options 
    72 ############################################################### 
    73  
     70# more generator options 
    7471exclude_system = true 
    75  
    76 # use mysql optimized statements instead of prepared statements (mysql only) 
     72# use mysql optimized statements instead of prepared statements 
    7773mysql_multiquery = true 
    78  
    79 # mapping strategy of inheritance on database tables (subclass_per_tabel, class_per_table, hierarchy_per_table) 
     74# mapping of inheritance on database tables 
    8075mapping_type = subclass_per_table 
  • molgenis4eb/molgenis_db.xml

    r1990 r2022  
    1 <?xml version="1.0" encoding="UTF-8"?> 
    2 <!--DOCTYPE molgenis PUBLIC "MOLGENIS 1.0" "http://molgenis.sourceforge.net/dtd/molgenis_v_1_0.dtd"--> 
    3 <molgenis name="example" label="My First MOLGENIS"> 
     1<?xml version="1.0" encoding="iso-8859-1"?> 
     2<molgenis name="molgenis4eb" label="Col7A1 Database"> 
    43        <description>This is an minimal example database to show how 
    5                 MOLGENIS works. The purpose of this example database is to 
    6                 administrate experiment, samples, traits and measurements. The 
    7                 name='example' will result in a Java package 'example' being 
    8                 generated.</description> 
    9         <!-- abstract data types --> 
    10         <entity name="Identifiable" abstract="true"> 
    11                 <description>For modeling purposes only (denoted by 
    12                         abstract='true', this entity defines fields id and name centrally. 
    13                 </description> 
    14                 <field name="Id" type="autoid" description="autogenerated id number (autoid)" /> 
    15                 <field name="Name" unique="true" readonly="true" 
    16                         description="unique, user provided name string" /> 
    17         </entity> 
    18         <!-- experiment structure --> 
    19         <entity name="Experiment" implements="Identifiable"> 
    20                 <description>Summary of an experiment.</description> 
    21                 <field name="Description" type="text" nillable="true" 
    22                         description="Optional description text" /> 
    23                 <field name="Date" type="date" auto="true" 
    24                         description="Creation date, with an automatic default to 'today'" /> 
    25         </entity> 
    26         <!-- sample description structure --> 
    27         <entity name="Sample" implements="Identifiable"> 
    28                 <description>Samples that are part of an experiment. 
    29                 </description> 
    30                 <field name="Species" default="Arabidopsis thaliana" 
    31                         description="Species, default to Arabidopsis" /> 
    32                 <field name="Tissue" nillable="true" description="Optional specification of tissue" /> 
    33                 <field name="Sex" type="enum" enum_options="[male,female,unknown]" 
    34                         description="Fixed choice on Sex" /> 
    35                 <field name="Experiment" type="xref" xref_field="Experiment.Id" 
    36                         xref_label="Name" 
    37                         description="Samples are part-of one experiment (by cross reference to Experiment.id)" /> 
    38         </entity> 
    39         <entity name="SpecialSample" extends="Sample"> 
    40                 <field name="detail" /> 
    41         </entity> 
    42         <!-- trait description structure --> 
    43         <entity name="Trait" implements="Identifiable"> 
    44                 <description>Traits that are studied in this experiment. 
    45                 </description> 
    46                 <field name="Molcular" type="bool" 
    47                         description="Indication whether this is a molecular trait" /> 
    48                 <field name="Experiment" type="xref" xref_field="Experiment.Id" 
    49                         xref_label="Name" 
    50                         description="Traits are defined per experiment (by cross reference to Experiment.id)" /> 
    51         </entity> 
    52         <!-- trait description structure --> 
    53         <entity name="Measurement" implements="Identifiable"> 
    54                 <description>Measurements (i.e. set of trait observations 
    55                         per sample) that are part of an experiment.</description> 
    56                 <field name="Experiment" type="xref" xref_field="Experiment.Id" 
    57                         xref_label="Name" description="Measurements are part-of one experiment" /> 
    58                 <field name="DataFile" type="file" 
    59                         description="A file attachment that summarizes the results" /> 
    60         </entity> 
    61         <entity name="Data"> 
    62                 <description>Data values (observations) of a measurement. Note: 
    63                         Data doesn't inherit from Identifiable because it has no unique name. 
    64                 </description> 
    65                 <field name="Id" type="autoid" description="autogenerated id number" /> 
    66                 <field name="Measurement" type="xref" xref_field="Measurement.id" 
    67                         xref_label="Name" description="Data values are part-of one Measurement" /> 
    68                 <field name="Sample" type="xref" xref_field="Sample.Id" 
    69                         xref_label="Name" description="The sample this measurement is on" /> 
    70                 <field name="Trait" type="xref" xref_field="Trait.Id" 
    71                         xref_label="Name" description="The trait this measurement is on" /> 
    72                 <field name="Value" description="The value measured/calculated" /> 
    73                 <unique fields="Measurement,Sample,Trait" description="There can be only one value per Sample X Trait" /> 
    74         </entity> 
     4                MOLGENIS works. The purpose of this example database is to administrate 
     5                experiment, samples, traits and measurements. The name='example' will result 
     6                in a Java package 'example' being generated.</description> 
     7                 
     8   
    759        <!-- prototyping of security --> 
    7610        <entity name="Role"> 
    7711                <field name="id" type="autoid" /> 
    7812                <field name="name" unique="true" /> 
    79                 <field name="superuser" type="bool" default="false" /> 
     13                <field name="superuser" type="bool" default="false"/> 
    8014        </entity> 
     15         
    8116        <entity name="User"> 
    8217                <field name="id" type="autoid" /> 
    8318                <field name="name" unique="true" /> 
    8419                <field name="password" /> 
    85                 <field name="roles" type="mref" nillable="true" xref_field="Role.id" 
    86                         xref_label="name" 
     20                <field name="roles" type="mref" nillable="true" xref_field="Role.id" xref_label="name" 
    8721                        description="Roles that this user has adopted. Its rights are inherited." /> 
    8822        </entity> 
     23         
    8924        <entity name="Entity"> 
    9025                <description>Catalog of entity names</description> 
     
    9227                <field name="className" description="Full name of the data type" /> 
    9328        </entity> 
     29         
    9430        <entity name="RoleEntityPermission"> 
    9531                <description>Assign rights on entities to roles.</description> 
     
    9935                        xref_label="className" /> 
    10036                <field name="permission" type="enum" enum_options="[read,edit]" /> 
     37        </entity>  
     38          
     39        <!-- entity name="Reference"> 
     40                <field name="id" type="autoid" /> 
     41                <field name="name" /> 
     42                <field name="description" /> 
     43                <field name="pubmed_nb" type="text" /> 
     44                <field name="patient" type="bool" default="false"/> 
     45        </entity> --> 
     46         
     47        <entity name="Statistics" > 
     48                <field name="id" type="autoid" /> 
     49                <field name="mutation" type="xref" xref_field="Mutations.id" xref_label="nucleotide_change" /> 
     50                <field name="value" type="int" nillable="true"/> 
     51                <field name="date" type="date" /> 
    10152        </entity> 
     53                 
     54        <!-- <entity name="Homologues" > 
     55                <field name="homologue_id" type="autoid" /> 
     56                <field name="species" type="xref" xref_entity="Species" xref_field="id" xref_label="name" /> 
     57                <field name="seq_name" /> 
     58                <field name="seq_type" /> 
     59                <field name="reference" type="xref" xref_field="Reference.id" xref_label="id" nillable="true" /> 
     60                <field name="acc_number" unique="true" /> 
     61                <field name="related" type="bool" /> 
     62        </entity> --> 
     63                 
     64        <entity name="RNA" > 
     65                <field name="id" type="autoid" /> 
     66                <field name="nucleotides"  type="string" /> 
     67                <field name="exon" type="int" /> 
     68                <field name="Codon"  type="xref" xref_field="Amino_acid.id" xref_label="codon" /> 
     69                 
     70        </entity> 
     71         
     72        <entity name="Amino_acid" > 
     73                <field name="id" type="autoid" /> 
     74                <field name="codon" type="string" /> 
     75                <field name="amino_acid" type="string" /> 
     76                 
     77        </entity> 
     78         
     79        <entity name="Mutations" > 
     80                <description> Here are all mutations known</description> 
     81                <field name="id" type="autoid" /> 
     82                <!-- <field name="Exon" type="xref" xref_field="RNA.exon" /> 
     83                <field name="domain" type="xref" xref_field="Protein.id" xref_label="name" /> --> 
     84                <field name="nucleotide_change" unique="true"  /> 
     85                <field name="amino_acid" /> 
     86                <field name="consequence" type="xref" xref_field="Consequence.id" xref_label="consequence" nillable="true" /> 
     87        </entity> 
     88 
     89        <!-- <entity name="OMIM" > 
     90                <description>Summary of OMIM info.</description> 
     91                <field name="id" type="autoid" nillable="true"/> 
     92                <field name="symbol" type="text"/> 
     93                <field name="topic" type="text" /> 
     94                <field name="McKusick_catalog_number" type="int" /> 
     95        </entity> --> 
     96         
     97        <entity name="Contact" > 
     98                <field name="id" type="autoid" /> 
     99                <field name="name" unique="true" /> 
     100                <field name="address" nillable="true"/> 
     101                <field name="tel" nillable="true"/> 
     102        </entity> 
     103         
     104        <entity name="Patient"> 
     105                <field name="id" type="autoid" /> 
     106                <field name="name" type="string"/> 
     107                <field name="age" type="int" nillable="true"/> 
     108                <field name="alive" type="bool" default="true" /> 
     109                <field name="gender" type="xref" xref_field="Gender.id" xref_label="name" /> 
     110                <field name="id_mutation1" type="xref" xref_field="Mutations.id" xref_label="nucleotide_change" nillable="true"/> 
     111                <field name="id_mutation2" type="xref" xref_field="Mutations.id" xref_label="nucleotide_change" nillable="true"/> 
     112        </entity> 
     113         
     114        <entity name="Gender" > 
     115                <field name="id" type="autoid" /> 
     116                <field name="name" type="string" /> 
     117        </entity> 
     118         
     119        <entity name="Diagnosis" > 
     120                <field name="id" type="autoid" /> 
     121                <field name="value" type="text" /> 
     122                <field name="id_phenotype" type="xref" xref_field="Phenotype.id" xref_label="Description" /> 
     123                <field name="id_patient" type="xref" xref_field="Patient.id" xref_label="name" /> 
     124         
     125        </entity> 
     126         
     127        <entity name="Phenotype" > 
     128                <field name="id" type="autoid" /> 
     129                <field name="Description" type="text" /> 
     130                <field name="Date" type="date" nillable="true" /> 
     131        </entity> 
     132         
     133        <entity name="E_M" > 
     134                <field name="id" type="autoid" /> 
     135                <field name="patient" type="xref" xref_field="Patient.id" xref_label="name" /> 
     136                <field name="value" /> 
     137                <field name="Anchoring_fibers" nillable="true" /> 
     138                <field name="Hemi_desmosomes" nillable="true" /> 
     139                <field name="description" type="text" /> 
     140        </entity> 
     141         
     142        <entity name="I_F" > 
     143                <field name="id" type="autoid" /> 
     144                <field name="patient" type="xref" xref_field="Patient.id" xref_label="name" nillable="true"/> 
     145                <field name="test_LH72" nillable="true" /> 
     146                <field name="test_2Q633" nillable="true" /> 
     147                <field name="keratine_14" nillable="true" /> 
     148                <field name="BP180_1D1" nillable="true" /> 
     149                <field name="Niceine_GB3" nillable="true" /> 
     150                <field name="Collagen" nillable="true" /> 
     151                <field name="description" type="text" /> 
     152        </entity> 
     153         
     154        <entity name="Consequence" > 
     155                <field name="id" type="autoid" /> 
     156                <field name="consequence" /> 
     157        </entity> 
     158         
     159        <entity name="Pictures" > 
     160                <field name="id" type="autoid" /> 
     161                <field name="small" type="file" /> 
     162                <field name="large" type="file" /> 
     163                <field name="id_patient" type="xref" xref_field="Patient.id" xref_label="name" /> 
     164        </entity> 
     165         
     166 
    102167</molgenis> 
  • molgenis4eb/molgenis_ui.xml

    r1996 r2022  
    1 <?xml version="1.0" encoding="UTF-8"?> 
    2 <!--DOCTYPE molgenis PUBLIC "MOLGENIS 1.0" "http://molgenis.sourceforge.net/dtd/molgenis_v_1_0.dtd"--> 
    3 <molgenis name="example"> 
    4         <form name="Experiment" entity="Experiment"> 
    5                 <menu name="ExperimentMenu"> 
    6                         <form name="Samples" entity="Sample" view="list" /> 
    7                         <form name="Traits" entity="Trait" view="list" /> 
    8                         <form name="Measurements" entity="Measurement"> 
    9                                 <form name="Data" entity="Data" /> 
    10                         </form> 
    11                 </menu> 
    12         </form> 
    13         <menu name="pluginexamples" label="Plugin examples"> 
     1<?xml version="1.0" encoding="iso-8859-1"?> 
     2<molgenis name="molgenis4eb"> 
     3        <!-- <form name="Experiment" entity="Experiment"> --> 
     4        <menu name="MenuTest"> 
     5                <form name="RNA" entity="RNA" /> 
     6                <form name="Amino_acid" entity="Amino_acid" /> 
     7                <form name="Patient" entity="Patient" /> 
     8                <form name="Mutations" entity="Mutations" /> 
     9                <!--form name="Diagnosis" entity="Diagnosis" /--> 
     10                <form name="Phenotype" entity="Phenotype" /> 
     11                <form name="Consequence" entity="Consequence" /> 
     12                <form name="E_M" entity="E_M" /> 
     13                <form name="I_F" entity="I_F" /> 
     14                <form name="Statistics" entity="Statistics" /> 
     15                <form name="Picture_Management" entity="Pictures" /> 
     16                 
     17        </menu><!--  
     18         </form>  
     19          menu name="pluginexamples" label="Plugin examples"> 
    1420                <plugin name="Google" type="plugin.examples.portal.PortalIntegrationPlugin" /> 
    1521                <plugin name="HelloWorld" type="plugin.examples.helloworld.HelloWorldPlugin" /> 
    1622                <plugin name="ExperimentQuery" type="plugin.examples.dbquery.ExperimentQueryPlugin" /> 
    17         </menu> 
    18         <!-- <report name="alldata" fields="sample.name,trait.name,measurement.value" 
    19                 labels="sample,trait,value" /> 
    20         <report name="bigvalues"> 
    21                 <output name="sample.name" /> 
    22                 <output name="trait.name" /> 
    23                 <output name="measurement.value" /> 
    24                 <fiter>measurement.value &gt; 10</fiter> 
    25                 </report> 
    26         <report name="countsamples" fields="investigation.name,count(sample.id)"/> --> 
    27         <!-- plugin name="martview" type="plugin.query.view.MartView"/--> 
     23        </menu>  
     24         
     25        --> 
     26                <plugin name="RNA" type="plugin.myplugin.MyPlugin2"/> 
     27                <plugin name="Patient_information" type="plugin.myplugin.MyPlugin3"/> 
     28                <!--form name="Matrices" entity="Data"> 
     29                        <plugin name="MatrixView" type="plugin.matrix.MatrixViewPlugin"/> 
     30                </form--> 
     31                 
    2832</molgenis> 
Note: See TracChangeset for help on using the changeset viewer.