Package org.apache.maven.doxia.parser

Examples of org.apache.maven.doxia.parser.ParseException


            parseXdoc(parser, sink);
        }
        catch (Exception ex)
        {
            throw new ParseException("Error parsing the model.", ex);
        }
    }
View Full Code Here


            html.append( "</html>" );
            super.parse( new StringReader( html.toString() ), sink );
        }
        catch ( IOException e )
        {
            throw new ParseException( "Failed reading Markdown source document", e );
        }
    }
View Full Code Here

            getLog().debug( "Validating the content..." );
            getXmlReader( hasXsd && hasDoctype ).parse( new InputSource( new StringReader( content ) ) );
        }
        catch ( IOException e )
        {
            throw new ParseException( "Error validating the model: " + e.getMessage(), e );
        }
        catch ( SAXException e )
        {
            throw new ParseException( "Error validating the model: " + e.getMessage(), e );
        }
    }
View Full Code Here

                lineNumber = reader.getLineNumber();
            }
        }
        catch ( IOException e )
        {
            throw new ParseException( e, lineNumber, 0 );
        }

        lastLine = line;

        return line;
View Full Code Here

            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

            IOUtil.copy( source, contentWriter );
            sourceContent = contentWriter.toString();
        }
        catch ( IOException ex )
        {
            throw new ParseException( "Error reading the input source: " + ex.getMessage(), ex );
        }
        finally
        {
            IOUtil.close( source );
        }
View Full Code Here

                {
                    xdocParser.parse( faq.getQuestion(), sink );
                }
                else
                {
                    throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" );
                }

                sink.link_();
                sink.numberedListItem_();
            }

            sink.numberedList_();
        }

        sink.section1_();

        // ----------------------------------------------------------------------
        // Write content
        // ----------------------------------------------------------------------

        for ( Part part : faqs.getParts() )
        {
            if ( StringUtils.isNotEmpty( part.getTitle() ) )
            {
                sink.section1();

                sink.sectionTitle1();
                xdocParser.parse( part.getTitle(), sink );
                sink.sectionTitle1_();
            }

            sink.definitionList();

            for ( Iterator<Faq> faqIterator = part.getFaqs().iterator(); faqIterator.hasNext(); )
            {
                Faq faq = faqIterator.next();

                sink.definedTerm();
                sink.anchor( faq.getId() );

                if ( StringUtils.isNotEmpty( faq.getQuestion() ) )
                {
                    xdocParser.parse( faq.getQuestion(), sink );
                }
                else
                {
                    throw new ParseException( "Missing <question> for FAQ '" + faq.getId() + "'" );
                }

                sink.anchor_();
                sink.definedTerm_();

                sink.definition();

                if ( StringUtils.isNotEmpty( faq.getAnswer() ) )
                {
                    xdocParser.parse( faq.getAnswer(), sink );
                }
                else
                {
                    throw new ParseException( "Missing <answer> for FAQ '" + faq.getId() + "'" );
                }

                if ( faqs.isToplink() )
                {
                    writeTopLink( sink );
View Full Code Here

            final int textGroup = 3;
            source.unget( matcher.group( textGroup ) );
        }
        else
        {
            throw new ParseException( "i was expecting a hruler!" );
        }

        return ret;
    }
View Full Code Here

                    break;
                }
            }
            if ( !accepted )
            {
                throw new ParseException( "Line number not handle : " + source.getLineNumber() + ": " + line );
            }
        }

        return ret;
    }
View Full Code Here

            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

Related Classes of org.apache.maven.doxia.parser.ParseException

Copyright © 2018 www.massapicom. 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.