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

The ConverterInfoReader pulls a META-INF/converter.xml file out of a jar file and parses it, providing access to this information in a Vector of ConverterInfo objects. More...

Collaboration diagram for org.openoffice.xmerge.util.registry.ConverterInfoReader:
[legend]

Public Member Functions

 ConverterInfoReader (String jar, boolean shouldvalidate) throws IOException, ParserConfigurationException, org.xml.sax.SAXException, RegistryException
 Constructor. More...
 
Iterator< ConverterInfogetConverterInfoEnumeration ()
 Returns an Enumeration of ConverterInfo objects. More...
 

Private Member Functions

void parseDocument () throws RegistryException
 Loops over the converter Node in the converter.xml file and processes them. More...
 
void parseConverterNode (Element e) throws RegistryException
 Parses a converter node, pulling the information out of the Node and placing it in a ConverterInfo object, and adds that object to a Vector of ConverterInfo objects. More...
 
String getTextValue (Element e)
 Helper function to get the text value of an Element. More...
 

Private Attributes

final String jarfilename
 
final Document document
 
final ArrayList< ConverterInfoconverterInfoList
 

Static Private Attributes

static final String TAG_CONVERTER = "converter"
 
static final String ATTRIB_OFFICE_TYPE = "type"
 
static final String ATTRIB_VERSION = "version"
 
static final String TAG_NAME = "converter-display-name"
 
static final String TAG_DESC = "converter-description"
 
static final String TAG_VENDOR = "converter-vendor"
 
static final String TAG_CLASS_IMPL = "converter-class-impl"
 
static final String TAG_TARGET = "converter-target"
 
static final String ATTRIB_DEVICE_TYPE = "type"
 
static final String TAG_XSLT_DESERIAL = "converter-xslt-deserialize"
 
static final String TAG_XSLT_SERIAL = "converter-xslt-serialize"
 

Detailed Description

The ConverterInfoReader pulls a META-INF/converter.xml file out of a jar file and parses it, providing access to this information in a Vector of ConverterInfo objects.

Definition at line 35 of file ConverterInfoReader.java.

Constructor & Destructor Documentation

◆ ConverterInfoReader()

org.openoffice.xmerge.util.registry.ConverterInfoReader.ConverterInfoReader ( String  jar,
boolean  shouldvalidate 
) throws IOException, ParserConfigurationException, org.xml.sax.SAXException, RegistryException
inline

Constructor.

A jar file is passed in. The jar file is parsed and the Vector of ConverterInfo objects is built.

Parameters
jarThe URL of the jar file to process.
shouldvalidateBoolean to enable or disable xml validation.
Exceptions
IOExceptionIf the jar file cannot be read or if the META-INF/converter.xml can not be read in the jar file.
ParserConfigurationExceptionIf the DocumentBuilder can not be built.
org.xml.sax.SAXExceptionIf the converter.xml file can not be parsed.
RegistryExceptionIf the ConverterFactory implementation of a plug-in cannot be loaded.

Definition at line 72 of file ConverterInfoReader.java.

References org.openoffice.xmerge.util.registry.ConverterInfoReader.converterInfoList, org.openoffice.xmerge.util.registry.ConverterInfoReader.document, org.openoffice.xmerge.util.registry.ConverterInfoReader.jarfilename, org.openoffice.xmerge.util.registry.ConverterInfoReader.parseDocument(), System, and URL.

Member Function Documentation

◆ getConverterInfoEnumeration()

Iterator< ConverterInfo > org.openoffice.xmerge.util.registry.ConverterInfoReader.getConverterInfoEnumeration ( )
inline

◆ getTextValue()

String org.openoffice.xmerge.util.registry.ConverterInfoReader.getTextValue ( Element  e)
inlineprivate

Helper function to get the text value of an Element.

Parameters
eThe Element to process.
Returns
The text value of the Element.

Definition at line 220 of file ConverterInfoReader.java.

References String, and text().

Referenced by org.openoffice.xmerge.util.registry.ConverterInfoReader.parseConverterNode().

◆ parseConverterNode()

void org.openoffice.xmerge.util.registry.ConverterInfoReader.parseConverterNode ( Element  e) throws RegistryException
inlineprivate

◆ parseDocument()

void org.openoffice.xmerge.util.registry.ConverterInfoReader.parseDocument ( ) throws RegistryException
inlineprivate

Member Data Documentation

◆ ATTRIB_DEVICE_TYPE

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.ATTRIB_DEVICE_TYPE = "type"
staticprivate

◆ ATTRIB_OFFICE_TYPE

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.ATTRIB_OFFICE_TYPE = "type"
staticprivate

◆ ATTRIB_VERSION

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.ATTRIB_VERSION = "version"
staticprivate

◆ converterInfoList

final ArrayList<ConverterInfo> org.openoffice.xmerge.util.registry.ConverterInfoReader.converterInfoList
private

◆ document

final Document org.openoffice.xmerge.util.registry.ConverterInfoReader.document
private

◆ jarfilename

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.jarfilename
private

◆ TAG_CLASS_IMPL

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_CLASS_IMPL = "converter-class-impl"
staticprivate

◆ TAG_CONVERTER

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_CONVERTER = "converter"
staticprivate

◆ TAG_DESC

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_DESC = "converter-description"
staticprivate

◆ TAG_NAME

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_NAME = "converter-display-name"
staticprivate

◆ TAG_TARGET

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_TARGET = "converter-target"
staticprivate

◆ TAG_VENDOR

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_VENDOR = "converter-vendor"
staticprivate

◆ TAG_XSLT_DESERIAL

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_XSLT_DESERIAL = "converter-xslt-deserialize"
staticprivate

◆ TAG_XSLT_SERIAL

final String org.openoffice.xmerge.util.registry.ConverterInfoReader.TAG_XSLT_SERIAL = "converter-xslt-serialize"
staticprivate

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