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

Last change on this file since 162 was 162, checked in by duh, 9 years ago
  • set keyword expansion
  • Property svn:keywords set to
    Date
    Author
    Rev
File size: 758 bytes
Line 
1package dbnp.studycapturing
2
3/**
4 * Enum describing the type of a templated field.
5 * Revision information:
6 * $Rev: 162 $
7 * $Author: duh $
8 * $Date: 2010-02-02 14:07:02 +0000 (di, 02 feb 2010) $
9 */
10public enum TemplateFieldType {
11        STRING('String'),
12        INTEGER('Integer number'),
13        FLOAT('Decimal number'),
14        STRINGLIST('List of items'),
15        ONTOLOGYTERM('Ontology Reference')
16
17        String name
18
19        TemplateFieldType(String name) {
20                this.name = name
21        }
22
23        static list() {
24                [STRING, INTEGER, FLOAT, STRINGLIST, ONTOLOGYTERM]
25        }
26
27        // It would be nice to see the description string in the scaffolding,
28        // and the following works, but then the item cannot be saved properly.
29        // TODO: find a way to display the enum description but save the enum value in the scaffolding
30        /*
31        def String toString() {
32                  return this.name
33        }
34        */
35}
Note: See TracBrowser for help on using the repository browser.