Examples of ByLineSource


Examples of org.apache.maven.doxia.util.ByLineSource

    public final void testTableHeader()
        throws ParseException
    {
        final StringReader sw = new StringReader( "|*cell1*|*cell2*|\n" );

        final ByLineSource source = new ByLineReaderSource( sw );

        Block block, expected;
        expected =
            new TableBlock( new Block[] { new TableRowBlock( new Block[] {
                new TableCellHeaderBlock( new Block[] { new TextBlock( "cell1" ) } ),
                new TableCellHeaderBlock( new Block[] { new TextBlock( "cell2" ) } ) } ) } );

        block = tableParser.visit( source.getNextLine(), source );
        assertEquals( block, expected );
    }
View Full Code Here

Examples of org.apache.maven.doxia.util.ByLineSource

    /** {@inheritDoc} */
    public synchronized void parse( Reader source, Sink sink )
        throws ParseException
    {
        ByLineSource src = new ByLineReaderSource( source );

        try
        {
            List<Block> blocks = parse( src );

            sink.head();

            sink.head_();

            sink.body();

            for ( Block block : blocks )
            {
                block.traverse( sink );
            }

            sink.body_();
        }
        catch ( Exception e )
        {
            // TODO handle column number
            throw new ParseException( e, src.getName(), src.getLineNumber(), -1 );
        }
        finally
        {
            setSecondParsing( false );
            init();
View Full Code Here

Examples of org.apache.maven.doxia.util.ByLineSource

        throws ParseException
    {
        init();

        List<Block> blocks;
        final ByLineSource src = new ByLineReaderSource( source );

        try
        {
            blocks = parse( src );
        }
        catch ( final Exception e )
        {
            // TODO handle column number
            throw new ParseException( e, src.getName(), src.getLineNumber(), -1 );
        }

        sink.head();

        final String title = getTitle( blocks, src );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.