org.apache.maven.doxia
Class DefaultConverter

java.lang.Object
  extended by org.apache.maven.doxia.DefaultConverter
All Implemented Interfaces:
Converter, org.apache.maven.doxia.logging.LogEnabled

public class DefaultConverter
extends Object
implements Converter

Default implementation of Converter

Version:
$Id$
Author:
Vincent Siveton

Field Summary
static String[] SUPPORTED_FROM_FORMAT
          Supported input format, i.e.
static String[] SUPPORTED_TO_FORMAT
          Supported output format, i.e.
 
Constructor Summary
DefaultConverter()
           
 
Method Summary
 void convert(InputFileWrapper input, OutputFileWrapper output)
          
 void convert(InputReaderWrapper input, OutputStreamWrapper output)
          
 void enableLogging(org.apache.maven.doxia.logging.Log log)
          
 String[] getInputFormats()
          
protected  org.apache.maven.doxia.logging.Log getLog()
          Returns a logger for this sink.
 String[] getOutputFormats()
          
 void setFormatOutput(boolean formatOutput)
          Make the generated files human readable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_FROM_FORMAT

public static final String[] SUPPORTED_FROM_FORMAT
Supported input format, i.e. supported Doxia parser


SUPPORTED_TO_FORMAT

public static final String[] SUPPORTED_TO_FORMAT
Supported output format, i.e. supported Doxia Sink

Constructor Detail

DefaultConverter

public DefaultConverter()
Method Detail

enableLogging

public void enableLogging(org.apache.maven.doxia.logging.Log log)

Specified by:
enableLogging in interface org.apache.maven.doxia.logging.LogEnabled

getLog

protected org.apache.maven.doxia.logging.Log getLog()
Returns a logger for this sink. If no logger has been configured, a new SystemStreamLog is returned.

Returns:
Log

getInputFormats

public String[] getInputFormats()

Specified by:
getInputFormats in interface Converter
Returns:
a not null array containing supported input formats, i.e. apt.

getOutputFormats

public String[] getOutputFormats()

Specified by:
getOutputFormats in interface Converter
Returns:
a not null array containing supported output formats, i.e. xhtml.

convert

public void convert(InputFileWrapper input,
                    OutputFileWrapper output)
             throws UnsupportedFormatException,
                    ConverterException

Specified by:
convert in interface Converter
Parameters:
input - an input file wrapper, not null.
output - an output file wrapper, not null.
Throws:
UnsupportedFormatException - if any
ConverterException - if any

convert

public void convert(InputReaderWrapper input,
                    OutputStreamWrapper output)
             throws UnsupportedFormatException,
                    ConverterException

Specified by:
convert in interface Converter
Parameters:
input - an input reader wrapper, not null.
output - an output writer wrapper, not null.
Throws:
UnsupportedFormatException - if any
ConverterException - if any

setFormatOutput

public void setFormatOutput(boolean formatOutput)
Make the generated files human readable.
Note: actually, only XML based outputs could be formatted.

Specified by:
setFormatOutput in interface Converter
Parameters:
formatOutput - true to format the generated files, false otherwise.


Copyright © 2005-2010 FuseSource. All Rights Reserved.