Package org.apache.maven.doxia.sink

Examples of org.apache.maven.doxia.sink.SinkFactory


            if ( getLog().isDebugEnabled() )
            {
                getLog().debug( "Parser used: " + parser.getClass().getName() );
            }

            SinkFactory sinkFactory;
            try
            {
                sinkFactory = ConverterUtil.getSinkFactory( plexus, output.getFormat(), SUPPORTED_TO_FORMAT );
            }
            catch ( ComponentLookupException e )
            {
                throw new ConverterException( "ComponentLookupException: " + e.getMessage(), e );
            }

            Sink sink;
            try
            {
                sink = sinkFactory.createSink( output.getOutputStream(), output.getEncoding() );
            }
            catch ( IOException e )
            {
                throw new ConverterException( "IOException: " + e.getMessage(), e );
            }
View Full Code Here


        catch ( IOException e )
        {
            throw new ConverterException( "IOException: " + e.getMessage(), e );
        }

        SinkFactory sinkFactory;
        try
        {
            sinkFactory = ConverterUtil.getSinkFactory( plexus, output.getFormat(), SUPPORTED_TO_FORMAT );
        }
        catch ( ComponentLookupException e )
        {
            throw new ConverterException( "ComponentLookupException: " + e.getMessage(), e );
        }

        Sink sink;
        try
        {
            String outputEncoding;
            if ( StringUtils.isEmpty( output.getEncoding() )
                || output.getEncoding().equals( OutputFileWrapper.AUTO_ENCODING ) )
            {
                outputEncoding = inputEncoding;
            }
            else
            {
                outputEncoding = output.getEncoding();
            }

            OutputStream out = new FileOutputStream( outputFile );
            sink = sinkFactory.createSink( out, outputEncoding );
        }
        catch ( IOException e )
        {
            throw new ConverterException( "IOException: " + e.getMessage(), e );
        }
View Full Code Here

        if ( supportedFormats == null )
        {
            throw new IllegalArgumentException( "supportedFormats is required" );
        }

        SinkFactory factory = null;

        for ( int i = 0; i < supportedFormats.length; i++ )
        {
            if ( format.equalsIgnoreCase( supportedFormats[i] ) )
            {
View Full Code Here

            sink.rawText(element.html());
    }
  }
 
  private void createReport(String reportName, Locale locale, Document document) {
        SinkFactory factory = getSinkFactory();
        Sink sink = factory.createSink(getReportOutputDirectory(), reportName);
        sinkBeginReport(sink, getBundle( locale ));
        sink.rawText(document.html());
        //addElements(sink, document.head().getElementsByTag("link"));
    //addElements(sink, document.head().getElementsByTag("script"));
    //addElements(sink, document.body().children());
View Full Code Here

TOP

Related Classes of org.apache.maven.doxia.sink.SinkFactory

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.