Package org.beanio.internal.config.xml
Class XmlConfigurationLoader
- java.lang.Object
-
- org.beanio.internal.config.xml.XmlConfigurationLoader
-
- All Implemented Interfaces:
ConfigurationLoader
public class XmlConfigurationLoader extends java.lang.Object implements ConfigurationLoader
Loads BeanIO mapping files in XML format. This class is made thread safe by delegating most of the parsing logic toXmlMappingParser
, for which a new instance is created for each input stream that requires parsing.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description XmlConfigurationLoader(java.lang.ClassLoader classLoader)
Constructs a newXmlConfigurationLoader
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XmlMappingParser
createParser()
Creates aXmlMappingParser
for reading an mapping input stream.protected XmlMappingReader
getReader()
Returns theXmlMappingReader
for reading XML mapping files into a document object model (DOM).java.util.Collection<BeanIOConfig>
loadConfiguration(java.io.InputStream in, java.util.Properties properties)
Loads a BeanIO configuration from an input stream.
-
-
-
Method Detail
-
loadConfiguration
public java.util.Collection<BeanIOConfig> loadConfiguration(java.io.InputStream in, java.util.Properties properties) throws java.io.IOException, BeanIOConfigurationException
Description copied from interface:ConfigurationLoader
Loads a BeanIO configuration from an input stream.- Specified by:
loadConfiguration
in interfaceConfigurationLoader
- Parameters:
in
- the input stream to read the configuration fromproperties
- theProperties
for expansion in the mapping file- Returns:
- a collection of loaded BeanIO configurations
- Throws:
java.io.IOException
- if an I/O error occursBeanIOConfigurationException
- if the configuration is invalid or malformed
-
createParser
protected XmlMappingParser createParser()
Creates aXmlMappingParser
for reading an mapping input stream.- Returns:
- a new XML mapping parser
-
getReader
protected XmlMappingReader getReader()
Returns theXmlMappingReader
for reading XML mapping files into a document object model (DOM).- Returns:
- the XML mapping reader
-
-