org.apache.maven.doxia
Class DefaultDoxia
java.lang.Object
org.apache.maven.doxia.DefaultDoxia
- All Implemented Interfaces:
- Doxia
public class DefaultDoxia
- extends Object
- implements Doxia
Simple implementation of the Doxia interface:
uses a ParserManager to lookup a parser.
- Since:
- 1.0
- Version:
- $Id: DefaultDoxia.java 564180 2007-08-09 12:15:44Z vsiveton $
- Author:
- Jason van Zyl
Fields inherited from interface org.apache.maven.doxia.Doxia |
ROLE |
Method Summary |
Parser |
getParser(String parserId)
Return a parser for the given parserId . |
void |
parse(Reader source,
String parserId,
Sink sink)
Parses the given source model using a parser with given id,
and emits Doxia events into the given sink. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDoxia
public DefaultDoxia()
parse
public void parse(Reader source,
String parserId,
Sink sink)
throws ParserNotFoundException,
ParseException
- Parses the given source model using a parser with given id,
and emits Doxia events into the given sink.
- Specified by:
parse
in interface Doxia
- Parameters:
source
- A reader that provides the source document.parserId
- Identifier for the parser to use.sink
- A sink that consumes the Doxia events.
- Throws:
ParserNotFoundException
- if no parser could be found
for the given id.
ParseException
- if the model could not be parsed.
getParser
public Parser getParser(String parserId)
throws ParserNotFoundException
- Return a parser for the given
parserId
.
- Specified by:
getParser
in interface Doxia
- Parameters:
parserId
- Identifier for the parser to use.
- Returns:
- the parser defining by parserId.
- Throws:
ParserNotFoundException
- if no parser could be found
for the given id.
Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.