Interface Doxia

All Known Implementing Classes:
DefaultDoxia

public interface Doxia
Basic interface of the Doxia framework.
Since:
1.0
Author:
Jason van Zyl
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The Plexus lookup role.
  • Method Summary

    Modifier and Type
    Method
    Description
    getParser(String parserId)
    Return a parser for the given parserId.
    void
    parse(Reader source, String parserId, org.apache.maven.doxia.sink.Sink sink)
    Parses the given source model using a parser with given id, and emits Doxia events into the given sink.
  • Field Details

    • ROLE

      static final String ROLE
      The Plexus lookup role.
  • Method Details

    • parse

      void parse(Reader source, String parserId, org.apache.maven.doxia.sink.Sink sink) throws ParserNotFoundException, ParseException
      Parses the given source model using a parser with given id, and emits Doxia events into the given sink.
      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.
    • getParser

      Parser getParser(String parserId) throws ParserNotFoundException
      Return a parser for the given parserId.
      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.