LibreOffice Module xmerge (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.Convert Class Reference

The. More...

Inheritance diagram for org.openoffice.xmerge.Convert:
[legend]
Collaboration diagram for org.openoffice.xmerge.Convert:
[legend]

Public Member Functions

 Convert (ConverterInfo ci, boolean toOffice)
 Construct a Convert class with specified. More...
 
void addInputStream (String name, InputStream is) throws IOException
 Adds an. More...
 
void addInputStream (String name, InputStream is, boolean isZip) throws IOException
 Adds an. More...
 
DocumentMerger getDocumentMerger (Document origDoc) throws IOException
 Returns a. More...
 
Object clone ()
 Clones a. More...
 
ConvertData convert () throws ConvertException, IOException
 Convert the input specified in calls to the. More...
 
Document getOfficeDocument (String name, InputStream is) throws IOException
 Returns the appropriate "Office". More...
 

Private Member Functions

void reset ()
 Resets the input queue, so that the user can use this class to perform another conversion. More...
 

Private Attributes

final ConverterInfo ci
 ConvertInfo that corresponds to the from-mime/to-mime conversion. More...
 
final boolean toOffice
 
final ConvertData inputCD = new ConvertData()
 Holds the convert input data. More...
 

Detailed Description

The.

class manages a conversion from one mime-type to another.

The

ConvertFactory

is responsible for returning the appropriate

class for a specified conversion. This class is responsible for all interactions with the

PluginFactory

implementation.

See also
ConverterFactory
PluginFactory
org.openoffice.xmerge.util.registry.ConverterInfo

Definition at line 38 of file Convert.java.

Constructor & Destructor Documentation

org.openoffice.xmerge.Convert.Convert ( ConverterInfo  ci,
boolean  toOffice 
)
inline

Construct a Convert class with specified.

ConvertInfo

registry information.

Parameters
ciA
ConvertInfo
object containing registry information corresponding to a specific plug-in.
toOffice

Definition at line 61 of file Convert.java.

References org.openoffice.xmerge.Convert.ci, and org.openoffice.xmerge.Convert.toOffice.

Referenced by org.openoffice.xmerge.Convert.clone().

Member Function Documentation

void org.openoffice.xmerge.Convert.addInputStream ( String  name,
InputStream  is 
) throws IOException
inline

Adds an.

InputStream

to be used as input by the

class.

It is possible that many files need to be converted into a single output

, so this function may be called more than one time. It is the plug-in's responsibility to know how to handle the input.

Parameters
nameThe name corresponding to the
InputStream
.
is

Definition at line 80 of file Convert.java.

References org.openoffice.xmerge.ConvertData.addDocument(), org.openoffice.xmerge.PluginFactory.createDeviceDocument(), org.openoffice.xmerge.PluginFactory.createOfficeDocument(), org.openoffice.xmerge.util.registry.ConverterInfo.getPluginFactory(), and name.

Referenced by org.openoffice.xmerge.util.ActiveSyncDriver.Convert(), XMergeBridge._XMergeBridge.convert(), and org.openoffice.xmerge.test.Driver.doConversion().

void org.openoffice.xmerge.Convert.addInputStream ( String  name,
InputStream  is,
boolean  isZip 
) throws IOException
inline

Adds an.

InputStream

to be used as input by the

class.

It is possible that many files need to be converted into a single output

, so this function may be called more than one time. It is the plug-in's responsibility to know how to handle the input.

Parameters
nameThe name corresponding to the
InputStream
.
is

Definition at line 108 of file Convert.java.

References org.openoffice.xmerge.ConvertData.addDocument(), org.openoffice.xmerge.PluginFactory.createDeviceDocument(), org.openoffice.xmerge.PluginFactory.createOfficeDocument(), org.openoffice.xmerge.util.registry.ConverterInfo.getPluginFactory(), and name.

Object org.openoffice.xmerge.Convert.clone ( )
inline

Clones a.

object so another Convert object can do the same conversion.

InputStream

objects passed in via calls to the

method are not copied.

Returns
The cloned object.

Definition at line 158 of file Convert.java.

References org.openoffice.xmerge.Convert.clone(), org.openoffice.xmerge.Convert.Convert(), Object, org.openoffice.xmerge.Convert.reset(), and System.

Referenced by org.openoffice.xmerge.Convert.clone().

ConvertData org.openoffice.xmerge.Convert.convert ( ) throws ConvertException, IOException
inline
DocumentMerger org.openoffice.xmerge.Convert.getDocumentMerger ( Document  origDoc) throws IOException
inline

Returns a.

DocumentMerger

for the given

.

Parameters
origDocThe were later changes will be merged to.
Returns
The
DocumentMerger
object for the given document.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 131 of file Convert.java.

References org.openoffice.xmerge.DocumentMergerFactory.createDocumentMerger(), and org.openoffice.xmerge.util.registry.ConverterInfo.getDocMergerFactory().

Referenced by org.openoffice.xmerge.test.Driver.doConversion().

Document org.openoffice.xmerge.Convert.getOfficeDocument ( String  name,
InputStream  is 
) throws IOException
inline

Returns the appropriate "Office".

object for this plug-in.

Parameters
nameThe name of the to create.
isThe
InputStream
corresponding to the to create.
Returns
The appropriate "Office" object for this plug-in.
Exceptions
IOExceptionIf any I/O error occurs.

Definition at line 229 of file Convert.java.

References org.openoffice.xmerge.PluginFactory.createOfficeDocument(), org.openoffice.xmerge.util.registry.ConverterInfo.getPluginFactory(), and name.

Referenced by org.openoffice.xmerge.test.Driver.doConversion().

void org.openoffice.xmerge.Convert.reset ( )
inlineprivate

Resets the input queue, so that the user can use this class to perform another conversion.

This causes the

method to accept input for the next conversion.

Definition at line 144 of file Convert.java.

References org.openoffice.xmerge.ConvertData.reset().

Referenced by org.openoffice.xmerge.Convert.clone().

Member Data Documentation

final ConverterInfo org.openoffice.xmerge.Convert.ci
private

ConvertInfo that corresponds to the from-mime/to-mime conversion.

Definition at line 41 of file Convert.java.

Referenced by org.openoffice.xmerge.Convert.Convert().

final ConvertData org.openoffice.xmerge.Convert.inputCD = new ConvertData()
private

Holds the convert input data.

Definition at line 50 of file Convert.java.

final boolean org.openoffice.xmerge.Convert.toOffice
private
true

if converting to the Office format,

false

if converting to the device format.

Definition at line 47 of file Convert.java.

Referenced by org.openoffice.xmerge.Convert.Convert().


The documentation for this class was generated from the following file: