Implemented the support for the 'jcr:path', 'jcr:score', 'jcr:name', 'mode:localName', and 'mode:depth' pseudo-columns. The changes include:
1) Changing the Lucene search engine implementation to support returning data values for these pseudo-columns. This wouldn't have to be done, but it is a bit more complete and does allow using the values in joins.
2) Changing the schemata representation to enable tracking which columns are used when expanding SELECT * clauses. Additionally, the classes were improved to be more efficient; strictly speaking, this optimization did not need to be done, but it simplified the implementation of the required changes, and it also improved the time required to build the schemata from the set of node types. (Whenever node types are added, removed, or changed, the shared schemata is nulled, and needs to be rebuilt the next time the schemata is needed for processing queries. Thus, performance can be important.)
3) Added constants for the Name objects in the JCR and ModeShape lexicons.
4) Added support for getting the pseudo-column values in the JCR QueryResult (and in particular, the Row) implementations. Since these are pseudo-columns, there are no corresponding properties on the nodes, so the values need to be computed using the row's Location and score.
5) Changed the RepositoryQueryManager to use a new query optimization rule that rewrites join criteria and constraints to use the standard JCR functions (e.g., NAME, LOCALNAME, and SCORE) and the ModeShape functions (e.g., PATH and DEPTH).
6) Added several new unit tests for these classes and for various JCR-SQL2 queries.
BTW, by using 'jcr:path' and 'jcr:score' for the names (rather than 'mode:path' and 'mode:score'), these changes also add support for these pseudo-columns to the JCR-SQL query language in ModeShape.
At this point, all unit and integration tests pass, and ModeShape's support for JCR-SQL2 now handles these pseudo-columns.
These changes were committed into SVN trunk with r2343 and into the '2.2.x' branch with r2344.