com.marsching.flexiparse.parser
Class XMLConfiguredParser

java.lang.Object
  extended by com.marsching.flexiparse.parser.SimpleParser
      extended by com.marsching.flexiparse.parser.XMLConfiguredParser
All Implemented Interfaces:
Parser
Direct Known Subclasses:
ClasspathConfiguredParser, OSGiAwareParser

public class XMLConfiguredParser
extends SimpleParser

Parser implementation that is configured using XML configuration files.

Author:
Sebastian Marsching
See Also:
XMLConfigurationReader

Field Summary
 
Fields inherited from class com.marsching.flexiparse.parser.SimpleParser
documentBuilder, mappingConfigurations, nodeHandlers
 
Constructor Summary
XMLConfiguredParser()
           
 
Method Summary
 void addConfigurationSource(InputSource configurationSource)
          Adds all handlers specified in the configuration file to this parser.
 void addConfigurationSource(InputSource configurationSource, ClassLoader classLoader)
          Adds all handlers specified in the configuration file to this parser.
 void addConfigurationSources(Collection<? extends InputSource> configurationSources)
          Adds all handlers specified in all the configuration files to this parser.
 
Methods inherited from class com.marsching.flexiparse.parser.SimpleParser
addElementMappingConfiguration, addNodeHandler, getElementMappingConfigurations, getHandlerOrder, getNodeHandlers, parse, parse, parse, parse, removeElementMappingConfiguration, removeNodeHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLConfiguredParser

public XMLConfiguredParser()
Method Detail

addConfigurationSource

public void addConfigurationSource(InputSource configurationSource)
                            throws ParserException
Adds all handlers specified in the configuration file to this parser.

Parameters:
configurationSource - input source to read configuration from
Throws:
ParserException - if an error occurs while parsing the configuration file

addConfigurationSource

public void addConfigurationSource(InputSource configurationSource,
                                   ClassLoader classLoader)
                            throws ParserException
Adds all handlers specified in the configuration file to this parser. Loads handler class with supplied class loader.

Parameters:
configurationSource - input source to read configuration from
classLoader - class loader that is used to load handler classes
Throws:
ParserException - if an error occurs while parsing the configuration file

addConfigurationSources

public void addConfigurationSources(Collection<? extends InputSource> configurationSources)
                             throws ParserException
Adds all handlers specified in all the configuration files to this parser.

Parameters:
configurationSources - input sources to read configurations from
Throws:
ParserException - if an error occurs while parsing on of the configuration files


Copyright © 2008-2009. All Rights Reserved.