Class AbstractOpenOfficeDocumentConverter
- java.lang.Object
-
- com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter
-
- All Implemented Interfaces:
DocumentConverter
- Direct Known Subclasses:
OpenOfficeDocumentConverter
,StreamOpenOfficeDocumentConverter
public abstract class AbstractOpenOfficeDocumentConverter extends java.lang.Object implements DocumentConverter
-
-
Field Summary
Fields Modifier and Type Field Description protected OpenOfficeConnection
openOfficeConnection
-
Constructor Summary
Constructors Constructor Description AbstractOpenOfficeDocumentConverter(OpenOfficeConnection connection)
AbstractOpenOfficeDocumentConverter(OpenOfficeConnection openOfficeConnection, DocumentFormatRegistry documentFormatRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
convert(java.io.File inputFile, DocumentFormat inputFormat, java.io.File outputFile, DocumentFormat outputFormat)
Convert a document.void
convert(java.io.File inputFile, java.io.File outputFile)
Convert a document.void
convert(java.io.File inputFile, java.io.File outputFile, DocumentFormat outputFormat)
Convert a document.void
convert(java.io.InputStream inputStream, DocumentFormat inputFormat, java.io.OutputStream outputStream, DocumentFormat outputFormat)
Convert a document.protected abstract void
convertInternal(java.io.File inputFile, DocumentFormat inputFormat, java.io.File outputFile, DocumentFormat outputFormat)
protected abstract void
convertInternal(java.io.InputStream inputStream, DocumentFormat inputFormat, java.io.OutputStream outputStream, DocumentFormat outputFormat)
protected java.util.Map
getDefaultLoadProperties()
protected DocumentFormatRegistry
getDocumentFormatRegistry()
protected static com.sun.star.beans.PropertyValue
property(java.lang.String name, java.lang.Object value)
protected void
refreshDocument(com.sun.star.lang.XComponent document)
void
setDefaultLoadProperty(java.lang.String name, java.lang.Object value)
protected static com.sun.star.beans.PropertyValue[]
toPropertyValues(java.util.Map properties)
-
-
-
Field Detail
-
openOfficeConnection
protected OpenOfficeConnection openOfficeConnection
-
-
Constructor Detail
-
AbstractOpenOfficeDocumentConverter
public AbstractOpenOfficeDocumentConverter(OpenOfficeConnection connection)
-
AbstractOpenOfficeDocumentConverter
public AbstractOpenOfficeDocumentConverter(OpenOfficeConnection openOfficeConnection, DocumentFormatRegistry documentFormatRegistry)
-
-
Method Detail
-
setDefaultLoadProperty
public void setDefaultLoadProperty(java.lang.String name, java.lang.Object value)
-
getDefaultLoadProperties
protected java.util.Map getDefaultLoadProperties()
-
getDocumentFormatRegistry
protected DocumentFormatRegistry getDocumentFormatRegistry()
-
convert
public void convert(java.io.File inputFile, java.io.File outputFile)
Description copied from interface:DocumentConverter
Convert a document. Both input and output formats are guessed from the file extension.- Specified by:
convert
in interfaceDocumentConverter
-
convert
public void convert(java.io.File inputFile, java.io.File outputFile, DocumentFormat outputFormat)
Description copied from interface:DocumentConverter
Convert a document. The input format is guessed from the file extension.- Specified by:
convert
in interfaceDocumentConverter
-
convert
public void convert(java.io.InputStream inputStream, DocumentFormat inputFormat, java.io.OutputStream outputStream, DocumentFormat outputFormat)
Description copied from interface:DocumentConverter
Convert a document.Note that this method does not close
inputStream
andoutputStream
.- Specified by:
convert
in interfaceDocumentConverter
-
convert
public void convert(java.io.File inputFile, DocumentFormat inputFormat, java.io.File outputFile, DocumentFormat outputFormat)
Description copied from interface:DocumentConverter
Convert a document.- Specified by:
convert
in interfaceDocumentConverter
-
convertInternal
protected abstract void convertInternal(java.io.InputStream inputStream, DocumentFormat inputFormat, java.io.OutputStream outputStream, DocumentFormat outputFormat)
-
convertInternal
protected abstract void convertInternal(java.io.File inputFile, DocumentFormat inputFormat, java.io.File outputFile, DocumentFormat outputFormat)
-
refreshDocument
protected void refreshDocument(com.sun.star.lang.XComponent document)
-
property
protected static com.sun.star.beans.PropertyValue property(java.lang.String name, java.lang.Object value)
-
toPropertyValues
protected static com.sun.star.beans.PropertyValue[] toPropertyValues(java.util.Map properties)
-
-