jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Szymon Kuzniak <skuzniak.cognif...@wp.pl>
Subject Re: Question about root node children?
Date Tue, 31 Oct 2006 09:26:13 GMT
Nicolas napisal(a):
> Hi,
> As you know, I am still fairly new to Jackrabbit and its internals. I think
> there is something I didn't understand correctly. Can you please help me?
> I am trying to fetch all direct children of the root node from a repository
> with 3 nodes I have put in. When I write root.getChildNodeEntries(); I have
> a List with 170 elements in it!  When I display their QName, there are only
> 5 differnent QNames as expected (my 3 nodes + root + jcr:system).
> What am I doing wrong please?

if You would like to fetch children, I think the better way will be to 
use getNodes() method on root node, because getChildNodeEntries() 
returns list of node entries, not nodes. This will return NodeIterator, 
so You will be able to iterate over all children.
Hope this will help.


Szymon Kuzniak
szymon.kuzniak( at )cognifide.com
Skype: skuzniak
Cognifide Poland

View raw message