Package writer2latex.api
Interface Converter
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-
Method Summary
Modifier and TypeMethodDescriptionConvert a documentconvert(InputStream is, String sTargetFileName) Convert a documentConvert a documentGet the interface for the configuration of this convertervoidDefine aGraphicConverterimplementation to use for conversion of graphic files.
-
Method Details
-
getConfig
Config getConfig()Get the interface for the configuration of this converter- Returns:
- the configuration
-
setGraphicConverter
Define aGraphicConverterimplementation to use for conversion of graphic files. If no converter is specified, graphic files will not be converted into other formats.- Parameters:
gc- theGraphicConverterto use
-
convert
Convert a document- Parameters:
is- anInputStreamfrom 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)- Returns:
- a
ConverterResultcontaining the converted document - Throws:
IOException- if some exception occurs while reading the document
-
convert
ConverterResult convert(File source, String sTargetFileName) throws FileNotFoundException, IOException Convert a document- Parameters:
source- aFilefrom 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)- Returns:
- a
ConverterResultcontaining the converted document - Throws:
FileNotFoundException- if the file does not existIOException- if some exception occurs while reading the document
-
convert
Convert a document- Parameters:
dom- a DOM tree representing the document as flat XMLsTargetFileName- 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)- Returns:
- a
ConverterResultcontaining the converted document - Throws:
IOException- if some exception occurs while reading the document
-