jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-75) specify format and semantics of 'filter' parameter in MicroKernel API
Date Wed, 23 May 2012 14:30:41 GMT

    [ https://issues.apache.org/jira/browse/OAK-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281630#comment-13281630

Stefan Guggisberg commented on OAK-75:

added initial support for glob-based getNodes filter in svn r1341873.

the format is as suggested by michael. however, since {{{\}}} (backslash) needs to be escaped
in json (leading to pretty awkward java strings such as e.g. {{{"{nodes:[\"foo\\\\*\"]}"}}})
i've chosen to require the literal * to be escaped instead of the wildcard. 

Glob Syntax: 

a nodes or properties filter consists of one or more globs. 
a glob prefixed by - (dash) is treated as an exclusion pattern; all others are considered
inclusion patterns. 
a leading - (dash) must be escaped by prepending \ (backslash) if it should be interpreted
as a literal. 
* (asterisk) serves as a wildcard, i.e. it matches any substring in the target name. 
* (asterisk) occurrences within the glob to be interpreted as literals must be escaped by
prepending \ (backslash). 
a filter matches a target name if any of the inclusion patterns match but none of the exclusion
> specify format and semantics of 'filter' parameter in MicroKernel API
> ---------------------------------------------------------------------
>                 Key: OAK-75
>                 URL: https://issues.apache.org/jira/browse/OAK-75
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: mk
>            Reporter: Stefan Guggisberg
>         Attachments: OAK-83.patch
> the following MicroKernel methods contain a 'filter' string parameter:
> - getJournal
> - diff
> - getNodes
> through the filter an API client could e.g. specify:
> - special 'meta' properties to be included (e.g. ":hash")
> - glob patterns on the names of properties/child nodes to be included/excluded
> - path filter (for getJournal and diff)
> format/detailed semantics TBD, here's an initial proposal (json):
> {code} 
> {
>   "path" : "/some/path",
>   "incl" : [ ":hash", "*" ],
>   "excl" : [ "tmp*" ]
> }
> {code} 
> name filter patterns should ideally be the same 
> format as specified for JCR Node.getNodes/getProperties.

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


View raw message