cocoon-dev mailing list archives

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

                 Key: COCOON-1908
             Project: Cocoon
          Issue Type: New Feature
          Components: Blocks: JCR
    Affects Versions: 2.2-dev (Current SVN)
            Reporter: Alexander Klimetschek

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:


(which maps to the xpath query "//root/*" which is passed on to the JCR Query)

(which is just a shorthand notation for the above, using Xpath)


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 class.

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