LibreOffice Module xmerge (master)  1
Packages | Classes
Package org.openoffice.xmerge

Provides interfaces for converting between two. More...


package  converter
package  merger
package  test
package  util
 Provides general purpose utilities.


class  Convert
 The. More...
class  ConvertData
interface  ConverterCapabilities
 A. More...
class  ConverterFactory
 Factory that provides access to. More...
class  ConvertException
 This. More...
interface  Document
 A. More...
interface  DocumentDeserializer
 A. More...
interface  DocumentDeserializer2
 A. More...
interface  DocumentDeserializerFactory
 A. More...
interface  DocumentMerger
 A. More...
interface  DocumentMergerFactory
 All plug-in implementations of the. More...
interface  DocumentSerializer
 A. More...
interface  DocumentSerializer2
 A. More...
interface  DocumentSerializerFactory
 A. More...
class  MergeException
 This. More...
class  PluginFactory
 A. More...
class  Version
 This class provides a quick utility to check the version of the jar file. More...

Detailed Description

Provides interfaces for converting between two.

formats, and supports a { "merge"} interface for merging back changes from a { "lossy"} format back into a rich format.

The Convert object encapsulates the conversion of one format to/from another format. The user requests a


object via the





class encapsulates a specific plug-in. A plug-in can support deserialization (convert from { "Device"} to { "Office"}) and/or serialization (convert from { "Office"} to { "Device"}). If a plug-in supports both deserialization and serialization, then it can also support { "merge"}.

To support conversions where a single input

can create multiple output

objects, data is passed in and out of the conversion functions via a

object. This

can contain one or more

objects. It is assumed that the client will know when to pass multiple files into a specific plug-in, and that the plug-in will know how to handle the multiple files.

Merging is useful when converting from a rich

format to a more lossy format. Then the user may modify the

in the lossy format, and { "merge"} those changes back into the original { "rich"}

. Each merge implementation provides a


implementation so that the merge logic knows what changes from the { "lossy"} format to merge into the original { "rich"}


Each plug-in must be registered via the singleton


object via its addPlugIn method.

Providing implementations

The plug-in implementation must include the




methods. These functions need to return the appropriate type of

for the plug-in. It may be necessary to create a new implementation of the

interface if one does not exist that meets the needs of the plug-in.

Currently, base implementations for working with StarWriter XML

objects are available via the org.openoffice.xmerge.xml.sxw package, and StarCalc XML

objects via the org.openoffice.xmerge.xml.sxc package.


  1. An idea is to combine the and the
    classes, so that a knows what it can convert into and whether or not it can merge. Then a user would call convert/merge methods on the class, which returns a object that likewise knows what it can convert/merge into.
  2. DocumentSerialize
    constructors and the
    method could pass in a object rather than assuming a single will represent a { "rich"} .
  3. May need to add a
    method for adding properties specific to each converter.