Unfortunately the configuration API does not provide a simple way to construct a union configuration manually. ATM this is done by the inner class ConfigurationBuilder of ConfigurationFactory, which creates a hierarchical configuration object for all configurations to be united by eventually converting them into hierarchical configurations and adding their root nodes to a new configuration.

If you have a look at this class, you may get some ideas how to solve your problem. Perhaps you can even use this class directly - I didn't try this.

I think the API for constructing composite configurations (unions and overrides) could be improved in the next version of [configuration].

Oliver

Orjan Nygaard Austvold wrote:
If I understand the union term correctly, then the following two configuration files unioned at foo:

<configuration>
 <foo>
  <bar>0</bar>
  <bar>1</bar>
  <bar>2</bar>
 </foo>
</configuration>

<configuration>
 <foo>
  <bar>1</bar>
  <bar>2</bar>
  <bar>3</bar>
 </foo>
</configuration>

would result in 6 valid keys of foo(0).bar(i).

How can this be achieved programatically with CompositeConfiguration?


�rjan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit�t Marburg
Bunsenstra�e 3,
D-35037 Marburg
Tel: +49 6421 28-66592
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to