|
LibreOffice Module xmerge (master) 1
|
A PluginFactory encapsulates the conversions from one Document format to another.
More...
Public Member Functions | |
| PluginFactory (ConverterInfo ci) | |
Constructor that caches the ConvertInfo that corresponds to the registry information for this plug-in. More... | |
| ConverterInfo | getConverterInfo () |
Returns the ConvertInfo that corresponds to this plug-in. More... | |
| abstract Document | createOfficeDocument (String name, InputStream is) throws IOException |
Create a Document object that corresponds to the Office data passed in via the InputStream object. More... | |
| abstract Document | createOfficeDocument (String name, InputStream is, boolean isZip) throws IOException |
Create a Document object that corresponds to the Office data passed in via the InputStream object. More... | |
| abstract Document | createDeviceDocument (String name, InputStream is) throws IOException |
Create a Document object that corresponds to the device data passed in via the InputStream object. More... | |
Private Attributes | |
| final ConverterInfo | ciCache |
Cached ConvertInfo object. More... | |
A PluginFactory encapsulates the conversions from one Document format to another.
It provides conversions in both directions. Refer to the package description for its usage.
Conversion from the "Office" Document format to a "Device" Document format may be lossy, i.e. some information may be lost. If a plug-in implements the DocumentMergerFactory interface, then there is the possibility for merging the changes done on the "Device" Document back to the original "Office" Document via the DocumentMerger interface.
Plug-ins that convert from the "Device" Document format to the "Office" Document format must implement the DocumentDeserializerFactory interface. Plug-ins that convert from the "Office" Document format to the "Device" format must implement the DocumentSerializerFactory interface.
All plug-ins should have an associated Plug-in Configuration XML File which describes the capabilities of the plug-in. If the plug-in is bundled in a jarfile, then this XML file is also bundled with the jarfile. The data in the XML file is managed by the ConverterInfo object. The ConverterInfoMgr manages a registry of all ConverterInfo objects. For more information about this XML file, refer to org.openoffice.xmerge.util.registry.
Definition at line 67 of file PluginFactory.java.
|
inline |
Constructor that caches the ConvertInfo that corresponds to the registry information for this plug-in.
| ci | ConvertInfo object. |
Definition at line 80 of file PluginFactory.java.
References org.openoffice.xmerge.PluginFactory.ciCache.
|
abstract |
Create a Document object that corresponds to the device data passed in via the InputStream object.
This abstract method must be implemented for each plug-in.
This method will read from the given InputStream object. The returned Document object will contain the necessary data for the other objects created by the PluginFactory to process, like a DocumentSerializer object and a DocumentMerger object.
| name | The Document name. |
| is | InputStream object corresponding to the Document. |
Document object representing the particular Document format for the PluginFactory.| IOException | If any I/O error occurs. |
Referenced by org.openoffice.xmerge.Convert.addInputStream().
|
abstract |
Create a Document object that corresponds to the Office data passed in via the InputStream object.
This abstract method must be implemented for each plug-in.
This method will read from the given InputStream object. The returned Document object will contain the necessary data for the other objects created by the PluginFactory to process, like a DocumentSerializer object and a DocumentMerger object.
| name | The Document name. |
| is | InputStream object corresponding to the Document. |
Document object representing the particular Document format for the PluginFactory.| IOException | If any I/O error occurs. |
Reimplemented in org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory, org.openoffice.xmerge.converter.xml.sxw.SxwPluginFactory, and org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.
Referenced by org.openoffice.xmerge.Convert.addInputStream(), and org.openoffice.xmerge.Convert.getOfficeDocument().
|
abstract |
Create a Document object that corresponds to the Office data passed in via the InputStream object.
This abstract method must be implemented for each plug-in.
This method will read from the given InputStream object. The returned Document object will contain the necessary data for the other objects created by the PluginFactory to process, like a DocumentSerializer object and a DocumentMerger object.
| name | The Document name. |
| is | InputStream object corresponding to the Document. |
| isZip | boolean to show that the created office document is to be zipped. |
Document object representing the particular Document format for the PluginFactory.| IOException | If any I/O error occurs. |
Reimplemented in org.openoffice.xmerge.converter.xml.sxc.SxcPluginFactory, org.openoffice.xmerge.converter.xml.sxw.SxwPluginFactory, and org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.
|
inline |
Returns the ConvertInfo that corresponds to this plug-in.
ConvertInfo that corresponds to this plug-in. Definition at line 89 of file PluginFactory.java.
References org.openoffice.xmerge.PluginFactory.ciCache.
Referenced by org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.getDeviceFileExtension(), org.openoffice.xmerge.converter.xml.xslt.DocumentDeserializerImpl.resolve(), org.openoffice.xmerge.converter.xml.xslt.DocumentSerializerImpl.resolve(), org.openoffice.xmerge.converter.xml.xslt.DocumentSerializerImpl.transform(), and org.openoffice.xmerge.converter.xml.xslt.DocumentDeserializerImpl.transform().
|
private |
Cached ConvertInfo object.
Definition at line 72 of file PluginFactory.java.
Referenced by org.openoffice.xmerge.PluginFactory.getConverterInfo(), and org.openoffice.xmerge.PluginFactory.PluginFactory().