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

Last change on this file since 190 was 190, checked in by duh, 10 years ago
  • set keyword expansion
  • Property svn:keywords set to Rev Date Author
File size: 758 bytes
RevLine 
[84]1package dbnp.studycapturing
2
3/**
4 * Enum describing the type of a templated field.
[145]5 * Revision information:
6 * $Rev: 190 $
7 * $Author: duh $
8 * $Date: 2010-02-10 16:36:10 +0000 (wo, 10 feb 2010) $
[84]9 */
10public enum TemplateFieldType {
[145]11        STRING('String'),
12        INTEGER('Integer number'),
13        FLOAT('Decimal number'),
14        STRINGLIST('List of items'),
15        ONTOLOGYTERM('Ontology Reference')
[84]16
[145]17        String name
[84]18
[145]19        TemplateFieldType(String name) {
20                this.name = name
21        }
[84]22
[145]23        static list() {
24                [STRING, INTEGER, FLOAT, STRINGLIST, ONTOLOGYTERM]
25        }
[84]26
[145]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        */
[84]35}
Note: See TracBrowser for help on using the repository browser.