Changeset 84

Show
Ignore:
Timestamp:
13-01-10 13:55:45 (4 years ago)
Author:
keesvb
Message:

updated domain classes: added comments, carried out some normalization

Location:
trunk
Files:
5 added
16 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Assay.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     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 */ 
    38class Assay { 
    49 
  • trunk/grails-app/domain/dbnp/studycapturing/AssayType.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * Enum describing the different assay types (aka omics submodules). 
     5 */ 
    36public enum AssayType { 
    47    TRANSCRIPTOMICS('Transcriptomics'), 
  • trunk/grails-app/domain/dbnp/studycapturing/EventDescription.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * Description of an event. Actual events are described by instances of the Event class. 
     5 * For the moment, EventDescription is not linked to a specific study or user. 
     6 * This means that the user can add events of all possible event types as defined by the (global) EventDescription collection. 
     7 */ 
    38class EventDescription { 
    49 
  • trunk/grails-app/domain/dbnp/studycapturing/Event.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The Event class describes an actual event, as it has happened to a certain subject. Often, the same event occurs 
     5 * to multiple subjects at the same time. That is why the actual description of the event is factored out into a more 
     6 * general EventDescription class. Events that also lead to sample(s) should be instantiated as SamplingEvents. 
     7 */ 
    38class Event { 
    49 
  • trunk/grails-app/domain/dbnp/studycapturing/Ontology.groovy

    r80 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * This class describes an existing ontology, of which terms can be stored (actually 'cached' would be a better description) 
     5 * in the (global) Term store. 
     6 */ 
    37class Ontology { 
    48 
  • trunk/grails-app/domain/dbnp/studycapturing/Protocol.groovy

    r80 r84  
    44 * Class describing the available protocols in the database, and their respective protocol parameters 
    55 * Concrete instances of protocol application (and parameter values) should be stored as ProtocolInstance 
     6 * For the moment, there is one global Protocol store. From user experience, it should become clear if this store 
     7 * has to remain global or should be bound to specific templates, users, user groups or even studies. 
    68 */ 
    79class Protocol { 
  • trunk/grails-app/domain/dbnp/studycapturing/ProtocolInstance.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * Class describing a concrete application of a protocol (which goes with numbers/values for the protocol parameters). 
     5 */ 
    36class ProtocolInstance { 
    47 
  • trunk/grails-app/domain/dbnp/studycapturing/ProtocolParameter.groovy

    r80 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The ProtocolParameter class describes a protocol parameter, and belongs to the Protocol class. 
     5 * Actual values of this parameter are stored in the corresponding field of the ProtocolInstance class. 
     6 */ 
    37class ProtocolParameter { 
    48 
     
    913    Term reference 
    1014 
    11     static hasMany = [listEntries : String] 
     15    static hasMany = [listEntries : String] // to store the entries to choose from when the type is 'item from predefined list' 
    1216 
    1317    static constraints = { 
  • trunk/grails-app/domain/dbnp/studycapturing/ProtocolParameterType.groovy

    r80 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * Enum describing the type of a protocol parameter. 
     5 */ 
    36public enum ProtocolParameterType { 
    47    STRING('String'), 
     
    1619    } 
    1720 
     21 
     22    // It would be nice to see the description string in the scaffolding, 
     23    // and the following works, but then the item cannot be saved properly. 
     24    // TODO: find a way to display the enum description but save the enum value in the scaffolding 
    1825    /*def String toString() { 
    1926        return this.name 
  • trunk/grails-app/domain/dbnp/studycapturing/Sample.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The Sample class describes an actual sample which results from a SamplingEvent. 
     5 */ 
    36class Sample { 
    47 
    5     String name 
     8    // TODO: should Sample also carry a reference to its parent study, 
     9    // or should this be inferred via the parent SamplingEvent? 
     10 
     11    // TODO: should Sample also carry a reference to its parent subject, 
     12    // or should this be inferred via the parent SamplingEvent? 
     13 
     14    String name // should be unique with respect to the parent study (which can be inferred 
    615    Term material 
    716 
  • trunk/grails-app/domain/dbnp/studycapturing/SamplingEvent.groovy

    r81 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The SamplingEvent class describes a sampling event, an event that also results in one or more samples. 
     5 */ 
    36class SamplingEvent extends Event { 
    47 
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r77 r84  
    1717    Template template 
    1818 
    19     static hasMany = [ editors : nimble.User, subjects: Subject, protocols: Protocol ] 
     19    static hasMany = [ editors : nimble.User, readers : nimble.User, 
     20            subjects: Subject, groups : SubjectGroup, 
     21            events: Event, samplingEvents : SamplingEvent] 
    2022 
    2123    static constraints = { 
  • trunk/grails-app/domain/dbnp/studycapturing/Subject.groovy

    r77 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * This domain class describes the subjects in a study. 
     5 */ 
    36class Subject { 
    47 
    5     Study study 
    68    String name 
    79    Term species 
  • trunk/grails-app/domain/dbnp/studycapturing/SubjectGroup.groovy

    r77 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * This class describes groupings in the subjects of a study. 
     5 */ 
    36class SubjectGroup { 
    4  
    5     Study study 
    67 
    78    static hasMany = [ subjects : Subject] 
  • trunk/grails-app/domain/dbnp/studycapturing/Template.groovy

    r80 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The Template class describes a study template, which is basically an extension of the study capture entities 
     5 * in terms of extra fields (described by classes that extend the TemplateField class). 
     6 * At this moment, only extension of the subject entity is implemented. 
     7 */ 
    38class Template { 
    49 
    510    String name 
    611    nimble.User owner 
     12 
     13    static hasMany = [subjectFields : TemplateSubjectField] 
    714   
    815    static constraints = { 
  • trunk/grails-app/domain/dbnp/studycapturing/Term.groovy

    r80 r84  
    11package dbnp.studycapturing 
    22 
     3/** 
     4 * The Term object describes a term in the ontology that is referred to in other entities such as events. 
     5 * The Term object should point to an existing term in an online ontology, therefore instances of this class can also 
     6 * be seen as a cache of elements of the external ontology. 
     7 */ 
    38class Term { 
    49