Ignore:
Timestamp:
Apr 23, 2010, 11:26:57 AM (11 years ago)
Author:
keesvb
Message:

added giveDomainFields to TemplateEntity? entities, fixed some problems in BootStrap?

Location:
trunk/grails-app/domain/dbnp/studycapturing
Files:
6 edited

Legend:

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

    r370 r375  
    2424           }
    2525        })
     26        }
     27
     28        Map giveDomainFields() {
     29                return ['startTime':TemplateFieldType.DATE,'endTime':TemplateFieldType.DATE]
    2630        }
    2731
  • trunk/grails-app/domain/dbnp/studycapturing/Sample.groovy

    r359 r375  
    1616        // a member that describes the quantity of the sample? --> should be in the templates
    1717
     18        Map giveDomainFields() {
     19                return ['name':TemplateFieldType.STRING,'material':TemplateFieldType.ONTOLOGYTERM]
     20        }
     21
    1822        static constraints = {
    1923                parentSubject(nullable:true)
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r370 r375  
    2323        //String ecCode
    2424
     25        Map giveDomainFields() {
     26                return ['title':TemplateFieldType.STRING,'startDate':TemplateFieldType.DATE]
     27        }
    2528
    2629        static hasMany = [
  • trunk/grails-app/domain/dbnp/studycapturing/Subject.groovy

    r359 r375  
    1515        String name
    1616        Term species
     17
     18        Map giveDomainFields() {
     19                return ['name':TemplateFieldType.STRING,'species':TemplateFieldType.ONTOLOGYTERM]
     20        }
    1721}
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r370 r375  
    357357         * @return key-value pairs describing the built-in fields, with the names as keys and type (as TemplateFieldType) as values
    358358         */
    359         def giveDomainFields() {
     359        abstract Map giveDomainFields()
     360        /*def giveDomainFields() {
    360361                def fieldSet = [:];
    361362                if (super.hasProperty('name')) {
     
    363364                }
    364365                return fieldSet;
    365         }
     366        }*/
    366367
    367368        // See revision 237 for ideas about initializing the different templateField Maps
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy

    r359 r375  
    1818        List listEntries
    1919
    20     static hasMany = [listEntries : TemplateFieldListItem,
    21                 // to store the entries to choose from when the type is 'item from predefined list'
     20    static hasMany = [listEntries :
     21                TemplateFieldListItem, // to store the entries to choose from when the type is 'item from predefined list'
    2222                ontologies : Ontology // to store the ontologies to choose from when the type is 'ontology term'
    2323        ]
    2424       
    2525        static constraints = {
    26                 name(unique: true)
     26                // TODO: verify that TemplateField names are unique within templates of each super entity
    2727                unit(nullable: true, blank: true)
    2828                comment(nullable:true, blank: true)
Note: See TracChangeset for help on using the changeset viewer.