public class ParagraphBlockParser extends java.lang.Object implements BlockParser
Modifier and Type | Field and Description |
---|---|
private HRuleBlockParser |
hrulerParser
HRuleBlockParser to use. |
private GenericListBlockParser |
listParser
ListBlockParser to use. |
private static NopBlock |
NOP
no operation block
|
private java.util.regex.Pattern |
paragraphSeparator
pattern used to dectect end of paragraph
|
private SectionBlockParser |
sectionParser
SectionBlockParser to use. |
private TableBlockParser |
tableBlockParser
TableBlockParser to use. |
private FormatedTextParser |
textParser
FormatedTextParser to use. |
private VerbatimBlockParser |
verbatimParser
TableBlockParser to use. |
Constructor and Description |
---|
ParagraphBlockParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String line)
accept.
|
void |
setHrulerParser(HRuleBlockParser aHrulerParser)
Sets the hrulerParser.
|
void |
setListParser(GenericListBlockParser aListParser)
Sets the listParser.
|
void |
setSectionParser(SectionBlockParser aSectionParser)
Sets the sectionParser.
|
void |
setTableBlockParser(TableBlockParser aTableBlockParser)
Setter for the field
tableBlockParser . |
void |
setTextParser(FormatedTextParser aTextParser)
Sets the formatTextParser.
|
void |
setVerbatimParser(VerbatimBlockParser aVerbatimParser)
Sets the verbatimParser.
|
Block |
visit(java.lang.String line,
ByLineSource source)
visit.
|
private final java.util.regex.Pattern paragraphSeparator
private SectionBlockParser sectionParser
SectionBlockParser
to use. injectedprivate GenericListBlockParser listParser
ListBlockParser
to use. injectedprivate FormatedTextParser textParser
FormatedTextParser
to use. injectedprivate HRuleBlockParser hrulerParser
HRuleBlockParser
to use. injectedprivate TableBlockParser tableBlockParser
TableBlockParser
to use. injectedprivate VerbatimBlockParser verbatimParser
TableBlockParser
to use. injectedprivate static final NopBlock NOP
public final boolean accept(java.lang.String line)
accept.
accept
in interface BlockParser
line
- text linetrue
if this class can handle this linepublic final Block visit(java.lang.String line, ByLineSource source) throws ParseException
visit.
visit
in interface BlockParser
line
- a line of textsource
- the source of linesParseException
- on errorpublic final void setSectionParser(SectionBlockParser aSectionParser)
aSectionParser
- SectionBlockParser
with the sectionParser.public final void setListParser(GenericListBlockParser aListParser)
aListParser
- ListBlockParser
with the listParser.public final void setTextParser(FormatedTextParser aTextParser)
aTextParser
- FormatedTextParser
with the formatTextParser.public final void setHrulerParser(HRuleBlockParser aHrulerParser)
aHrulerParser
- HRuleBlockParser
with the hrulerParser.public final void setTableBlockParser(TableBlockParser aTableBlockParser)
Setter for the field tableBlockParser
.
aTableBlockParser
- Table parser to usepublic final void setVerbatimParser(VerbatimBlockParser aVerbatimParser)
aVerbatimParser
- VerbatimBlockParser
with the verbatimParser.