Changeset 136 for trunk/grails-app/conf
- Timestamp:
- Jan 26, 2010, 10:48:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r135 r136 24 24 // ontologies 25 25 def speciesOntology = new Ontology( 26 name: ' Species',27 shortName: ' Species',26 name: 'NCBI Taxonomy', 27 shortName: 'Taxon', 28 28 url: 'http://www.obofoundry.org/cgi-bin/detail.cgi?id=ncbi_taxonomy' 29 29 ).save() … … 51 51 */ 52 52 53 // define template fields54 def genotypeTemplateField = new TemplateSubjectField(55 name: 'Genotype',56 type: TemplateFieldType.STRINGLIST57 ).save()58 59 53 // Mouse template 60 54 def mouseTemplate = new Template( 61 55 name: 'Mouse' 62 ).addToSubjectFields(genotypeTemplateField).save() 56 ).addToSubjectFields(new TemplateSubjectField( 57 name: 'Genotype',type: TemplateFieldType.STRINGLIST)) 58 .addToSubjectFields(new TemplateSubjectField( 59 name: 'Age',type: TemplateFieldType.NUMBER) 60 ).save() 63 61 64 62 // studies 65 new Study(title:"test",code:"code",researchQuestion:"Rquestion",description:"description",ecCode:"ecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save() 63 def exampleStudy = new Study( 64 title:"NuGO PPS3 mouse study leptin module", 65 code:"PPS3_leptin_module", 66 researchQuestion:"Leptin etc.", 67 description:"C57Bl/6 mice were fed a high fat (45 en%) or low fat (10 en%) diet after a four week run-in on low fat diet. After 1 week 10 mice that received a low fat diet were given an IP leptin challenge and 10 mice of the low-fat group received placebo injections. The same procedure was performed with mice that were fed the high-fat diet. After 4 weeks the procedure was repeated. In total 80 mice were culled.", 68 ecCode:"2007117.c", 69 startDate: Date.parse('yyyy-MM-dd','2007-12-11')) 70 def x=1 71 12.times { 72 exampleStudy.addToSubjects(new Subject( 73 name: "A" + x++, 74 species: mouseTerm, 75 templateStringFields: ["Genotype" : "C57/Bl6j"], 76 templateNumberFields: ["Age" : 17F] 77 ))} 78 exampleStudy.save() 79 66 80 new Study(title:"example",code:"Excode",researchQuestion:"ExRquestion",description:"Exdescription",ecCode:"ExecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save() 67 81 new Study(title:"testAgain",code:"testcode",researchQuestion:"testRquestion",description:"testdescription",ecCode:"testCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
Note: See TracChangeset
for help on using the changeset viewer.