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 ConvertDataprotected GraphicConverterprotected ImageLoaderprotected MetaDataprotected OfficeDocumentprotected OfficeReaderprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDocument(OutputFile doc) Convert a documentconvert(InputStream is, String sTargetFileName) Convert a documentabstract voidgetEmbeddedObject(String sHref) voidreadTemplate(File file) Read a template to use as a base for the converted document.voidRead a template to use as a base for the converted document.voidsetGraphicConverter(GraphicConverter graphicConverter) Define aGraphicConverterimplementation 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:ConverterDefine aGraphicConverterimplementation to use for conversion of graphic files. If no converter is specified, graphic files will not be converted into other formats.- Specified by:
setGraphicConverterin interfaceConverter- Parameters:
graphicConverter- theGraphicConverterto use
-
readTemplate
Description copied from interface:ConverterRead a template to use as a base for the converted document. The format of the template depends on theConverterimplementation.- Specified by:
readTemplatein interfaceConverter- Parameters:
is- anInputStreamfrom which to read the template- Throws:
IOException- if some exception occurs while reading the template
-
readTemplate
Description copied from interface:ConverterRead a template to use as a base for the converted document. The format of the template depends on theConverterimplementation.- Specified by:
readTemplatein 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:ConverterConvert a document- Specified by:
convertin interfaceConverter- 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
Description copied from interface:ConverterConvert a document- Specified by:
convertin interfaceConverter- 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
-
convertInner
- Throws:
IOException
-
getMetaData
-
getImageLoader
-
addDocument
-
getEmbeddedObject
-