Changeset 458


Ignore:
Timestamp:
May 25, 2010, 11:18:21 AM (9 years ago)
Author:
roberth
Message:

Subject class changed again to improve performance. Also updated bootstrap in order to keep the study capture wizard running

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r455 r458  
    1919                // define timezone
    2020                System.setProperty('user.timezone', 'CET')
    21 
    22                 // Ontologies must be connected to the templatefields in runtime
    23                 // because the Ontology.findByNcboId is not available otherwise
    24                 //TemplateEntity.getField( Subject.domainFields, 'species' ).ontologies = [Ontology.findByNcboId(1132)]
    25                 TemplateEntity.getField( Sample.domainFields, 'material' ).ontologies = [Ontology.findByNcboId(1005)]
    2621
    2722                // we could also check if we are in development by GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT
     
    740735                        }
    741736                }
     737
     738                // Ontologies must be connected to the templatefields in runtime
     739                // because the Ontology.findByNcboId is not available otherwise
     740                TemplateEntity.getField( Subject.domainFields, 'species' ).ontologies = [Ontology.findByNcboId(1132)]
     741                TemplateEntity.getField( Sample.domainFields, 'material' ).ontologies = [Ontology.findByNcboId(1005)]
     742
    742743        }
    743744
  • trunk/grails-app/domain/dbnp/studycapturing/Subject.groovy

    r455 r458  
    2121         * @return List
    2222         */
    23         List<TemplateField> giveDomainFields() {
     23        List<TemplateField> giveDomainFields() { return Subject.domainFields; }
     24
     25        static List<TemplateField> domainFields =
    2426                [
    2527                        new TemplateField(
     
    3133                                name: 'species',
    3234                                type: TemplateFieldType.ONTOLOGYTERM,
    33                                 ontologies: [Ontology.findByNcboId(1132)],
    3435                                comment: "The species name is based on the NEWT ontology; if a species is missing, please add it to the ontology using 'add more'")
    3536                ]
    36         }
    3737}
Note: See TracChangeset for help on using the changeset viewer.