public class IndexingSink extends SinkWrapper
IndexEntry
objects for sections.JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, NUMBERING_DECIMAL, NUMBERING_LOWER_ALPHA, NUMBERING_LOWER_ROMAN, NUMBERING_UPPER_ALPHA, NUMBERING_UPPER_ROMAN, SECTION_LEVEL_1, SECTION_LEVEL_2, SECTION_LEVEL_3, SECTION_LEVEL_4, SECTION_LEVEL_5, SECTION_LEVEL_6
COLON, EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SEMICOLON, SLASH, SPACE, STAR
Constructor and Description |
---|
IndexingSink(IndexEntry rootEntry)
Deprecated.
legacy constructor, use
IndexingSink(Sink) with SinkAdapter as argument and call getRootEntry() to retrieve the index tree afterwards. |
IndexingSink(Sink delegate) |
Modifier and Type | Method and Description |
---|---|
void |
anchor(String name,
SinkEventAttributes attributes) |
void |
close() |
IndexEntry |
getRootEntry()
This should only be called once the sink is closed.
|
String |
getTitle()
Getter for the field
title . |
protected void |
onIndexEntry(IndexEntry entry)
Called at the beginning of each entry (once all metadata about it is collected).
|
IndexEntry |
peek()
peek.
|
void |
pop()
Removes the IndexEntry at the top of this stack.
|
void |
push(IndexEntry entry)
Pushes an IndexEntry onto the top of this stack.
|
void |
section_(int level) |
void |
section(int level,
SinkEventAttributes attributes) |
void |
sectionTitle_(int level) |
void |
text(String text,
SinkEventAttributes attributes) |
void |
title_() |
void |
title(SinkEventAttributes attributes) |
address_, address, anchor_, article_, article, author_, author, blockquote_, blockquote, body_, body, bold_, bold, comment, content_, content, data_, data, date_, date, definedTerm_, definedTerm, definition_, definition, definitionList_, definitionList, definitionListItem_, definitionListItem, division_, division, figure_, figure, figureCaption_, figureCaption, figureGraphics, flush, footer_, footer, getWrappedSink, head_, head, header_, header, horizontalRule, inline_, inline, italic_, italic, lineBreak, lineBreakOpportunity, link_, link, list_, list, listItem_, listItem, monospaced_, monospaced, navigation_, navigation, nonBreakingSpace, numberedList_, numberedList, numberedListItem_, numberedListItem, pageBreak, paragraph_, paragraph, rawText, sectionTitle, setWrappedSink, sidebar_, sidebar, table_, table, tableCaption_, tableCaption, tableCell_, tableCell, tableHeaderCell_, tableHeaderCell, tableRow_, tableRow, tableRows_, tableRows, time_, time, unknown, verbatim_, verbatim
address, anchor, article, author, blockquote, body, content, data, date, definedTerm, definition, definitionList, definitionListItem, division, figure, figureCaption, figureGraphics, footer, head, header, horizontalRule, init, inline, lineBreak, lineBreakOpportunity, link, list, listItem, navigation, numberedList, numberedListItem, paragraph, section1_, section1, section2_, section2, section3_, section3, section4_, section4, section5_, section5, section6_, section6, sectionTitle_, sectionTitle, sectionTitle1_, sectionTitle1, sectionTitle2_, sectionTitle2, sectionTitle3_, sectionTitle3, sectionTitle4_, sectionTitle4, sectionTitle5_, sectionTitle5, sectionTitle6_, sectionTitle6, sidebar, table, tableCaption, tableCell, tableHeaderCell, tableRow, tableRows, text, time, title, unifyEOLs, verbatim
@Deprecated public IndexingSink(IndexEntry rootEntry)
IndexingSink(Sink)
with SinkAdapter
as argument and call getRootEntry()
to retrieve the index tree afterwards.public IndexingSink(Sink delegate)
public IndexEntry getRootEntry()
IllegalStateException
- in case the sink was not closed yetpublic void title(SinkEventAttributes attributes)
title
in interface Sink
title
in class SinkWrapper
public void title_()
title_
in interface Sink
title_
in class SinkWrapper
public void section(int level, SinkEventAttributes attributes)
section
in interface Sink
section
in class SinkWrapper
public void section_(int level)
section_
in interface Sink
section_
in class SinkWrapper
public void sectionTitle_(int level)
sectionTitle_
in interface Sink
sectionTitle_
in class SinkWrapper
public void text(String text, SinkEventAttributes attributes)
text
in interface Sink
text
in class SinkWrapper
public void anchor(String name, SinkEventAttributes attributes)
anchor
in interface Sink
anchor
in class SinkWrapper
protected void onIndexEntry(IndexEntry entry)
entry
- the newly collected entrypublic void push(IndexEntry entry)
entry
- to put.public void pop()
public IndexEntry peek()
peek.
public void close()
close
in interface AutoCloseable
close
in interface Sink
close
in class SinkWrapper
Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.