commons-dev 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]Release 1 and hierarchical configurations
Date Mon, 05 Apr 2004 08:28:42 GMT
Jörg Schaible schrieb:
> 
> Oliver Heger wrote on Saturday, April 03, 2004 4:41 PM:
> 
> 
>>Jörg Schaible wrote:
>>
> 
> [snip]
> 
>>>Just popped in my mind: What's the big difference between a Subset
>>>and a ConfigurationNode then ? IMHO the Subset *is* the Node for
>>>HierarchicalConfigurations ...
>>>
>>>Regards,
>>>Jörg
>>>
>>>
>>
>>Yes, I thought of this, too. Well, a subset could also be a collection
>>of  nodes, but these can be put together as children of a new
>>root node.
>>The original implementation of the subset() method in
>>HierarchicalConfiguration did exactly that.
> 
> 
> IMHO the "collectopn" of nodes is a result of a flat structure, that cannot happen for
a hierarchical structure ... or di I miss something?
> 
> -- Jörg

It depents on the expressions you allow for querying subsets. If you 
force that a subset expression defines exactly one path in the 
configuration tree (e.g. "tables.table(1).fields"), you are right.

HierarchicalConfiguration allows expressions that ommit indices. An 
expression like "tables.table.fields" would result in the fields of all 
defined tables. These nodes do not belong to the same parent node, so 
you got a collection. Expressions in XPath would allow much more 
powerful selections.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message