Package eu.clarin.sru.client.fcs
Class DataViewParserHitsWithLexAnnotations
- java.lang.Object
-
- eu.clarin.sru.client.fcs.DataViewParserHitsWithLexAnnotations
-
- All Implemented Interfaces:
DataViewParser
public final class DataViewParserHitsWithLexAnnotations extends Object implements DataViewParser
An implementation of a Data View parser that parses HITS Data Views with optionalkindattributes. This parser expects input that conforms to the CLARIN-FCS specification for the HITS Data View except that<Hit/>elements may have an optionalkindattribute. If both theDataViewParserHitsandDataViewParserHitsWithLexAnnotationsare used, the latter has priority. TheDataViewHitsWithLexAnnotationsis backwards compatible toDataViewHits.
-
-
Constructor Summary
Constructors Constructor Description DataViewParserHitsWithLexAnnotations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptType(String type)Check, if parser accepts a certain DataView typeintgetPriority()Get the priority for this parserDataViewparse(XMLStreamReader reader, String type, String pid, String ref)Parse a DataView.
-
-
-
Method Detail
-
acceptType
public boolean acceptType(String type)
Description copied from interface:DataViewParserCheck, if parser accepts a certain DataView type- Specified by:
acceptTypein interfaceDataViewParser- Parameters:
type- the type to be checked- Returns:
trueif the parser supports this type,falseotherwise
-
getPriority
public int getPriority()
Description copied from interface:DataViewParserGet the priority for this parser- Specified by:
getPriorityin 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:DataViewParserParse a DataView. Implementations of this methods are required to be thread-safe!- Specified by:
parsein interfaceDataViewParser- Parameters:
reader- theXMLStreamReaderto read fromtype- the type of the DataViewpid- the pid of this DataViewref- the reference of this DataView- Returns:
- the parsed
DataViewobject - Throws:
XMLStreamException- an error occurred while parsing the DataViewSRUClientException- any SRU exception, possibly wrapping another exception- See Also:
DataView
-
-