[jira] Created: (JCR-1662) Add pattern matching for paths

View: New views
7 Messages — Rating Filter:   Alert me  

[jira] Created: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Add pattern matching for paths
------------------------------

                 Key: JCR-1662
                 URL: https://issues.apache.org/jira/browse/JCR-1662
             Project: Jackrabbit
          Issue Type: New Feature
          Components: jackrabbit-spi-commons
            Reporter: Michael Dürig


I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Michael Dürig updated JCR-1662:
-------------------------------

    Attachment: JCR-1662.patch

The patch includes utility classes to match paths against patterns and test cases. A pattern is composed of elements similar to those of regular expressions (i.e. sequence, selection, repetition).

> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608179#action_12608179 ]

Tobias Bocanegra commented on JCR-1662:
---------------------------------------

can you provide an example of how to use this pattern matching? and a use case?

from my experience you usually only need 4 types of matching:

Match all foo.txt files: .*/foo\.txt$
Match child nodes: /foo/.*
Match direct child nodes: /foo/[^/]*$
Match node and child nodes: /foo(/.*)?

those patterns can easily be formed with regexp.

> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/JCR-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608202#action_12608202 ]

Michael Dürig commented on JCR-1662:
------------------------------------

The pattern matching operates on instances of org.apache.jackrabbit.spi.Path, not on strings. Matching a Path by its sting representation is problematic since it depends on the implementation.

My current use case is specific to my current spi connector project. Since I have written the code anyway and it might be generally useful for spi connector implementations I provided it here.

For example usage see the test cases.

> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Tobias Bocanegra reassigned JCR-1662:
-------------------------------------

    Assignee: Tobias Bocanegra

> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>            Assignee: Tobias Bocanegra
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Tobias Bocanegra resolved JCR-1662.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5
         Assignee:     (was: Tobias Bocanegra)

applied patch.

please close this issue if it solves your problems.

> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>             Fix For: 1.5
>
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JCR-1662) Add pattern matching for paths

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Michael Dürig closed JCR-1662.
------------------------------


> Add pattern matching for paths
> ------------------------------
>
>                 Key: JCR-1662
>                 URL: https://issues.apache.org/jira/browse/JCR-1662
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi-commons
>            Reporter: Michael Dürig
>             Fix For: 1.5
>
>         Attachments: JCR-1662.patch
>
>
> I suggest to add utility classes to spi-commons which can be used to do pattern matching on paths similar to regular expressions.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

LightInTheBox - Buy quality products at wholesale price