Last change
on this file since 92 was
92,
checked in by duh, 14 years ago
|
- added sample template data in bootstrap
- upgraded jQuery
- improved study capture wizard
- fixed selenium test
|
-
Property svn:keywords set to
Date Author Rev
|
File size:
1.4 KB
|
Line | |
---|
1 | import org.codehaus.groovy.grails.commons.GrailsApplication |
---|
2 | import grails.util.GrailsUtil |
---|
3 | import dbnp.studycapturing.* |
---|
4 | import intient.nimble.InstanceGenerator |
---|
5 | |
---|
6 | /** |
---|
7 | * Application Bootstrapper |
---|
8 | * @Author Jeroen Wesbeek |
---|
9 | * @Since 20091021 |
---|
10 | * |
---|
11 | * Revision information: |
---|
12 | * $Rev: 92 $ |
---|
13 | * $Author: duh $ |
---|
14 | * $Date: 2010-01-19 13:25:45 +0000 (di, 19 jan 2010) $ |
---|
15 | */ |
---|
16 | class BootStrap { |
---|
17 | def init = {servletContext -> |
---|
18 | if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) { |
---|
19 | printf("development bootstrapping....\n\n"); |
---|
20 | |
---|
21 | // ontologies |
---|
22 | def speciesOntology = new Ontology( |
---|
23 | name: 'Species', |
---|
24 | shortName: 'Species', |
---|
25 | url: 'http://www.obofoundry.org/cgi-bin/detail.cgi?id=ncbi_taxonomy' |
---|
26 | ).save() |
---|
27 | |
---|
28 | // terms |
---|
29 | def mouseTerm = new Term( |
---|
30 | name: 'Mus musculus', |
---|
31 | ontology: speciesOntology, |
---|
32 | accession: '10090' |
---|
33 | ).save() |
---|
34 | def humanTerm = new Term( |
---|
35 | name: 'Homo sapiens', |
---|
36 | ontology: speciesOntology, |
---|
37 | accession: '9606' |
---|
38 | ).save() |
---|
39 | |
---|
40 | // create system user |
---|
41 | /* |
---|
42 | def systemUser = userService.createUser(InstanceGenerator.user( |
---|
43 | username: 'system', |
---|
44 | pass: 'system', |
---|
45 | passConfirm: 'system', |
---|
46 | enabled: true |
---|
47 | )) |
---|
48 | */ |
---|
49 | |
---|
50 | // define template fields |
---|
51 | def genotypeTemplateField = new TemplateSubjectField( |
---|
52 | name: 'Genotype', |
---|
53 | type: TemplateFieldType.STRINGLIST |
---|
54 | ).save() |
---|
55 | |
---|
56 | // Mouse template |
---|
57 | def mouseTemplate = new Template( |
---|
58 | name: 'Mouse' |
---|
59 | ).addToSubjectFields(genotypeTemplateField).save() |
---|
60 | } |
---|
61 | } |
---|
62 | |
---|
63 | def destroy = { |
---|
64 | } |
---|
65 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.