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

Last change on this file since 6938 was 6938, checked in by Oliver Schonefeld, 8 years ago
  • fix copyright
  • fix some code formatting
  • fix JavaDoc? warnings
File size: 1.6 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
19import javax.xml.stream.XMLStreamException;
20import javax.xml.stream.XMLStreamReader;
21
22
23/**
24 * A parser to parse record data and create appropriate Java objects.
25 *
26 */
27public interface SRURecordDataParser {
28    /**
29     * The record schema this parser is able to process.
30     *
31     * @return the record schema this parser is able to process
32     */
33    public String getRecordSchema();
34
35
36    /**
37     * Parse a record data into a Java object.
38     *
39     * @param reader
40     *            a {@link XMLStreamReader} to parse the record data
41     * @return the parsed record
42     * @throws XMLStreamException
43     *             an error occurred while parsing the response
44     * @throws SRUClientException
45     *             any SRU exception, possibly wrapping another exception
46     * @see SRURecordData
47     */
48    public SRURecordData parse(XMLStreamReader reader)
49            throws XMLStreamException, SRUClientException;
50
51} // interface SRURecordDataParser
Note: See TracBrowser for help on using the repository browser.