forked from jmuilu/molgenis_distro
-
Notifications
You must be signed in to change notification settings - Fork 1
/
molgenis_db.xml
77 lines (77 loc) · 4.1 KB
/
molgenis_db.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<!--
DOCTYPE molgenis PUBLIC "MOLGENIS 1.0"
"http://molgenis.sourceforge.net/dtd/molgenis_v_1_0.dtd"
-->
<molgenis name="example" label="My MOLGENIS">
<description>This is an minimal example database to show how MOLGENIS works.
The purpose of this example database is to administrate experiment, samples,
traits and measurements. The name='example' will result in a Java package
'example' being generated.</description>
<!-- abstract data types -->
<entity name="Identifiable" abstract="true">
<description>For modeling purposes only (denoted by abstract='true', this
entity defines fields id and name centrally.</description>
<field name="Id" type="autoid" description="autogenerated id number (autoid)" />
<field name="Name" unique="true" readonly="true"
description="unique, user provided name string" />
</entity>
<!-- experiment structure -->
<entity name="Experiment" implements="Identifiable" xref_label="Name">
<description>Summary of an experiment.</description>
<field name="Description" type="text" nillable="true"
description="Optional description text" />
<field name="CreationDate" type="date" auto="true"
description="Creation date, with an automatic default to 'today'" />
</entity>
<!-- sample description structure -->
<entity name="Sample" implements="Identifiable">
<description>Samples that are part of an experiment.</description>
<field name="Experiment" type="xref" xref_field="Experiment.Id"
xref_label="Name"
description="Samples are part-of one experiment (by cross reference to Experiment.id)" />
<field name="Species" default="Arabidopsis thaliana" description="Species, default to Arabidopsis" />
<field name="Tissue" nillable="true" description="Optional specification of tissue" />
<field name="Sex" type="enum" enum_options="[male,female,unknown]"
description="Fixed choice on Sex" />
<field name="SampleTime" type="datetime" auto="true" />
<unique fields="Experiment,Name"/>
</entity>
<entity name="SpecialSample" extends="Sample">
<field name="detail" />
</entity>
<!-- trait description structure -->
<entity name="Trait" implements="Identifiable">
<description>Traits that are studied in this experiment.</description>
<field name="Molecular" type="bool"
description="Indication whether this is a molecular trait" />
<field name="Experiment" type="xref" xref_field="Experiment.Id"
xref_label="Name"
description="Traits are defined per experiment (by cross reference to Experiment.id)" />
</entity>
<!-- trait description structure -->
<entity name="Data">
<description>Data values (observations) of a measurement. Note: Data doesn't
inherit from Identifiable because it has no unique name.</description>
<field name="Id" type="autoid" description="autogenerated id number" />
<field name="Experiment" type="xref" xref_field="Experiment.Id"
xref_label="Name" description="Measurements are part-of one experiment" />
<field name="Sample" type="xref" xref_field="Sample.Id" xref_label="Experiment_Name,Name"
description="The sample this measurement is on" />
<field name="Trait" type="xref" xref_field="Trait.Id" xref_label="Name"
description="The trait this measurement is on" />
<field name="Value" description="The value measured/calculated" />
<unique fields="Experiment,Sample,Trait" description="There can be only one value per Sample X Trait" />
</entity>
<entity name="AggregateData">
<description>Data on multiple samples in one go.</description>
<field name="Id" type="autoid" description="autogenerated id number" />
<field name="Experiment" type="xref" xref_field="Experiment.Id"
xref_label="Name" description="Measurements are part-of one experiment" />
<field name="Samples" type="mref" xref_field="Sample.Id" xref_label="Name"
description="The samples this measurement is on" />
<field name="Trait" type="xref" xref_field="Trait.Id" xref_label="Name"
description="The trait this measurement is on" />
<field name="Value" description="The value measured/calculated" />
</entity>
</molgenis>