Changeset 398
- Timestamp:
- May 10, 2010, 4:29:04 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/dbnp/data/Ontology.groovy
r359 r398 19 19 int ncboId // BioPortal: ontologyId 20 20 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 } 21 42 } -
trunk/grails-app/domain/dbnp/data/Term.groovy
r359 r398 18 18 19 19 String name // BioPortal: label (preferred name) 20 Ontology ontology // Parent ontology 20 Ontology ontology // Parent ontology. To enable the unique constraints, we describe the Ontology-Term relation here 21 21 String accession // BioPortal: conceptId 22 22 23 23 static constraints = { 24 accession(unique: 'ontology') 24 accession(unique: 'ontology') // Accession should be unique within an ontology 25 name(unique: 'ontology') // Preferred name should be unique within an ontology 25 26 } 26 27
Note: See TracChangeset
for help on using the changeset viewer.