BeanIO 1.2.3

org.beanio.config.xml
Class XmlConfigurationLoader

java.lang.Object
  extended by org.beanio.config.xml.XmlConfigurationLoader
All Implemented Interfaces:
ConfigurationLoader

public class XmlConfigurationLoader
extends Object
implements ConfigurationLoader

Loads BeanIO mapping files in XML format. This class is made thread safe by delegating most of the parsing logic to XmlMappingParser, for which a new instance is created for each input stream that requires parsing.

Since:
1.0
Author:
Kevin Seim

Constructor Summary
XmlConfigurationLoader()
           
 
Method Summary
protected  XmlMappingParser createParser()
          Creates a XmlMappingParser for reading an mapping input stream.
protected  XmlMappingReader getReader()
          Returns the XmlMappingReader for reading XML mapping files into a document object model (DOM).
 Collection<BeanIOConfig> loadConfiguration(InputStream in)
          Loads a BeanIO configuration from an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlConfigurationLoader

public XmlConfigurationLoader()
Method Detail

loadConfiguration

public Collection<BeanIOConfig> loadConfiguration(InputStream in)
                                           throws IOException,
                                                  BeanIOConfigurationException
Description copied from interface: ConfigurationLoader
Loads a BeanIO configuration from an input stream.

Specified by:
loadConfiguration in interface ConfigurationLoader
Parameters:
in - the input stream to read the configuration from
Returns:
a collection of loaded BeanIO configurations
Throws:
IOException - if an I/O error occurs
BeanIOConfigurationException - if the configuration is invalid or malformed

createParser

protected XmlMappingParser createParser()
Creates a XmlMappingParser for reading an mapping input stream.

Returns:
a new XML mapping parser

getReader

protected XmlMappingReader getReader()
Returns the XmlMappingReader for reading XML mapping files into a document object model (DOM).

Returns:
the XML mapping reader

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim