source: SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUVersion.java @ 7269

Last change on this file since 7269 was 7269, checked in by Oliver Schonefeld, 2 years ago
  • Update copyright
  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1/**
2 * This software is copyright (c) 2011-2022 by
3 *  - Leibniz-Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
4 * This is free software. You can redistribute it
5 * and/or modify it under the terms described in
6 * the GNU General Public License v3 of which you
7 * should have received a copy. Otherwise you can download
8 * it from
9 *
10 *   http://www.gnu.org/licenses/gpl-3.0.txt
11 *
12 * @copyright Leibniz-Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
13 *
14 * @license http://www.gnu.org/licenses/gpl-3.0.txt
15 *  GNU General Public License v3
16 */
17package eu.clarin.sru.server;
18
19/**
20 * SRU version
21 */
22public enum SRUVersion {
23    /**
24     * SRU/CQL version 1.1
25     */
26    VERSION_1_1 {
27        @Override
28        int getVersionNumber() {
29            return ((1 << 16) | 1);
30        }
31
32
33        @Override
34        String getVersionString() {
35            return "1.1";
36        }
37    },
38
39    /**
40     * SRU/CQL version 1.2
41     */
42    VERSION_1_2 {
43        @Override
44        int getVersionNumber() {
45            return ((1 << 16) | 2);
46        }
47
48
49        @Override
50        String getVersionString() {
51            return "1.2";
52        }
53    },
54
55    /**
56     * SRU/CQL version 2.0
57     */
58    VERSION_2_0 {
59        @Override
60        int getVersionNumber() {
61            return ((2 << 16) | 0);
62        }
63
64
65        @Override
66        String getVersionString() {
67            return "2.0";
68        }
69    };
70
71    abstract int getVersionNumber();
72
73
74    abstract String getVersionString();
75
76} // enum SRUVersion
Note: See TracBrowser for help on using the repository browser.