Ignore:
Timestamp:
Jul 19, 2010, 4:28:10 PM (12 years ago)
Author:
keesvb
Message:

restructured BootStrap?, it should now run faster because there are no BioPortal? connections, and it adds sample studies in development mode (outcomment the addExampleStudies call in the BootStrap? if you don't want that). Renamed TemplateEntity?.getFieldType to giveFieldType and added tests to SampleTests? for the method.

File:
1 edited

Legend:

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

    r626 r662  
    1414class BootStrapTemplates {
    1515
     16        /**
     17         * Add the ontologies that are necessary for the templates below manually
     18         * This function can be called to avoid the HTTP requests to BioPortal each time
     19         * (e.g. in development or automated test environments)
     20         */
     21        public static void initTemplateOntologies() {
     22
     23                // add Subject>species ontology
     24                println ".adding NCBI species ontology"
     25                def speciesOntology = new Ontology(
     26                        name: 'NCBI organismal classification',
     27                        description: 'A taxonomic classification of living organisms and associated artifacts for their controlled description within the context of databases.',
     28                        url: 'http://www.ncbi.nlm.nih.gov/Taxonomy/taxonomyhome.html/',
     29                        versionNumber: '1.2',
     30                        ncboId: '1132',
     31                        ncboVersionedId: '38802'
     32                ).with { if (!validate()) { errors.each { println it} } else save()}
     33
     34                // add Sample>material ontology
     35                println ".adding BRENDA source material ontology"
     36                def brendaOntology = new Ontology(
     37                        name: 'BRENDA tissue / enzyme source',
     38                        description: 'A structured controlled vocabulary for the source of an enzyme. It comprises terms for tissues, cell lines, cell types and cell cultures from uni- and multicellular organisms.',
     39                        url: 'http://www.brenda-enzymes.info',
     40                        versionNumber: '1.3',
     41                        ncboId: '1005',
     42                        ncboVersionedId: '40643'
     43                ).with { if (!validate()) { errors.each { println it} } else save()}
     44
     45                // add NCI ontology which is used in Mouse genotype template field
     46                def nciOntology = new Ontology(
     47                        name: 'NCI Thesaurus',
     48                        description: 'A vocabulary for clinical care, translational and basic research, and public information and administrative activities.',
     49                        url: 'http://ncicb.nci.nih.gov/core/EVS',
     50                        versionNumber: '10.01',
     51                        ncboId: '1032',
     52                        ncboVersionedId: '42693'
     53                ).with { if (!validate()) { errors.each { println it} } else save()}
     54
     55                // add CHEBI ontology which is used in Mouse genotype template field
     56                def chebiOntology = new Ontology(
     57                        name: 'Chemical entities of biological interest',
     58                        description: 'A structured classification of chemical compounds of biological relevance.',
     59                        url: 'http://www.ebi.ac.uk/chebi',
     60                        versionNumber: '1.68',
     61                        ncboId: '1007',
     62                        ncboVersionedId: '42878'
     63                ).with { if (!validate()) { errors.each { println it} } else save()}
     64               
     65        }
     66
     67        /**
     68         * Add example templates, this function would normally be called on an empty database
     69         */
    1670        public static void initTemplates() {
    1771
Note: See TracChangeset for help on using the changeset viewer.