Ignore:
Timestamp:
May 10, 2010, 4:29:04 PM (9 years ago)
Author:
keesvb
Message:

added Ontology/Term? and Subject integration tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/data/Ontology.groovy

    r359 r398  
    1919        int ncboId              // BioPortal: ontologyId
    2020        int ncboVersionedId     // BioPortal: id
     21
     22        /**
     23         * Find child terms
     24         * @return A set containing all terms that reside under this ontology
     25         */
     26        Set<Term> giveTerms() {
     27                Term.findAllByOntology(this)
     28        }
     29
     30        Object giveTermByName(String name) {
     31                giveTerms().find {
     32                        it.name == name
     33                }
     34
     35                /* TODO: find out why the following doesn't work (probably more efficient):
     36                Term.find {
     37                        it.name == name
     38                        it.ontology == this
     39                }
     40                }*/
     41        }
    2142}
Note: See TracChangeset for help on using the changeset viewer.