You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2012/07/24 12:16:33 UTC
[jira] [Created] (OAK-205) Redefined Tree#getChild(String name) to
#getTree(String relativePath)
angela created OAK-205:
--------------------------
Summary: Redefined Tree#getChild(String name) to #getTree(String relativePath)
Key: OAK-205
URL: https://issues.apache.org/jira/browse/OAK-205
Project: Jackrabbit Oak
Issue Type: Improvement
Components: core
Reporter: angela
currently the API defines the following to methods to access a Tree:
- Root#getTree(String path)
- Tree#getChild(String name)
the method on Root is current implemented by traversing the hierarchy (calling
Tree#getChild for all elements in the given path. that will not work in
situations where a parent is not accessible. similarly getChild only allows
to access a direct child.
i would suggest to redefine Tree#getChild to take a relative path or to
change the method to something like #getTree(String relativePath).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OAK-205) Redefined Tree#getChild(String name)
to #getTree(String relativePath)
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OAK-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421309#comment-13421309 ]
Jukka Zitting commented on OAK-205:
-----------------------------------
bq. i would suggest to redefine Tree#getChild to take a relative path or to change the method to something like #getTree(String relativePath).
The only problem I see in the issue description is about {{Root.getTree()}} calling {{Tree.getChild}}, and I don't get how changing the method on {{Tree}} would solve that. Is there some other reason why we'd need relative paths instead of just child names on the {{Tree}} method?
> Redefined Tree#getChild(String name) to #getTree(String relativePath)
> ---------------------------------------------------------------------
>
> Key: OAK-205
> URL: https://issues.apache.org/jira/browse/OAK-205
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: angela
>
> currently the API defines the following to methods to access a Tree:
> - Root#getTree(String path)
> - Tree#getChild(String name)
> the method on Root is current implemented by traversing the hierarchy (calling
> Tree#getChild for all elements in the given path. that will not work in
> situations where a parent is not accessible. similarly getChild only allows
> to access a direct child.
> i would suggest to redefine Tree#getChild to take a relative path or to
> change the method to something like #getTree(String relativePath).
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira