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

Last change on this file since 6912 was 6912, checked in by Oliver Schonefeld, 8 years ago
  • change method setQuery in SRUSearchRetrieveRequest to require a queryType-
  • fix some JavaDoc?
  • Property svn:eol-style set to native
File size: 1.9 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 javax.xml.namespace.QName;
20import javax.xml.stream.XMLStreamException;
21import javax.xml.stream.XMLStreamReader;
22
23
24/**
25 * A parser to parse extra response data in a SRU response create appropriate
26 * Java objects.
27 */
28public interface SRUExtraResponseDataParser {
29
30    /**
31     * Check, if the current element can be handled by this parser.
32     *
33     * @param name
34     *            the name of the element to be examined
35     *
36     * @return <code>true</code> if the element can be handled by this parser;
37     *         <code>false</code> otherwise
38     */
39    public boolean supports(QName name);
40
41
42    /**
43     * Parse the extra response data into a Java object. After parsing, the
44     * supplied reader should be positioned after the end element to the
45     * corresponding start element.
46     *
47     * @param reader
48     *            a {@link XMLStreamReader} to parse the extra response data
49     * @return the parsed extra response data
50     * @throws XMLStreamException
51     *             an error occurred while parsing
52     * @throws SRUClientException
53     *             any SRU exception, possibly wrapping another exception
54     * @see SRUExtraResponseData
55     */
56    public SRUExtraResponseData parse(XMLStreamReader reader)
57            throws XMLStreamException, SRUClientException;
58
59} // interface SRUExtraResponseDataParser
Note: See TracBrowser for help on using the repository browser.