Class BaseConfigurationXMLReader

  • All Implemented Interfaces:
    org.xml.sax.XMLReader

    public class BaseConfigurationXMLReader
    extends ConfigurationXMLReader

    A specialized SAX2 XML parser that processes configuration objects.

    This class mimics to be a SAX compliant XML parser. It is able to iterate over the keys in a configuration object and to generate corresponding SAX events. By registering a ContentHandler at an instance it is possible to perform XML processing on a configuration object.

    • Constructor Detail

      • BaseConfigurationXMLReader

        public BaseConfigurationXMLReader()
        Creates a new instance of BaseConfigurationXMLReader.
      • BaseConfigurationXMLReader

        public BaseConfigurationXMLReader​(Configuration conf)
        Creates a new instance of BaseConfigurationXMLReader and sets the configuration object to be parsed.
        Parameters:
        conf - the configuration to be parsed
    • Method Detail

      • getConfiguration

        public Configuration getConfiguration()
        Returns the actual configuration to be processed.
        Returns:
        the actual configuration
      • setConfiguration

        public void setConfiguration​(Configuration conf)
        Sets the configuration to be processed.
        Parameters:
        conf - the configuration
      • processKeys

        protected void processKeys()
        The main SAX event generation method. This element uses an internal HierarchicalConfigurationConverter object to iterate over all keys in the actual configuration and to generate corresponding SAX events.
        Specified by:
        processKeys in class ConfigurationXMLReader