[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-user
Subject: Re: XMLConfiguration: Keyname list
From: Oliver Heger <hegero () med ! uni-marburg ! de>
Date: 2006-03-28 11:41:47
Message-ID: 442920FB.7030407 () med ! uni-marburg ! de
[Download RAW message or body]
Rishikesh.Mallesh@atradius.com wrote:
> Thanks Oliver.
>
>> For which purpose do you need these keys?
>
> I need a functionality to convert an "XMLConfiguration" object to a
> "Properties" object.
>
> Given that there is no direct support (including
> ConfigurationConverter.getProperties(..)) I decided to build the Properties
> and hence required the list of keys.
>
> I was thinking of going down the route of HierarchicalConfiguration.Node,
> but seems a bit too much work to perform the task, given that we can access
> individual keys using indices. Do you know the thinking behind this
> approach?
It's probably because nobody had this use case before ;-)
>
> Any other ideas?
The newest code in SVN allows to set an ExpressionEngine for a
hierarchical configuration for supporting different query languages. The
ExpressionEngine is also responsible for generating keys for the
contained properties. So by implementing a custom ExpressionEngine (that
can extend DefaultExpressionEngine) you could plug in your own strategy
for naming keys. Don't know if this easier than traversing the Nodes.
Oliver
<snip/>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic