View Javadoc
1   /*
2    * Copyright 2018-2024 Medical Information Systems Research Group (https://medical.zcu.cz),
3    * Department of Computer Science and Engineering, University of West Bohemia.
4    * Address: Univerzitni 8, 306 14 Plzen, Czech Republic.
5    *
6    * Author Petr Vcelak (vcelak@kiv.zcu.cz).
7    *
8    * This file is part of MRE SPARQL QueryBuilder project.
9    *
10   * MRE SPARQL QueryBuilder is free software: you can redistribute it and/or modify
11   * it under the terms of the GNU General Public License as published by
12   * the Free Software Foundation, either version 3 of the License.
13   *
14   * MRE SPARQL QueryBuilder is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17   * GNU General Public License for more details.
18   *
19   * You should have received a copy of the GNU General Public License
20   * along with MRE SPARQL QueryBuilder. If not, see <http://www.gnu.org/licenses/>.
21   */
22  package cz.zcu.mre.qbuilder.model;
23  
24  /**
25   * 
26   * @author Petr Vcelak (vcelak@kiv.zcu.cz)
27   */
28  public enum TypeConversion {
29  	/**
30       * No type conversion.
31       */
32      NONE("query.condition.conversion.none"),
33      /**
34       * String.
35       */
36      STR("query.condition.conversion.string"),
37      /**
38       * Integer.
39       */
40      INT("query.condition.conversion.integer"),
41      /**
42       * Float.
43       */
44      FLT("query.condition.conversion.float"),
45      /**
46       * Double.
47       */
48      DBL("query.condition.conversion.double"),
49      /**
50       * Date.
51       */
52      DATE("query.condition.conversion.date"),
53      /**
54       * Time.
55       */
56      TIME("query.condition.conversion.time"),
57      /**
58       * Date and time.
59       */
60      DTTM("query.condition.conversion.datetime"),
61      /**
62       * Boolean.
63       */
64      BOOL("query.condition.conversion.boolean"),
65      /**
66       * Object.
67       */
68      OBJ("query.condition.conversion.object");
69  
70  	 
71      private final String messageKey;
72  
73      TypeConversion(String messageKey) {
74          this.messageKey = messageKey;
75      }
76  
77      public String getMessageKey() {
78          return messageKey;
79      }
80  
81      public String getAlternativeName() {
82          return MessageSourceHolder.getMessage(messageKey);
83      }
84  	
85      
86  }