You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Joerg Hoh (Jira)" <ji...@apache.org> on 2022/01/17 11:52:00 UTC

[jira] [Updated] (OAK-9667) Check the existence of child nodes matching a pattern

     [ https://issues.apache.org/jira/browse/OAK-9667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joerg Hoh updated OAK-9667:
---------------------------
    Description: 
Next to the existing {{Node.hasNodes()}} method of the JCR API a variant of it would be handy:

{{JackrabbitNode.hasNodes(Pattern pattern)}}

it would allow an application to implement their own understanding of "child nodes" and provide a pattern, which could exclude all child nodes from this calcuation, which are implementation details of Jackrabbit/Oak (e.g. rep:policy nodes, jcr:content nodes). Today it is possible to implement this logic by getting the NodeIterator and filter manually, but getting the NodeIterator can be quite slow when the child node list is large and the backend non-local (e.g. Mongo).

Also a version of getNodes() should be provided which accepts such a pattern:

{{JackrabbitNode.getNodes(Pattern pattern)}}

 

(see [https://lists.apache.org/thread/blw0y8wdhkpg0trymdo6hfz5g9j3cjsj] for the discussion on oak-dev)

 

  was:
Next to the existing {{Node.hasNodes()}} method of the JCR API a variant of it would be handy:

{{JackrabbitNode.hasNodes(Pattern pattern)}}

it would allow an application to implement their own meaning of "child nodes" and provide a pattern, which could exclude all child nodes from this calcuation, which are implementation details of Jackrabbit/Oak (e.g. rep:policy nodes, jcr:content nodes). Today it is possible to implement this logic by getting the NodeIterator and filter manually, but getting the NodeIterator can be quite slow when the child node list is large and the backend non-local (e.g. Mongo).

Also a version of getNodes() should be provided which accepts such a pattern:

{{JackrabbitNode.getNodes(Pattern pattern)}}

 

(see [https://lists.apache.org/thread/blw0y8wdhkpg0trymdo6hfz5g9j3cjsj] for the discussion on oak-dev)

 


> Check the existence of child nodes matching a pattern
> -----------------------------------------------------
>
>                 Key: OAK-9667
>                 URL: https://issues.apache.org/jira/browse/OAK-9667
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jackrabbit-api
>            Reporter: Joerg Hoh
>            Priority: Major
>
> Next to the existing {{Node.hasNodes()}} method of the JCR API a variant of it would be handy:
> {{JackrabbitNode.hasNodes(Pattern pattern)}}
> it would allow an application to implement their own understanding of "child nodes" and provide a pattern, which could exclude all child nodes from this calcuation, which are implementation details of Jackrabbit/Oak (e.g. rep:policy nodes, jcr:content nodes). Today it is possible to implement this logic by getting the NodeIterator and filter manually, but getting the NodeIterator can be quite slow when the child node list is large and the backend non-local (e.g. Mongo).
> Also a version of getNodes() should be provided which accepts such a pattern:
> {{JackrabbitNode.getNodes(Pattern pattern)}}
>  
> (see [https://lists.apache.org/thread/blw0y8wdhkpg0trymdo6hfz5g9j3cjsj] for the discussion on oak-dev)
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)