source: SRUClient/tags/SRUClient-1.8.0/src/main/java/eu/clarin/sru/client/SRUDiagnostic.java @ 6953

Last change on this file since 6953 was 6953, checked in by Oliver Schonefeld, 8 years ago
  • tag version 1.8.0
File size: 2.2 KB
Line 
1/**
2 * This software is copyright (c) 2012-2016 by
3 *  - 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 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.client;
18
19/**
20 * Class to hold a SRU diagnostic.
21 *
22 * @see <a href="http://www.loc.gov/standards/sru/specs/diagnostics.html">SRU
23 *      Diagnostics</a>
24 * @see <a
25 *      href="http://www.loc.gov/standards/sru/resources/diagnostics-list.html">SRU
26 *      Diagnostics List</a>
27 */
28public final class SRUDiagnostic {
29    private final String uri;
30    private final String details;
31    private final String message;
32
33
34    /**
35     * Constructor.
36     *
37     * @param uri
38     *            the URI identifying the diagnostic
39     * @param details
40     *            supplementary information available, often in a format
41     *            specified by the diagnostic or <code>null</code>
42     * @param message
43     *            human readable message to display to the end user or
44     *            <code>null</code>
45     */
46    public SRUDiagnostic(String uri, String details, String message) {
47        this.uri = uri;
48        this.details = details;
49        this.message = message;
50    }
51
52
53    /**
54     * Get diagnostic's identifying URI.
55     *
56     * @return diagnostic code
57     */
58    public String getURI() {
59        return uri;
60    }
61
62
63    /**
64     * Get supplementary information for this diagnostic. The format for this
65     * value is often specified by the diagnostic code.
66     *
67     * @return supplementary information
68     */
69    public String getDetails() {
70        return details;
71    }
72
73
74    /**
75     * Get human readable message.
76     *
77     * @return human readable message
78     */
79    public String getMessage() {
80        return message;
81    }
82
83} // class SRUDiagnostic
Note: See TracBrowser for help on using the repository browser.