jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Node.getNodes and Node.hasNodes for a specific nodeType
Date Tue, 08 Jul 2008 19:35:25 GMT
On 7/8/08, Matthijs Wensveen <m.wensveen@func.nl> wrote:
> Hi,
>
>  Is it possible to ask a Node whether it has child nodes of a specific
> nodeType? Currently I'm able to do this with an XPath query, but it would be
> a lot easier, and possibly faster, when I could ask this to the node
> directly.
yes, you can pass a filter for the Node.getNodes() call where you can
for example test the node.isNodeType().

>  Also, is it possible to mark a child node definition that is also marked as
> 'multiple' with 'primary'? If that is the case, maybe I could use
> getPrimaryItem.
>
>  My node type is defined as:
>  [eb:ContentTreeItem]
>    - eb:friendlyName
>    + eb:specialPage = eb:SpecialPage
>        multiple
>    + * = eb:ContentTreeItem
>        multiple
no, a primary item can't be a SNS node def. Do you really need SNS for
your content tree items? SNS usually cause more problems than distinct
node names. especially in a tree, i would name the nodes according to
the name of the tree node.

>  In my application a ContentTreeItem is a leaf node when there are no
> eb:ContentTreeItem child nodes.

regards, toby

Mime
View raw message