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

Last change on this file since 2132 was 2132, checked in by oschonef, 12 years ago
  • change some comments
  • Property svn:eol-style set to native
File size: 3.3 KB
Line 
1/**
2 * This software is copyright (c) 2011 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 * A SRU client.
21 */
22public interface SRUClient {
23
24    /**
25     * Register a record data parser.
26     *
27     * @param parser
28     *            a parser instance
29     * @throws SRUClientException
30     *             if a parser handing the same record schema is already
31     *             registered
32     * @throws NullPointerException
33     *             if any required argument is <code>null</code>
34     * @throws IllegalArgumentException
35     *             if the supplied parser is invalid
36     */
37    public abstract void registerRecordParser(SRURecordDataParser parser)
38            throws SRUClientException;
39
40
41    /**
42     * Perform a <em>explain</em> operation.
43     *
44     * @param request
45     *            an instance of a {@link SRUExplainRequest} object
46     * @param handler
47     *            an instance of {@link SRUExplainHandler} to receive callbacks
48     *            when processing the result of this request
49     * @throws SRUClientException
50     *             if an unrecoverable error occurred
51     * @throws NullPointerException
52     *             if any required argument is <code>null</code>
53     * @see SRUExplainRequest
54     * @see SRUExplainHandler
55     */
56    public abstract void explain(SRUExplainRequest request,
57            SRUExplainHandler handler) throws SRUClientException;
58
59
60    /**
61     * Perform a <em>scan</em> operation.
62     *
63     * @param request
64     *            an instance of a {@link SRUScanRequest} object
65     * @param handler
66     *            an instance of {@link SRUScanHandler} to receive callbacks
67     *            when processing the result of this request
68     * @throws SRUClientException
69     *             if an unrecoverable error occurred
70     * @throws NullPointerException
71     *             if any required argument is <code>null</code>
72     * @see SRUScanRequest
73     * @see SRUScanHandler
74     */
75    public abstract void scan(SRUScanRequest request, SRUScanHandler handler)
76            throws SRUClientException;
77
78
79    /**
80     * Perform a <em>searchRetreive</em> operation.
81     *
82     * @param request
83     *            an instance of a {@link SRUSearchRetrieveRequest} object
84     * @param handler
85     *            an instance of {@link SRUSearchRetrieveHandler} to receive
86     *            callbacks when processing the result of this request
87     * @throws SRUClientException
88     *             if an unrecoverable error occurred
89     * @throws NullPointerException
90     *             if any required argument is <code>null</code>
91     * @see SRUSearchRetrieveRequest
92     * @see SRUSearchRetrieveHandler
93     */
94    public abstract void searchRetrieve(SRUSearchRetrieveRequest request,
95            SRUSearchRetrieveHandler handler) throws SRUClientException;
96
97} // interface SRUClient
Note: See TracBrowser for help on using the repository browser.