cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <>
Subject [jira] Updated: (COCOON-1908) Add query support to JCR source factory
Date Tue, 05 Sep 2006 17:36:23 GMT
     [ ]

Alexander Klimetschek updated COCOON-1908:

    Attachment: cocoon-jcr-add-query-support.patch

To apply in the cocoon root directory.

> Add query support to JCR source factory
> ---------------------------------------
>                 Key: COCOON-1908
>                 URL:
>             Project: Cocoon
>          Issue Type: New Feature
>          Components: Blocks: JCR
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>         Attachments: cocoon-jcr-add-query-support.patch
> The current implementation of the JCRSourceFactory is missing the support for JCR queries
(XPath and SQL) and only allows direct paths (like "jcr://root/folder/file").
> I have implemented a simple query handling (see patch). It supports both XPath (required
for JCR Level 1 compliance, thus any JCR implementation) and SQL (optional JCR feature). The
query strings given as Source-URIs must look like this:
> XPath:
> jcr://xpath!//root/*
> (which maps to the xpath query "//root/*" which is passed on to the JCR Query)
> jcr://!//root/*
> (which is just a shorthand notation for the above, using Xpath)
> SQL:
> jcr://sql!select * from nt:base where jcr:path = '/root/myfile'
> (well, which maps to the sql query "select * from nt:base where jcr:path = '/root/myfile'")
> There is a restriction for the queries: the result to be returned must be a content-node
with no children and some streamable content. The JCRNodeSource class does not allow collections
to be returned. I am working on subclasses that will target this issue (using the XMLizable
interface) but this is not yet finished.
> I tried to make the patch complete, including updated javadocs for the JCRSourceFactory

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message