source: trunk/grails-app/domain/dbnp/studycapturing/TemplateFieldType.groovy @ 84

Last change on this file since 84 was 84, checked in by keesvb, 10 years ago

updated domain classes: added comments, carried out some normalization

File size: 687 bytes
Line 
1package dbnp.studycapturing
2
3/**
4 * Enum describing the type of a templated field.
5 */
6public enum TemplateFieldType {
7    STRING('String'),
8    NUMBER('Number'),
9    STRINGLIST('List'),
10    ONTOLOGYTERM('Ontology Reference')
11
12    String name
13
14    TemplateFieldType(String name) {
15     this.name = name
16    }
17
18    static list() {
19     [STRING, NUMBER, STRINGLIST, ONTOLOGYTERM]
20    }
21
22  // It would be nice to see the description string in the scaffolding,
23  // and the following works, but then the item cannot be saved properly.
24  // TODO: find a way to display the enum description but save the enum value in the scaffolding
25  /*def String toString() {
26      return this.name
27  }*/
28
29}
Note: See TracBrowser for help on using the repository browser.