Class TWikiParser

    • Constructor Detail

      • TWikiParser

        public TWikiParser()
        Creates the TWikiParser.
    • Method Detail

      • parse

        public void parse​(Reader source,
                          Sink sink)
                   throws ParseException
        Parses the given source model 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.
        sink - A sink that consumes the Doxia events.
        Throws:
        ParseException - if the model could not be parsed.
      • parse

        public final void parse​(Reader source,
                                Sink sink,
                                String reference)
                         throws ParseException
        Parses the given source model and emits Doxia events into the given sink.
        Specified by:
        parse in interface Parser
        Overrides:
        parse in class AbstractParser
        Parameters:
        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 - the reference
        Throws:
        ParseException - if the model could not be parsed.
      • getTitle

        public final String getTitle​(List<Block> blocks,
                                     ByLineSource source)
        Guess a title for the page. It uses the first section that it finds. If it doesn't find any section tries to get it from ByLineReaderSource.getName()
        Parameters:
        blocks - blocks to parse
        source - source to parse
        Returns:
        a title for a page
        Since:
        1.1