You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Oliver Heger <he...@med.uni-marburg.de> on 2004/10/01 08:10:40 UTC
Re: [configuration] union of hierarchical xml configurations in composite
configuration
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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
--
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:oliver.heger@med.uni-marburg.de
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org