Package writer2latex.base
Class ConverterBase
java.lang.Object
writer2latex.base.ConverterBase
- All Implemented Interfaces:
Converter
- Direct Known Subclasses:
Converter
,Converter
,ConverterPalette
Abstract base implementation of writer2latex.api.Converter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConvertData
protected GraphicConverter
protected ImageLoader
protected MetaData
protected OfficeDocument
protected OfficeReader
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDocument
(OutputFile doc) Convert a documentconvert
(InputStream is, String sTargetFileName) Convert a documentabstract void
getEmbeddedObject
(String sHref) void
readTemplate
(File file) Read a template to use as a base for the converted document.void
Read a template to use as a base for the converted document.void
setGraphicConverter
(GraphicConverter graphicConverter) Define aGraphicConverter
implementation to use for conversion of graphic files.
-
Field Details
-
graphicConverter
-
odDoc
-
ofr
-
metaData
-
imageLoader
-
sTargetFileName
-
convertData
-
-
Constructor Details
-
ConverterBase
public ConverterBase()
-
-
Method Details
-
setGraphicConverter
Description copied from interface:Converter
Define aGraphicConverter
implementation to use for conversion of graphic files. If no converter is specified, graphic files will not be converted into other formats.- Specified by:
setGraphicConverter
in interfaceConverter
- Parameters:
graphicConverter
- theGraphicConverter
to use
-
readTemplate
Description copied from interface:Converter
Read a template to use as a base for the converted document. The format of the template depends on theConverter
implementation.- Specified by:
readTemplate
in interfaceConverter
- Parameters:
is
- anInputStream
from which to read the template- Throws:
IOException
- if some exception occurs while reading the template
-
readTemplate
Description copied from interface:Converter
Read a template to use as a base for the converted document. The format of the template depends on theConverter
implementation.- Specified by:
readTemplate
in interfaceConverter
- Parameters:
file
- a file from which to read the template- Throws:
IOException
- if the file does not exist or some exception occurs while reading the template
-
convert
public ConverterResult convert(File source, String sTargetFileName) throws FileNotFoundException, IOException Description copied from interface:Converter
Convert a document- Specified by:
convert
in interfaceConverter
- Parameters:
source
- aFile
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)- Returns:
- a
ConverterResult
containing the converted document - Throws:
FileNotFoundException
- if the file does not existIOException
- if some exception occurs while reading the document
-
convert
Description copied from interface:Converter
Convert a document- Specified by:
convert
in interfaceConverter
- Parameters:
is
- anInputStream
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)- Returns:
- a
ConverterResult
containing the converted document - Throws:
IOException
- if some exception occurs while reading the document
-
convertInner
- Throws:
IOException
-
getMetaData
-
getImageLoader
-
addDocument
-
getEmbeddedObject
-