Interface Doxia

  • All Known Implementing Classes:
    DefaultDoxia

    public interface Doxia
    Basic interface of the Doxia framework.
    Since:
    1.0
    • Field Summary

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Parser getParser​(java.lang.String parserId)
      Return a parser for the given parserId.
      void parse​(java.io.Reader source, java.lang.String parserId, Sink sink)
      Parses the given source model using a parser with given id, and emits Doxia events into the given sink.
      void parse​(java.io.Reader source, java.lang.String parserId, Sink sink, java.lang.String reference)
      Parses the given source model using a parser with given id, and emits Doxia events into the given sink.
    • Field Detail

      • ROLE

        static final java.lang.String ROLE
        The Plexus lookup role.
    • Method Detail

      • parse

        void parse​(java.io.Reader source,
                   java.lang.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.
        Parameters:
        source - not null 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
      • parse

        void parse​(java.io.Reader source,
                   java.lang.String parserId,
                   Sink sink,
                   java.lang.String reference)
            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
        parserId - identifier for the parser to use
        sink - a sink that consumes the Doxia events
        reference - string containing the reference to the source (e.g. filename)
        Throws:
        ParserNotFoundException - if no parser could be found for the given id
        ParseException - if the model could not be parsed
      • getParser

        Parser getParser​(java.lang.String parserId)
                  throws ParserNotFoundException
        Return a parser for the given parserId.
        Parameters:
        parserId - identifier for the parser to use
        Returns:
        the parser identified by parserId
        Throws:
        ParserNotFoundException - if no parser could be found for the given id