Package eu.clarin.sru.client.fcs
Interface DataViewParser
-
- All Known Implementing Classes:
DataViewParserAdvanced
,DataViewParserGenericDOM
,DataViewParserGenericString
,DataViewParserHits
,DataViewParserKWIC
public interface DataViewParser
Base class for implementing parsers for parsing a specific Data View embedded in a CLARIN-FCS record.If multiple record parsers support a certain type, the one with the highest priority is selected.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
acceptType(String type)
Check, if parser accepts a certain DataView typeint
getPriority()
Get the priority for this parserDataView
parse(XMLStreamReader reader, String type, String pid, String ref)
Parse a DataView.
-
-
-
Method Detail
-
acceptType
boolean acceptType(String type)
Check, if parser accepts a certain DataView type- Parameters:
type
- the type to be checked- Returns:
true
if the parser supports this type,false
otherwise
-
getPriority
int getPriority()
Get the priority for this parser- Returns:
- the priority for this parser
-
parse
DataView parse(XMLStreamReader reader, String type, String pid, String ref) throws XMLStreamException, SRUClientException
Parse a DataView. Implementations of this methods are required to be thread-safe!- Parameters:
reader
- theXMLStreamReader
to read fromtype
- the type of the DataViewpid
- the pid of this DataViewref
- the reference of this DataView- Returns:
- the parsed
DataView
object - Throws:
XMLStreamException
- an error occurred while parsing the DataViewSRUClientException
- any SRU exception, possibly wrapping another exception- See Also:
DataView
-
-