Class ContentHandlerFactoryRegistry


  • public class ContentHandlerFactoryRegistry
    extends java.lang.Object
    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 
      Modifier and Type Field Description
      private java.util.Map factories
      Map from namespace URIs to ContentHandlerFactories
      private static org.apache.commons.logging.Log log
      the logger
    • Field Detail

      • log

        private static org.apache.commons.logging.Log log
        the logger
      • factories

        private java.util.Map factories
        Map from namespace URIs to ContentHandlerFactories
    • Constructor Detail

      • ContentHandlerFactoryRegistry

        public ContentHandlerFactoryRegistry()
        Default constructor.
    • Method Detail

      • addContentHandlerFactory

        public void addContentHandlerFactory​(java.lang.String classname)
        Add an XML handler. The handler itself is inspected to find out what it supports.
        Parameters:
        classname - the fully qualified class name
      • addContentHandlerFactory

        public void addContentHandlerFactory​(ContentHandlerFactory factory)
        Add an ContentHandlerFactory. The instance is inspected to find out what it supports.
        Parameters:
        factory - the ContentHandlerFactory instance
      • getFactory

        public ContentHandlerFactory getFactory​(java.lang.String namespaceURI)
        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.