jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Bologna" <alessandro.bolo...@gmail.com>
Subject Re: XML, SNS, and JCR
Date Tue, 01 Apr 2008 13:07:47 GMT
Thanks Marcel,

sounds easy enough :) , will give it a try and let you know.

Alessandro

On Tue, Apr 1, 2008 at 5:35 AM, Marcel Reutegger <marcel.reutegger@gmx.net>
wrote:

> Alessandro Bologna wrote:
> > Finally, the technical question. Is there a simple way to extend the
> XPATH
> > parser to handle this type of queries?
>
> you might want to try this:
>
> - create your own XPath QueryBuilder, which extends from
> org.apache.jackrabbit.spi.commons.query.xpath.QueryBuilder
> - overwrite createQueryTree() and transform the query tree built by the
> base class.
> - IIUC you'd have to modify every LocationStepQueryNode and do the
> following:
>        - take nameTest and create a NodeTypeQueryNode (or rather a
>           RelationQueryNode for jcr:primaryType?) with that name
>        - add the NodeTypeQueryNode to the LocationStepQueryNode as a
> predicate
>        - set nameTest to null in LocationStepQueryNode
>
> done ;)
>
> regards
>   marcel
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message