org.openoffice.xmerge
Class ConverterFactory
java.lang.Object
|
+--org.openoffice.xmerge.ConverterFactory
- public class ConverterFactory
- extends java.lang.Object
Factory that provides access to Convert
objects, which
are used to do a conversion. The ConvertFactory
does
this via the ConvertInfoMgr
which maintains a list of
which Convert
objects are available and their
capabilities.
- See Also:
Convert
,
ConverterInfoMgr
Method Summary |
boolean |
canConvert(java.lang.String mimeTypeIn,
java.lang.String mimeTypeOut)
Confirms whether or not a particular conversion can be done
based on the Mime types of the files to be converted to and
from. |
Convert |
getConverter(ConverterInfo ci,
boolean toOffice)
Returns the Convert object that is described
by the ConverterInfo parameter. |
Convert |
getConverter(java.lang.String mimeTypeIn,
java.lang.String mimeTypeOut)
Returns the Convert object that converts
the specified device/office mime type conversion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterFactory
public ConverterFactory()
canConvert
public boolean canConvert(java.lang.String mimeTypeIn,
java.lang.String mimeTypeOut)
- Confirms whether or not a particular conversion can be done
based on the Mime types of the files to be converted to and
from.
- Parameters:
mimeTypeIn
- The mime input type.mimeTypeOut
- The mime output type.- Returns:
- true if the conversion is possible, false otherwise.
getConverter
public Convert getConverter(ConverterInfo ci,
boolean toOffice)
- Returns the
Convert
object that is described
by the ConverterInfo
parameter.
- Parameters:
ci
- The ConverterInfo
describing the converter.toOffice
- true to convert to office, false to convert to device.- Returns:
- The
Convert
object
getConverter
public Convert getConverter(java.lang.String mimeTypeIn,
java.lang.String mimeTypeOut)
- Returns the
Convert
object that converts
the specified device/office mime type conversion. If there
are multiple Converter
objects registered
that support this conversion, only the first is returned.
- Parameters:
mimeTypeIn
- The mime input type.mimeTypeOut
- The mime output type.- Returns:
- The first
Convert
object that supports
the specified conversion.
Copyright © 2002 OpenOffice.org