Package eu.clarin.sru.client.fcs
Class DataViewParserHits
- java.lang.Object
-
- eu.clarin.sru.client.fcs.DataViewParserHits
-
- All Implemented Interfaces:
DataViewParser
public final class DataViewParserHits extends Object implements DataViewParser
An implementation of a Data View parser that parses HITS Data Views. This parser expects input that conforms to the CLARIN-FCS specification for the HITS Data View.- See Also:
DataViewHits
-
-
Constructor Summary
Constructors Constructor Description DataViewParserHits()
-
Method Summary
All Methods Instance Methods Concrete 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
public boolean acceptType(String type)
Description copied from interface:DataViewParser
Check, if parser accepts a certain DataView type- Specified by:
acceptType
in interfaceDataViewParser
- Parameters:
type
- the type to be checked- Returns:
true
if the parser supports this type,false
otherwise
-
getPriority
public int getPriority()
Description copied from interface:DataViewParser
Get the priority for this parser- Specified by:
getPriority
in interfaceDataViewParser
- Returns:
- the priority for this parser
-
parse
public DataView parse(XMLStreamReader reader, String type, String pid, String ref) throws XMLStreamException, SRUClientException
Description copied from interface:DataViewParser
Parse a DataView. Implementations of this methods are required to be thread-safe!- Specified by:
parse
in interfaceDataViewParser
- 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
-
-