public interface Parser
| Modifier and Type | Field and Description |
|---|---|
static int |
TXT_TYPE
Text parser type
|
static int |
UNKNOWN_TYPE
Unknown parser type
|
static int |
XML_TYPE
XML parser type
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSinkWrapperFactory(SinkWrapperFactory factory)
Registers a given
SinkWrapperFactory with the parser used in subsequent calls of parse(...) |
int |
getType()
|
boolean |
isEmitAnchorsForIndexableEntries()
Returns whether anchors are automatically generated for each index entry found by
IndexingSink or not. |
boolean |
isEmitComments()
Does the parser emit Doxia comments event when comments found in source?
|
void |
parse(Reader source,
Sink sink)
Parses the given source model and emits Doxia events into the given sink.
|
void |
parse(Reader source,
Sink sink,
String reference)
Parses the given source model and emits Doxia events into the given sink.
|
void |
setEmitAnchorsForIndexableEntries(boolean emitAnchors)
Determines whether to automatically generate anchors for each index entry found by
IndexingSink or not. |
void |
setEmitComments(boolean emitComments)
When comments are found in source markup, emit comment Doxia events or just ignore?
|
static final int UNKNOWN_TYPE
static final int TXT_TYPE
static final int XML_TYPE
void parse(Reader source, Sink sink) throws ParseException
parse(Reader, Sink, String) with last argument being null.source - not null reader that provides the source document.
You could use newReader methods from ReaderFactory.sink - A sink that consumes the Doxia events.ParseException - if the model could not be parsed.void parse(Reader source, Sink sink, String reference) throws ParseException
source - not null reader that provides the source document.
You could use newReader methods from ReaderFactory.sink - A sink that consumes the Doxia events.reference - a string identifying the source (for file based documents the source file path)ParseException - if the model could not be parsed.int getType()
void setEmitComments(boolean emitComments)
emitComments - true (default value) to emit comment Doxia eventsboolean isEmitComments()
true (default value) if comment Doxia events are emittedvoid addSinkWrapperFactory(SinkWrapperFactory factory)
SinkWrapperFactory with the parser used in subsequent calls of parse(...)factory - the factory to create the sink wrappervoid setEmitAnchorsForIndexableEntries(boolean emitAnchors)
IndexingSink or not.
By default no anchors are generated.emitAnchors - true to emit anchors otherwise false (the default)boolean isEmitAnchorsForIndexableEntries()
IndexingSink or not.true if anchors are emitted otherwise falseCopyright © 2005–2024 The Apache Software Foundation. All rights reserved.