Changeset 569 for trunk/grails-app/conf


Ignore:
Timestamp:
Jun 16, 2010, 2:57:34 PM (11 years ago)
Author:
duh
Message:
  • commit related to bug # 107

-- extended Ontology domain class with a getOrCreateOntologyByNcboId(...) method which can be used as a replacement for findByNcboId(...). This method now returns the Ontology if it exists, or creates it (by using the bioportal webservices) on the fly.
-- changed the runtime bootstrap 'hack' to use getOrCreateOntologyByNcboId(...) instead
-- removed the ontology create code from the TemplateEditor? (added in #567)

File:
1 edited

Legend:

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

    r567 r569  
    11061106
    11071107                        }
    1108 
    1109                         // Ontologies must be connected to the templatefields in runtime
    1110                         // because the Ontology.findByNcboId is not available otherwise
    1111                         TemplateEntity.getField(Subject.domainFields, 'species').ontologies = [Ontology.findByNcboId(1132)]
    1112                         TemplateEntity.getField(Sample.domainFields, 'material').ontologies = [Ontology.findByNcboId(1005)]
    11131108                }
     1109
     1110                // attach ontologies in runtime
     1111                // @see dbnp.studycapturing.Subject
     1112                // @See dbnp.studycapturing.Sample
     1113                TemplateEntity.getField(Subject.domainFields, 'species').ontologies = [Ontology.getOrCreateOntologyByNcboId(1132)]
     1114                TemplateEntity.getField(Sample.domainFields, 'material').ontologies = [Ontology.getOrCreateOntologyByNcboId(1005)]
    11141115        }
    11151116
Note: See TracChangeset for help on using the changeset viewer.