commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <heg...@med.uni-marburg.de>
Subject Re: [configuration] union of hierarchical xml configurations in composite configuration
Date Fri, 01 Oct 2004 06:10:40 GMT
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


Mime
View raw message