You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2007/04/19 16:50:11 UTC
Using the Abstract Query Tree?
Hello users,
I noticed on the [1]documentation that one of the options to query
the repository is to use the Abstract Query Tree, by means of
building a custom QueryNode. That seems interesting because it
allows to express the query criteria using a Java API.
However, I couldn't find an example of how this can be
implemented? I tried to extend
org.apache.jackrabbit.core.query.lucene.QueryImpl with no luck, as
the constructor expects statement and language.
Is there a way to query the repository with pure Java, like eg
Hibernate's Criteria API?
Thanks in advance,
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
[1] http://jackrabbit.apache.org/doc/arch/operate/query.html
Re: Using the Abstract Query Tree?
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On 4/21/07, Jean-Baptiste Quenot <jb...@apache.org> wrote:
> And also there is no meaningful title like «Implementation
> Details: the QueryManager» that would clearly reflect the
> intended target audience.
Good point. We should probably split the web site documentation to
separate usage and development sections.
BR,
Jukka Zitting
Re: Using the Abstract Query Tree?
Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Marcel Reutegger:
> Jean-Baptiste Quenot wrote:
>
> > Just curious, why is it mentioned in the documentation
> > then as a possible query approach among the others XPath
> > and SQL?
>
> the documentation you were referring to rather describes
> the internals and how a query is executed. Which
> sentences made you believe that a client could use those
> classes? I'll then fix the doc accordingly...
OK I understand now that this document is not a user guide,
but rather meant to describe the internal architecture.
How did I came to think I could use this information: if you
google for "jackrabbit xpath sql" and choose the first link,
the afore-mentioned page appears. This is the first point.
And also there is no meaningful title like « Implementation
Details: the QueryManager » that would clearly reflect the
intended target audience.
Thanks for your time,
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
Re: Using the Abstract Query Tree?
Posted by Marcel Reutegger <ma...@gmx.net>.
Jean-Baptiste Quenot wrote:
> * Marcel Reutegger:
>
>> no, this is not possible. the abstract query
>> tree is only a jackrabbit internal construct.
>
> Just curious, why is it mentioned in the
> documentation then as a possible query approach
> among the others XPath and SQL?
the documentation you were referring to rather describes the internals and how a
query is executed. Which sentences made you believe that a client could use
those classes? I'll then fix the doc accordingly...
regards
marcel
Re: Using the Abstract Query Tree?
Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Marcel Reutegger:
> no, this is not possible. the abstract query
> tree is only a jackrabbit internal construct.
Just curious, why is it mentioned in the
documentation then as a possible query approach
among the others XPath and SQL?
> however there are discussions to create a Java
> query API for JCR 2.0 (JSR 283).
Cool! Is there a public location where I can
read more about it?
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
Re: Using the Abstract Query Tree?
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Jean-Baptiste,
Jean-Baptiste Quenot wrote:
> I noticed on the [1]documentation that one of the options to query
> the repository is to use the Abstract Query Tree, by means of
> building a custom QueryNode. That seems interesting because it
> allows to express the query criteria using a Java API.
>
> However, I couldn't find an example of how this can be
> implemented? I tried to extend
> org.apache.jackrabbit.core.query.lucene.QueryImpl with no luck, as
> the constructor expects statement and language.
>
> Is there a way to query the repository with pure Java, like eg
> Hibernate's Criteria API?
no, this is not possible. the abstract query tree is only a jackrabbit internal
construct.
however there are discussions to create a Java query API for JCR 2.0 (JSR 283).
regards
marcel