Package org.apache.fop.util
Class ContentHandlerFactoryRegistry
java.lang.Object
org.apache.fop.util.ContentHandlerFactoryRegistry
This class holds references to various XML handlers used by FOP. It also
supports automatic discovery of additional XML handlers available through
the class path.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContentHandlerFactory
(String classname) Add an XML handler.void
Add an ContentHandlerFactory.private void
discover()
Discovers ContentHandlerFactory implementations through the classpath and dynamically registers them.getFactory
(String namespaceURI) Retrieves a ContentHandlerFactory instance of a given namespace URI.
-
Field Details
-
log
private static org.apache.commons.logging.Log logthe logger -
factories
Map from namespace URIs to ContentHandlerFactories
-
-
Constructor Details
-
ContentHandlerFactoryRegistry
public ContentHandlerFactoryRegistry()Default constructor.
-
-
Method Details
-
addContentHandlerFactory
Add an XML handler. The handler itself is inspected to find out what it supports.- Parameters:
classname
- the fully qualified class name
-
addContentHandlerFactory
Add an ContentHandlerFactory. The instance is inspected to find out what it supports.- Parameters:
factory
- the ContentHandlerFactory instance
-
getFactory
Retrieves a ContentHandlerFactory instance of a given namespace URI.- Parameters:
namespaceURI
- the namespace to be handled.- Returns:
- the ContentHandlerFactory or null, if no suitable instance is available.
-
discover
private void discover()Discovers ContentHandlerFactory implementations through the classpath and dynamically registers them.
-