writer2latex.api
Interface Converter
- Converter, Converter, ConverterBase, ConverterPalette, Xhtml10Converter, XhtmlMathMLConverter, XhtmlMathMLXSLConverter
public interface Converter
This is an interface for a converter, which offers conversion of
OpenDocument (or OpenOffice.org 1.x) documents into a specific format.
Instances of this interface are created using the
ConverterFactory
convert
public ConverterResult convert(File source,
String sTargetFileName)
throws FileNotFoundException,
IOExceptionConvert a document
source - a File from which to read the source document.sTargetFileName - the file name to use for the converted document
(if the converted document is a compound document consisting consisting
of several files, this name will be used for the master document)
- a
ConverterResult containing the converted document
convert
public ConverterResult convert(InputStream is,
String sTargetFileName)
throws IOExceptionConvert a document
is - an InputStream from which to read the source document.sTargetFileName - the file name to use for the converted document
(if the converted document is a compound document consisting consisting
of several files, this name will be used for the master document)
- a
ConverterResult containing the converted document
getConfig
public Config getConfig()
Get the interface for the configuration of this converter
readTemplate
public void readTemplate(File file)
throws IOExceptionRead a template to use as a base for the converted document.
The format of the template depends on the Converter
implementation.
file - a file from which to read the template
readTemplate
public void readTemplate(InputStream is)
throws IOExceptionRead a template to use as a base for the converted document.
The format of the template depends on the Converter
implementation.
is - an InputStream from which to read the template
setGraphicConverter
public void setGraphicConverter(GraphicConverter gc)
Define a GraphicConverter implementation to use for
conversion of graphic files. If no converter is specified, graphic
files will not be converted into other formats.
gc - the GraphicConverter to use