fyzhou / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

Fine configuration of default configuration loading. #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?  If applicable, please provide a
mapping configuration and sample record input to recreate the problem.
If customisation of the configuration loader is needed one has to needlessly 
extend the entire streamfactory->streamcompiler tree.

What is the expected output? What do you see instead?
Have additional components such as configurationlodader be overridable by a 
property.

What version of BeanIO are you using? What JDK version?
2.0.1/1.6.0_22

Please provide any additional information below.

Original issue reported on code.google.com by james.a....@gmail.com on 9 May 2013 at 1:50

GoogleCodeExporter commented 9 years ago
How are you customizing the configuration loader?  Release 2.1.0 has a builder 
API that might be easier than creating your own configuration language.

Thanks,
Kevin

Original comment by kevin.s...@gmail.com on 9 May 2013 at 5:08

GoogleCodeExporter commented 9 years ago
Not an issue with the builder api/etc, but not being able to inject items such 
as a custom XMLEntityResolver, or the ConfigurationLoader on StreamCompiler, 
etc.  Being able to inject or load these components would allow custom 
extensions (say have the mappings backed to something other than a file).

Original comment by james.a....@gmail.com on 9 May 2013 at 7:45

GoogleCodeExporter commented 9 years ago
You can load an XML mapping configuration yourself from wherever and pass an 
InputStream to the StreamFactory.  Or if not using XML, the builder API could 
be used to create your own configuration language.

The only purpose I could see of configuring your own XMLEntityResolver is too 
extend BeanIO's mapping file schema which would also require you to extend or 
create your own ParserFactory, etc.  For now, these are internal implementation 
classes only.  Their API is not guaranteed, and therefore not suitable for 
custom extensions or plugins at this time.  Sorry.

Thanks,
Kevin

Original comment by kevin.s...@gmail.com on 9 May 2013 at 8:11