Class ObflParserImpl
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.obfl.XMLParserBase
-
- org.daisy.dotify.formatter.impl.obfl.ObflParserImpl
-
- All Implemented Interfaces:
ObflParser
public class ObflParserImpl extends XMLParserBase implements ObflParser
Provides a
parser for OBFL
.The parser accepts OBFL input as an
XMLEventReader
. Based on the OBFL it populates the supplied (empty)Formatter
object.
-
-
Constructor Summary
Constructors Constructor Description ObflParserImpl(FactoryManager fm)
Creates a new obfl parser with the specified factory manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MetaDataItem>
getMetaData()
Gets a list of meta data items collected by the latest call toObflParser.parse(XMLEventReader, Formatter)
.boolean
isNormalizingSpace()
void
parse(XMLEventReader inputER, Formatter formatter)
Parses the input places its contents in the supplied formatter.void
setNormalizeSpace(boolean value)
-
Methods inherited from class org.daisy.dotify.formatter.impl.obfl.XMLParserBase
beginWS, endWS, equalsElement, equalsEnd, equalsStart, isSpace, normalizeSpace
-
-
-
-
Constructor Detail
-
ObflParserImpl
public ObflParserImpl(FactoryManager fm)
Creates a new obfl parser with the specified factory manager.- Parameters:
fm
- the factory manager
-
-
Method Detail
-
setNormalizeSpace
public void setNormalizeSpace(boolean value)
-
isNormalizingSpace
public boolean isNormalizingSpace()
-
parse
public void parse(XMLEventReader inputER, Formatter formatter) throws ObflParserException
Description copied from interface:ObflParser
Parses the input places its contents in the supplied formatter.- Specified by:
parse
in interfaceObflParser
- Parameters:
inputER
- the OBFLformatter
- the formatter- Throws:
ObflParserException
- if there is a problem reading the OBFL
-
getMetaData
public List<MetaDataItem> getMetaData()
Description copied from interface:ObflParser
Gets a list of meta data items collected by the latest call toObflParser.parse(XMLEventReader, Formatter)
.- Specified by:
getMetaData
in interfaceObflParser
- Returns:
- returns a list of meta data items
-
-