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

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

changed domain model for events and protocol parameters, and for template field storage, added NuGO PPS3 events, added searchable plugin for full text queries, corrected a few HTML errors in create study

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