Changeset 816 for trunk/grails-app/conf
- Timestamp:
- Aug 17, 2010, 12:09:35 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r812 r816 38 38 // If in development mode and no studies are present, add example studies 39 39 if (Study.count() == 0 && grails.util.GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) { 40 BootStrapStudies.addExampleStudies() 40 // check if special file is present in project directory 41 if ((new File(System.properties['user.dir']+"/.skip-studies").exists())) { 42 // yes it is, skip study bootstrapping 43 println ".skipping study bootstrapping" 44 45 // get species ontology 46 def speciesOntology = Ontology.getOrCreateOntologyByNcboId(1132) 47 48 // add terms 49 def mouseTerm = new Term( 50 name: 'Mus musculus', 51 ontology: speciesOntology, 52 accession: '10090' 53 ).with { if (!validate()) { errors.each { println it} } else save()} 54 55 def humanTerm = new Term( 56 name: 'Homo sapiens', 57 ontology: speciesOntology, 58 accession: '9606' 59 ).with { if (!validate()) { errors.each { println it} } else save()} 60 } else { 61 // general study boostrapping 62 BootStrapStudies.addExampleStudies() 63 } 41 64 } 42 65
Note: See TracChangeset
for help on using the changeset viewer.