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

Last change on this file since 353 was 353, checked in by duh, 9 years ago
  • refactored termField tag
  • refactored subjects page
  • added terms and ontologies to bootstrap
  • Property svn:keywords set to Date Rev Author
File size: 826 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: 353 $
13 * $Author: duh $
14 * $Date: 2010-04-20 08:49:54 +0000 (di, 20 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: conceptId
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.