LibreOffice Module xmerge (master) 1
Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl Class Reference

Xslt implementation of the PluginFactory. More...

Inheritance diagram for org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl:
[legend]
Collaboration diagram for org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl:
[legend]

Public Member Functions

 PluginFactoryImpl (ConverterInfo ci)
 
DocumentSerializer createDocumentSerializer (Document doc)
 Returns an instance of DocumentSerializerImpl, which is an implementation of the DocumentSerializer interface. More...
 
DocumentDeserializer createDocumentDeserializer (ConvertData cd)
 Returns an instance of DocumentDeserializerImpl, which is an implementation of the DocumentDeserializer interface. More...
 
org.openoffice.xmerge.Document createDeviceDocument (String str, java.io.InputStream inputStream) throws java.io.IOException
 
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...
 
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...
 
DocumentMerger createDocumentMerger (Document doc)
 Returns an instance of DocumentMergerImpl, which is an implementation of the DocumentMerger interface. More...
 
- Public Member Functions inherited from org.openoffice.xmerge.PluginFactory
 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...
 
DocumentDeserializer createDocumentDeserializer (ConvertData cd)
 The DocumentDeserializer is used to convert from the "Device" Document format to the "Office" Document format. More...
 
DocumentSerializer createDocumentSerializer (Document doc)
 The DocumentSerializer is used to convert from the "Office" Document format to the "Device" Document format. More...
 
DocumentMerger createDocumentMerger (Document doc)
 Create a DocumentMerger object given a Document object. More...
 

Private Member Functions

String getDeviceFileExtension ()
 Returns a String containing the file extension of a Document. More...
 

Static Private Attributes

static final ConverterCapabilities converterCap
 ConverterCapabilities object for this type of conversion. More...
 

Detailed Description

Xslt implementation of the PluginFactory.

This encapsulates conversion of StarWriter XML format to and from a supported format.

The superclass produces a particular Document object, i.e. xwDocument that the converters in this class work with. Thus, this class only implements the methods that produces the converters, i.e. DocumentSerializer and DocumentDeserializer

Definition at line 53 of file PluginFactoryImpl.java.

Constructor & Destructor Documentation

◆ PluginFactoryImpl()

org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.PluginFactoryImpl ( ConverterInfo  ci)
inline

Definition at line 57 of file PluginFactoryImpl.java.

Member Function Documentation

◆ createDeviceDocument()

org.openoffice.xmerge.Document org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDeviceDocument ( String  str,
java.io.InputStream  inputStream 
) throws java.io.IOException
inline

◆ createDocumentDeserializer()

DocumentDeserializer org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDocumentDeserializer ( ConvertData  cd)
inline

Returns an instance of DocumentDeserializerImpl, which is an implementation of the DocumentDeserializer interface.

Parameters
cdConvertData object.
Returns
A DocumentDeserializerImpl object.

Implements org.openoffice.xmerge.DocumentDeserializerFactory.

Definition at line 86 of file PluginFactoryImpl.java.

◆ createDocumentMerger()

DocumentMerger org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDocumentMerger ( Document  doc)
inline

Returns an instance of DocumentMergerImpl, which is an implementation of the DocumentMerger interface.

Parameters
docDocument to merge.
Returns
A DocumentMergerImpl object.

Implements org.openoffice.xmerge.DocumentMergerFactory.

Definition at line 169 of file PluginFactoryImpl.java.

References org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.converterCap.

◆ createDocumentSerializer()

DocumentSerializer org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDocumentSerializer ( Document  doc)
inline

Returns an instance of DocumentSerializerImpl, which is an implementation of the DocumentSerializer interface.

Parameters
docDocument object to be converted/serialized.
Returns
A DocumentSerializerImpl object.

Implements org.openoffice.xmerge.DocumentSerializerFactory.

Definition at line 73 of file PluginFactoryImpl.java.

◆ createOfficeDocument() [1/2]

Document org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createOfficeDocument ( String  name,
InputStream  is 
) throws IOException
inline

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.

Parameters
nameThe Document name.
isInputStream object corresponding to the Document.
Returns
A Document object representing the particular Document format for the PluginFactory.
Exceptions
IOExceptionIf any I/O error occurs.

Reimplemented from org.openoffice.xmerge.PluginFactory.

Definition at line 100 of file PluginFactoryImpl.java.

References name.

◆ createOfficeDocument() [2/2]

Document org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createOfficeDocument ( String  name,
InputStream  is,
boolean  isZip 
) throws IOException
inline

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.

Parameters
nameThe Document name.
isInputStream object corresponding to the Document.
isZipboolean to show that the created office document is to be zipped.
Returns
A Document object representing the particular Document format for the PluginFactory.
Exceptions
IOExceptionIf any I/O error occurs.

Reimplemented from org.openoffice.xmerge.PluginFactory.

Definition at line 110 of file PluginFactoryImpl.java.

References name.

◆ getDeviceFileExtension()

String org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.getDeviceFileExtension ( )
inlineprivate

Returns a String containing the file extension of a Document.

This method uses a properties file to determine a mapping from the device mime in the ConverterInfo to a particular file extension. If a mapping is not specified, the default is ".txt".

Returns
The file extension of a Document.

Definition at line 129 of file PluginFactoryImpl.java.

References ex, Exception, getClass(), org.openoffice.xmerge.PluginFactory.getConverterInfo(), org.openoffice.xmerge.util.registry.ConverterInfo.getDeviceMime(), org.openoffice.xmerge.merger.Iterator.next(), Properties, props, and String.

Referenced by org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDeviceDocument().

Member Data Documentation

◆ converterCap

final ConverterCapabilities org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.converterCap
staticprivate
Initial value:
=
new ConverterCapabilitiesImpl()

ConverterCapabilities object for this type of conversion.

Definition at line 62 of file PluginFactoryImpl.java.

Referenced by org.openoffice.xmerge.converter.xml.xslt.PluginFactoryImpl.createDocumentMerger().


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