public class ENQuotationHandler extends ENBlockHandler
Modifier and Type | Field and Description |
---|---|
protected List<Quotation> |
quotations |
labels
Constructor and Description |
---|
ENQuotationHandler()
Initializes the block handler for parsing all sections starting with
one of the specified labels.
|
Modifier and Type | Method and Description |
---|---|
boolean |
extractQuotation(String textLine,
boolean additionalLine,
ParsingContext context)
Extract a quotation from the given line and add it to the internal list.
|
void |
fillContent(ParsingContext context)
This hotspot is invoked if the parser releases this handler.
|
List<Quotation> |
getQuotations()
Returns the list of all quotations.
|
boolean |
processBody(String textLine,
ParsingContext context)
If the handler requested to process the body of this constituent, this
hotspot will be called for processing each line of the constituent's
body.
|
boolean |
processHead(String textLine,
ParsingContext context)
If the handler requested to process this constituent, this hotspot
will be called for processing the section header of this
article constituent.
|
canHandle, getLabels
public ENQuotationHandler()
public boolean processHead(String textLine, ParsingContext context)
IBlockHandler
true
if the handler
requests to handle also the body of this constituent.processHead
in interface IBlockHandler
processHead
in class BlockHandler
public boolean processBody(String textLine, ParsingContext context)
IBlockHandler
true
if the handler requests to handle also
the next line using this handler.processBody
in interface IBlockHandler
processBody
in class BlockHandler
public boolean extractQuotation(String textLine, boolean additionalLine, ParsingContext context)
additionalLine
- if false
adds a new quotation to
the list and otherwise appends the quotation to the last one.public void fillContent(ParsingContext context)
IBlockHandler
fillContent
in interface IBlockHandler
fillContent
in class BlockHandler
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.