19package org.openoffice.xmerge;
21import java.io.IOException;
22import java.io.InputStream;
23import java.util.Iterator;
38public class Convert implements Cloneable {
166 catch (CloneNotSupportedException e) {
167 System.out.println(
"Convert clone could not be created");
ConvertData is used as a container for passing Document objects in and out of the Convert class.
void addDocument(Document doc)
Adds a Document to the vector.
void reset()
Resets ConvertData.
Iterator< Object > getDocumentEnumeration()
Gets an Enumeration to access the Vector of Document objects.
This Exception is thrown by convert algorithms.
The Convert class manages a conversion from one mime-type to another.
final boolean toOffice
true if converting to the Office format, false if converting to the device format.
Convert(ConverterInfo ci, boolean toOffice)
Construct a Convert class with specified ConvertInfo registry information.
void reset()
Resets the input queue, so that the user can use this class to perform another conversion.
Object clone()
Clones a Convert object so another Convert object can do the same conversion.
void addInputStream(String name, InputStream is, boolean isZip)
Adds an InputStream to be used as input by the Convert class.
void addInputStream(String name, InputStream is)
Adds an InputStream to be used as input by the Convert class.
Document getOfficeDocument(String name, InputStream is)
Returns the appropriate "Office" Document object for this plug-in.
final ConvertData inputCD
Holds the convert input data.
DocumentMerger getDocumentMerger(Document origDoc)
Returns a DocumentMerger for the given Document.
ConvertData convert()
Convert the input specified in calls to the addInputStream method to the output format specified by t...
final ConverterInfo ci
ConvertInfo that corresponds to the from-mime/to-mime conversion.
abstract Document createOfficeDocument(String name, InputStream is)
Create a Document object that corresponds to the Office data passed in via the InputStream object.
abstract Document createDeviceDocument(String name, InputStream is)
Create a Document object that corresponds to the device data passed in via the InputStream object.
Class for storing the information about a converter plug-in.
DocumentSerializerFactory getDocSerializerFactory()
Returns an instance of the DocumentDeserializerFactory interface.
DocumentDeserializerFactory getDocDeserializerFactory()
Returns an instance of the DocumentSerializerFactory interface.
PluginFactory getPluginFactory()
Returns the PluginFactory instance for this plug-in.
DocumentMergerFactory getDocMergerFactory()
Returns an instance of the DocumentMergerFactory interface.
A DocumentDeserializer object is used to convert from the "Device" Document format to the "Office" Do...
DocumentDeserializer createDocumentDeserializer(ConvertData cd)
The DocumentDeserializer is used to convert from the "Device" Document format to the "Office" Documen...
A DocumentDeserializer represents a converter that converts "Device" Document objects into the "Offic...
Document deserialize()
Convert the data passed into the DocumentDeserializer constructor into the "Office" Document format.
All plug-in implementations of the PluginFactory interface that also support merging must also implem...
DocumentMerger createDocumentMerger(Document doc)
Create a DocumentMerger object given a Document object.
A DocumentMerger can merge changes from a modified "Device" Document to the assigned original "Office...
A DocumentSerializer object is used to convert from the "Office" Document format to the "Device" Docu...
DocumentSerializer createDocumentSerializer(Document doc)
The DocumentSerializer is used to convert from the "Office" Document format to the "Device" Document ...
A DocumentSerializer represents a converter that converts a "Office" Document to a "Device" Document ...
ConvertData serialize()
Convert the data passed into the DocumentSerializer constructor into the "Device" Document format.
A Document represents any Document to be converted and the resulting Document from any conversion.
Provides an interface for plug-in registration.
Provides general purpose utilities.
Provides interfaces for converting between two Document formats, and supports a "merge" interface for...