Class DefaultDoxia

  • All Implemented Interfaces:
    Doxia, org.codehaus.plexus.logging.LogEnabled

    @Component(role=Doxia.class)
    public class DefaultDoxia
    extends org.codehaus.plexus.logging.AbstractLogEnabled
    implements Doxia
    Simple implementation of the Doxia interface: uses a ParserManager to lookup a parser.
    Since:
    1.0
    Author:
    Jason van Zyl
    • Constructor Detail

      • DefaultDoxia

        public DefaultDoxia()
    • Method Detail

      • 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 - not null reader that provides the source document. You could use newReader methods from ReaderFactory.
        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.