Package eu.clarin.sru.client.fcs
Class DataViewParserGenericString
- java.lang.Object
-
- eu.clarin.sru.client.fcs.DataViewParserGenericString
-
- All Implemented Interfaces:
DataViewParser
public class DataViewParserGenericString extends Object implements DataViewParser
An implementation of a DataView parser that stores the content of a Data Views in String representation.- See Also:
DataViewGenericString
-
-
Constructor Summary
Constructors Constructor Description DataViewParserGenericString()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptType(String type)Check, if parser accepts a certain DataView typestatic voidcopy(XMLStreamReader from, XMLStreamWriter to)intgetPriority()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
-
copy
public static void copy(XMLStreamReader from, XMLStreamWriter to) throws XMLStreamException
- Throws:
XMLStreamException
-
-