source: SRUClient/trunk/src/main/java/eu/clarin/sru/client/SRUExplainResponse.java @ 5750

Last change on this file since 5750 was 5750, checked in by Oliver Schonefeld, 10 years ago
  • update copyright
  • clean-up whitespace
  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/**
2 * This software is copyright (c) 2012-2014 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
19import java.util.List;
20
21import org.w3c.dom.DocumentFragment;
22
23
24
25/**
26 * A response to a <em>explain</em> request.
27 */
28public final class SRUExplainResponse extends
29        SRUAbstractResponse<SRUExplainRequest> {
30    private final SRURecord record;
31
32
33    SRUExplainResponse(SRUExplainRequest request,
34            List<SRUDiagnostic> diagnostics,
35            DocumentFragment extraResponseData,
36            int totalBytesTransferred,
37            long timeTotal,
38            long timeQueued,
39            long timeNetwork,
40            long timeProcessing,
41            SRURecord record) {
42        super(request, diagnostics, extraResponseData, totalBytesTransferred,
43                timeTotal, timeQueued, timeNetwork, timeProcessing);
44        this.record = record;
45    }
46
47
48    /**
49     * Get the explain record.
50     *
51     * @return the explain record or <code>null</code>
52     */
53    public SRURecord getRecord() {
54        return record;
55    }
56
57
58    /**
59     * Check, if response contains a record.
60     *
61     * @return <code>true</code> of response contains a record,
62     *         <code>false</code> otherwise
63     */
64    public boolean hasRecord() {
65        return record != null;
66    }
67
68} // class SRUExplainResponse
Note: See TracBrowser for help on using the repository browser.