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

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

refactored template entity code into TemplateEntity?, added more template field types, updated BootStrap? with some more details on PPSH, changed code in study overview to get template field contents in a nicer way

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