[overlord-issues] [JBoss JIRA] (ARTIF-627) New query parser: Antlr + ModeShape JCR-JQOM

Brett Meyer (JIRA) issues at jboss.org
Mon Jan 12 10:09:49 EST 2015


     [ https://issues.jboss.org/browse/ARTIF-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Meyer updated ARTIF-627:
------------------------------
    Summary: New query parser: Antlr + ModeShape JCR-JQOM  (was: Use ModeShape AST objects in SrampToJcrSql2QueryVisitor)


> New query parser: Antlr + ModeShape JCR-JQOM
> --------------------------------------------
>
>                 Key: ARTIF-627
>                 URL: https://issues.jboss.org/browse/ARTIF-627
>             Project: Artificer
>          Issue Type: Enhancement
>            Reporter: Brett Meyer
>            Assignee: Brett Meyer
>
> SrampToJcrSql2QueryVisitor is extremely brittle and inflexible.  See SRAMP-622 for an example.  The following query is next to impossible:
> /s-ramp/xsd/XsdDocument[relWithAttr[s-ramp:getRelationshipAttribute(., 'FooKey') = 'FooValue' and @FooProperty = 'FooValue']]
> Note that the getRelationshipAttribute predicate function affects the relWithAttr *relationship* itself, while the @FooProperty check must go in the target artifact sub-query.  Correctly handling this query will require a Builder pattern to be introduced.
> Attempt to use ModeShape's AST objects:
> https://docs.jboss.org/author/display/MODE40/JCR-JQOM
> ModeShape also has a builder class, but it's not public and may pose additional issues.
> {quote}
> (10:00:16 AM) rhauch: brmeyer: well, it's not public: https://github.com/ModeShape/modeshape/blob/master/modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryBuilder.java and https://github.com/ModeShape/modeshape/blob/master/modeshape-jcr/src/test/java/org/modeshape/jcr/query/QueryBuilderTest.java#L71
> (10:01:39 AM) rhauch: brmeyer: that builder is somewhat limited, and it is really meant for hard-coded code. For example, there are places where you'd have to build strings (e.g., using "AS" for aliases)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the overlord-issues mailing list