source: trunk/grails-app/domain/dbnp/data/Term.groovy @ 350

Last change on this file since 350 was 350, checked in by keesvb, 9 years ago

added ontology/term properties, getting code to work from clean build: removed Protocol and EventDescription? controllers, cleaned up Protocol code from ImporterService?, commented out EventDescription? code in WizardController?

  • Property svn:keywords set to Date Rev Author
File size: 823 bytes
Line 
1package dbnp.data
2
3import dbnp.data.Ontology
4
5/**
6 * The Term object describes a term in the ontology that is referred to in other entities such as events.
7 * The Term object should point to an existing term in an online ontology, therefore instances of this class can also
8 * be seen as a cache of elements of the external ontology.
9 * BioPortal example: Mus musculus: http://rest.bioontology.org/bioportal/concepts/38802/NCBITaxon:10090
10 *
11 * Revision information:
12 * $Rev: 350 $
13 * $Author: keesvb $
14 * $Date: 2010-04-19 13:45:35 +0000 (ma, 19 apr 2010) $
15 */
16class Term implements Serializable {
17        static searchable = true
18
19        String name             // BioPortal: label (preferred name)
20        Ontology ontology       // Parent ontology
21        String accession        // BioPortal: fullId
22
23        static constraints = {
24                accession(unique: 'ontology')
25        }
26
27        def String toString() {
28                return name
29        }
30
31}
Note: See TracBrowser for help on using the repository browser.