source: trunk/grails-app/domain/dbnp/studycapturing/Assay.groovy @ 934

Last change on this file since 934 was 934, checked in by j.saito@…, 11 years ago

Adjusted CommunicationManager? to match closer with CommunicationManager? in SAM.
Added support for "token" notation of REST services directly in Study and Assay domain classes.
Cleaned up and tested communication further.

  • Property svn:keywords set to Author Rev Date
File size: 1.6 KB
Line 
1package dbnp.studycapturing
2
3/**
4 * This class describes an Assay, which describes the application of a certain (omics) measurement to multiple samples.
5 * The actual data of these measurements are described in submodules of dbNP. The type property describes in which module
6 * this data can be found.
7 */
8class Assay extends TemplateEntity {
9        // The name of the assay, which should indicate the measurements represented in this assay to the user.
10        String name
11
12        // The dbNP module in which the assay omics data can be found. */
13        AssayModule module
14
15        // The assay ID which is used in the dbNP submodule which contains the actual omics data of this assay.
16        // This ID is generated in GSCF, but is used in the submodules to refer to this particular Assay.
17        String externalAssayID
18
19        /**
20         * return the domain fields for this domain class
21         * @return List
22         */
23        static List<TemplateField> giveDomainFields() { return Assay.domainFields }
24        static List<TemplateField> domainFields = [
25                new TemplateField(
26                        name: 'name',
27                        type: TemplateFieldType.STRING,
28                        preferredIdentifier: true,
29                        required: true
30                ),
31                new TemplateField(
32                        name: 'module',
33                        type: TemplateFieldType.MODULE
34
35                ),
36                new TemplateField(
37                        name: 'externalAssayID',
38                        type: TemplateFieldType.STRING
39                )
40        ]
41
42        // An Assay always belongs to one study.
43        static belongsTo = [parent: Study]
44
45        // An Assay can have many samples on which it is performed, but all samples should be within the 'parent' Study.
46        static hasMany = [samples: Sample]
47
48        static constraints = {
49                externalAssayID(unique: true)
50        }
51
52        def String toString() {
53                return name;
54        }
55
56    def getToken() {
57                return externalAssayID
58    }
59}
Note: See TracBrowser for help on using the repository browser.