chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r787726 - in /websites/production/chemistry: ./ content/java/developing/dev-eclipse.html content/java/how-to/how-to-process-query.html
Date Tue, 29 Mar 2011 21:07:15 GMT
Author: jens
Date: Tue Mar 29 21:07:15 2011
New Revision: 787726

Log:
publish updated query and Eclipse page

Modified:
    websites/production/chemistry/   (props changed)
    websites/production/chemistry/content/java/developing/dev-eclipse.html
    websites/production/chemistry/content/java/how-to/how-to-process-query.html

Propchange: websites/production/chemistry/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 29 21:07:15 2011
@@ -1 +1 @@
-/websites/staging/chemistry/trunk:785583-787709
+/websites/staging/chemistry/trunk:785583-787725

Modified: websites/production/chemistry/content/java/developing/dev-eclipse.html
==============================================================================
--- websites/production/chemistry/content/java/developing/dev-eclipse.html (original)
+++ websites/production/chemistry/content/java/developing/dev-eclipse.html Tue Mar 29 21:07:15
2011
@@ -186,8 +186,110 @@ Apache Chemistry - Using Eclipse as Deve
              <div class="wiki-content"><h1 id="using_eclipse">Using Eclipse</h1>
 <p>Please note that you can use maven to generate projects for Eclipse (and other
 development tools) by using mvn <code>eclipse:eclipse</code>. For details see
the maven
-documentation.</p>
-<p>TODO</p></div>
+documentation. This mechanism also works for other IDEs than Eclipse.</p>
+<h2 id="debugging">Debugging</h2>
+<h3 id="debugging_a_client">Debugging a client</h3>
+<p>Using the Eclipse debugger for a client application usually
+is straightforward. Just create the launch configuration
+(for example Java stand alone application) and run your 
+project in the debugger.</p>
+<h3 id="debugging_a_server">Debugging a server</h3>
+<p>Using the debugger for server development requires the 
+appropriate setup. This is a bit more tricky than on the 
+client side. There are several ways how to do this. Choose
+whatever works best for your environment. The following 
+sections use Apache Tomcat as servlet container for your
+server development project. The same mechanism works for
+other servlet containers and can easily be adapted
+(e.g. Jetty).</p>
+<h4 id="tomcat_remote_debugging">Tomcat Remote Debugging</h4>
+<p>Build your server and create a .war archive. Deploy your
+archive in Tomcat (e.g. copy it to the webapps directory of 
+the Tomcat installation). Start Tomcat in debugging mode. See 
+<a href="http://wiki.apache.org/tomcat/FAQ/Developing#Q1">here</a> for details.
Create in Eclipse a launch configuration
+for remote debugging connecting to your Tomcat.</p>
+<p>There are other options as well. You can skip creating the 
+.war file and configure Tomcat to use your build output 
+directory as web application. See the Tomcat documentation
+for more details.</p>
+<h4 id="eclipse_wdt">Eclipse WDT</h4>
+<p>If you use the Eclipse J2EE distribution or have installed
+the Web Development Tools (WDT) you can run/debug your 
+server directly within your IDE. Unfortunately the 
+integration with maven is not very convenient. You have
+to patch the file <code>pom.xml</code> of your server project so 
+that mvn eclipse:eclipse generates a web application. </p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span
class="n">build</span><span class="o">&gt;</span>
+  <span class="o">&lt;</span><span class="n">plugins</span><span
class="o">&gt;</span>
+    <span class="o">.</span> <span class="o">.</span> <span class="o">.</span>

+      <span class="o">&lt;</span><span class="n">plugin</span><span
class="o">&gt;</span>
+        <span class="o">&lt;</span><span class="n">groupId</span><span
class="o">&gt;</span><span class="n">org</span><span class="o">.</span><span
class="na">apache</span><span class="o">.</span><span class="na">maven</span><span
class="o">.</span><span class="na">plugins</span><span class="o">&lt;/</span><span
class="n">groupId</span><span class="o">&gt;</span>
+        <span class="o">&lt;</span><span class="n">artifactId</span><span
class="o">&gt;</span><span class="n">maven</span><span class="o">-</span><span
class="n">eclipse</span><span class="o">-</span><span class="n">plugin</span><span
class="o">&lt;/</span><span class="n">artifactId</span><span class="o">&gt;</span>
+        <span class="o">&lt;</span><span class="n">version</span><span
class="o">&gt;</span><span class="mf">2.8</span><span class="o">&lt;/</span><span
class="n">version</span><span class="o">&gt;</span>
+        <span class="o">&lt;</span><span class="n">configuration</span><span
class="o">&gt;</span>
+           <span class="o">&lt;</span><span class="n">wtpversion</span><span
class="o">&gt;</span><span class="mf">2.0</span><span class="o">&lt;/</span><span
class="n">wtpversion</span><span class="o">&gt;</span>
+           <span class="o">&lt;</span><span class="n">wtpContextName</span><span
class="o">&gt;</span><span class="n">inmemory</span><span class="o">&lt;/</span><span
class="n">wtpContextName</span><span class="o">&gt;</span>
+           <span class="o">&lt;</span><span class="n">linkedResources</span><span
class="o">&gt;</span>
+             <span class="o">&lt;</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+               <span class="o">&lt;</span><span class="n">name</span><span
class="o">&gt;</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">sun</span><span
class="o">-</span><span class="n">jaxws</span><span class="o">.</span><span
class="na">xml</span><span class="o">&lt;/</span><span class="n">name</span><span
class="o">&gt;</span> 
+               <span class="o">&lt;</span><span class="n">type</span><span
class="o">&gt;</span><span class="mi">1</span><span class="o">&lt;/</span><span
class="n">type</span><span class="o">&gt;</span> 
+               <span class="o">&lt;</span><span class="n">location</span><span
class="o">&gt;</span>
+                 <span class="n">$</span><span class="o">{</span><span
class="n">basedir</span><span class="o">}/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">-</span><span class="n">bindings</span><span
class="o">/</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">sun</span><span
class="o">-</span><span class="n">jaxws</span><span class="o">.</span><span
class="na">xml</span>
+               <span class="o">&lt;/</span><span class="n">location</span><span
class="o">&gt;</span>
+             <span class="o">&lt;/</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+             <span class="o">&lt;</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+               <span class="o">&lt;</span><span class="n">name</span><span
class="o">&gt;</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">web</span><span
class="o">.</span><span class="na">xml</span><span class="o">&lt;/</span><span
class="n">name</span><span class="o">&gt;</span> 
+               <span class="o">&lt;</span><span class="n">type</span><span
class="o">&gt;</span><span class="mi">1</span><span class="o">&lt;/</span><span
class="n">type</span><span class="o">&gt;</span> 
+               <span class="o">&lt;</span><span class="n">location</span><span
class="o">&gt;</span><span class="n">$</span><span class="o">{</span><span
class="n">basedir</span><span class="o">}/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">-</span><span class="n">bindings</span><span
class="o">/</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">web</span><span
class="o">.</span><span class="na">xml</span><span class="o">&lt;/</span><span
class="n">location</span><span class="
 o">&gt;</span>
+             <span class="o">&lt;/</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+             <span class="o">&lt;</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+               <span class="o">&lt;</span><span class="n">name</span><span
class="o">&gt;</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">wsdl</span><span
class="o">&lt;/</span><span class="n">name</span><span class="o">&gt;</span>

+               <span class="o">&lt;</span><span class="n">type</span><span
class="o">&gt;</span><span class="mi">2</span><span class="o">&lt;/</span><span
class="n">type</span><span class="o">&gt;</span> 
+               <span class="o">&lt;</span><span class="n">location</span><span
class="o">&gt;</span><span class="n">$</span><span class="o">{</span><span
class="n">basedir</span><span class="o">}/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">/</span><span class="n">chemistry</span><span
class="o">-</span><span class="n">opencmis</span><span class="o">-</span><span
class="n">server</span><span class="o">-</span><span class="n">bindings</span><span
class="o">/</span><span class="n">src</span><span class="o">/</span><span
class="n">main</span><span class="o">/</span><span class="n">webapp</span><span
class="o">/</span><span class="n">WEB</span><span class="o">-</span><span
class="n">INF</span><span class="o">/</span><span class="n">wsdl</span><span
class="o">&lt;/</span><span class="n">location</span><span class="o">&gt;</span>
+             <span class="o">&lt;/</span><span class="n">linkedResource</span><span
class="o">&gt;</span>
+           <span class="o">&lt;/</span><span class="n">linkedResources</span><span
class="o">&gt;</span>
+        <span class="o">&lt;/</span><span class="n">configuration</span><span
class="o">&gt;</span>            
+      <span class="o">&lt;/</span><span class="n">plugin</span><span
class="o">&gt;</span>
+</pre></div>
+
+
+<p>If you don't use maven you have to manually create a dynamic
+web project in Eclipse. In this case <code>inmemory</code> is the
+context root of your server. An address like
+<code>http://localhost:8080/inmemory/atom/</code> should work. What
+still needs to be done manually (even with maven) is to 
+configure all the jars needed to run the server. Open the
+project properties in Eclipse and select Deployment Assembly.
+Add / Project and add the following projects:</p>
+<ul>
+<li>chemistry-opencmis-commons-api</li>
+<li>chemistry-opencmis-commons-impl</li>
+<li>chemistry-opencmis-server-bindings</li>
+<li>chemistry-opencmis-server-support</li>
+</ul>
+<p>Then Add / Java Build Path Entries and add all the jars 
+listed.</p>
+<p>This setup allows you to add your server project to an existing
+Server configuration in Eclipse. (If your Server tab is 
+empty you first have to create one). In the Server Tab now
+you can run or debug Tomcat with your server project as a 
+deployed web application. </p>
+<h4 id="the_local_binding">The Local Binding</h4>
+<p>OpenCMIS allows to bypass all AtomPub or SOAP protocols
+and directly connect from a client to server using Java 
+classes within a single JVM and is called the Local
+Binding. This can be convenient is some cases and makes
+debugging very easy. See the example how to 
+<a href="/java/examples/example-create-session.html">create a session</a>.</p>
+<h2 id="long_package_names">Long Package Names</h2>
+<p>The opencmis project uses package names that sometimes
+get inconvenient due to their length. Since Helios
+Elipse has a nice feature to abbreviate package names.
+In Window/Preferences go to Java / Appearance and
+select Abbreviate package names. Add a rule:</p>
+<p><code>org.apache.chemistry.opencmis={cmis}</code></p>
+<p>This will display all your packages in a form like</p>
+<p><code>{cmis}.commons.api</code></p></div>
              <!-- Content -->
            </td>
           </tr>

Modified: websites/production/chemistry/content/java/how-to/how-to-process-query.html
==============================================================================
--- websites/production/chemistry/content/java/how-to/how-to-process-query.html (original)
+++ websites/production/chemistry/content/java/how-to/how-to-process-query.html Tue Mar 29
21:07:15 2011
@@ -193,6 +193,7 @@ Apache Chemistry - Query Integration
 <li><a href="#using_queryobject">Using QueryObject</a></li>
 <li><a href="#processing_a_node_and_referencing_types_and_properties">Processing
a node and referencing types and properties</a></li>
 <li><a href="#building_the_result_list">Building the result list</a></li>
+<li><a href="#limitations">Limitations</a></li>
 </ul>
 </li>
 </ul>
@@ -212,7 +213,7 @@ prefer a different language parsing tool
 <li>Implement query in the discovery service</li>
 <li>Use the built-in ANTLR and ANTLR CMISQL grammar</li>
 <li>Use OpenCMIS CMISQL grammar and integrate into ANTLR query walker</li>
-<li>Use predefined query walker and integrate into interface <code>IQueryConditionProcessor</code>.</li>
+<li>Use predefined query walker and integrate into interface <code>PredicateWalker</code>.</li>
 </ol>
 <h2 id="implement_query_in_the_discovery_service">Implement query in the discovery
service</h2>
 <p>The first way is to implement the <code>query()</code> method like any
other service
@@ -226,7 +227,7 @@ integrate query by using the ANTLR mecha
 abstract syntax tree. Please refer to the ANTLR documentation for further
 information. This is the right level to use if you need custom parser tree
 transformations or would like to extend the grammar with your own
-constructs. For demonstration purposes OpenCMIS provides a sample extended
+constructs. For demonstration purposes OpenCMIS provides an extended
 grammar as an example.</p>
 <h2 id="use_opencmis_cmsiql_grammar_and_integrate_into_antlr_query_walker">Use OpenCMIS
CMSIQL grammar and integrate into ANTLR query walker</h2>
 <p>If the standard CMISQL grammar is sufficient for you there is another level
@@ -240,63 +241,76 @@ these common tasks. You can make use of 
 aliases and walk the resulting abstract syntax tree (AST) to evaluate the
 query. You are free to walk the AST as many times as you need and in the
 order you prefer. The basic idea is that the SELECT and FROM parts are
-processed by OpenCMIS and you are responsible for the WHERE part.&nbsp; The
-CMIS InMemory server provides an example for this level of integration: For
-each object contained in the repository the tree is traversed and checked
+processed by OpenCMIS and you are responsible for the WHERE part. The
+InMemory server provides an example for this level of integration: For
+each object contained in the repository the tree is traversed and it's checked
 if it matches the current query. You can take the InMemory code as an
-example if you decide to use this integration point.</p>
+example if you decide to use this integration level.</p>
 <h2 id="use_predefined_query_walker">Use predefined query walker</h2>
 <p>For some repositories a simple and one-pass query traversal is sufficient.
 This can be the case if for example your query needs to be translated to a
 SQL query statement. Because ANTLR has some complexity OpenCMIS provides a
-predefined walker that does a simple one pass depth-first traversal. If
+predefined walker that performs a simple one pass depth-first traversal. If
 this is sufficient this interface hides most of the complexity of ANTLR.
 All you have to do is to implement a Java interface
-(<code>IQueryConditionProcessor</code>). You can refer to the unit tests for
example
-code. The class <code>TestQueryProcessor</code> nested in the unit test <code>ProcessQueryTest</code>
-provides an example of such a walker. Some utility methods like for example
-parsing literals like <code>"abc"</code>, <code>-123</code> to Java
objects like <code>String</code> and <code>Integer</code>
-are common tasks. Therefore this is implemented in an abstract class
-<code>AbstractQueryConditionProcessor</code>. This declares all interface methods
as
-abstract and provides default implementations for common tasks. In most
-cases you will derive your implementation from
-<code>AbstractQueryConditionProcessor</code> and not directly implement the interface.</p>
-<p>Note: There is currently no predefined walker for the JOIN statements. If
-you need to support JOINS you have to build your own walker for this part
+(<code>PredicateWalker</code>). You can refer to the InMemory server for example
+code (<code>InMemoryWhereClauseWalker</code>). </p>
+<p><code>AbstractPredicateWalker</code> implements interface <code>PredicateWalker</code>
and 
+implements common functionality useful for traversing the tree. For example
+parsing literals like <code>"abc"</code>, <code>-123</code> to Java
objects like <code>String</code> 
+and <code>Integer</code> is handled there.</p>
+<p>If the interface of the predefined walker <code>PredicateWalker</code>
does not
+fit your needs you can define your own interface. The code generated
+by ANTLR does not make any assumptions how you design the walking of
+your tree. The only dependency is contained in the interface 
+<code>PredicateWalkerBase</code> consisting of a single method. If you start

+defining your own walker you have to implement or extend <code>PredicateWalkerBase</code>.
+The unit tests contain an example for this. See class <code>QueryConditionProcessor</code>
+in the unit tests for the InMemory server.</p>
+<p>Note: There is currently no predefined walker for JOIN statements. If
+you need to support JOINs you have to build your own walker for this part
 as outlined in the previous section.</p>
 <h2 id="using_queryobject">Using QueryObject</h2>
 <p>The class <code>QueryObject</code> provides all the basic functionality
for resolving
 types and properties and performs common validation tasks. The <code>QueryObject</code>
 processes the <code>SELECT</code> and <code>FROM</code> parts as
well as all property references from
-the <code>WHERE</code> part. It maintains a list of Java objects and interface
that you
+the <code>WHERE</code> part. It maintains a list of Java objects and an interface
that you
 can use to access the property and type definitions given your current
 position in the statement. For an example refer to the class
 <code>StoreManagerImpl</code> of the InMemory Server and method <code>query()</code>.
 To be able to use this object <code>QueryObj</code> needs to get access to the
types contained in your
 repository. For this purpose you need to pass an interface to a <code>TypeManager</code>
-as input parameter. The second parameter is your query walker implementing
-<code>IQueryConditionProcessor</code>. Your code will typically look like this:</p>
-<div class="codehilite"><pre><span class="n">TypeManager</span> <span
class="n">tm</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">MyTypeManager</span><span class="o">();</span> <span
class="c1">// implements interface TypeManager</span>
-
-<span class="n">IQueryConditionProcessor</span> <span class="n">myWalker</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">MyWalker</span><span
class="o">();</span>
-                         <span class="c1">// implements interface IQueryConditionProcessor</span>
-                         <span class="c1">// or extends AbstractQueryConditionProcessor</span>
+as input parameter. Your code will typically look like this:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">MyWalker</span> <span class="kd">extends</span>
<span class="n">AbstractPredicateWalker</span> <span class="o">{</span>
+                         <span class="c1">// extends AbstractPredicateWalker</span>
+                         <span class="c1">// or implements interface PredicateWalker</span>
+                         <span class="c1">// or implements interface PredicateWalkerBase</span>
+  <span class="c1">// . . .</span>
+<span class="o">}</span>
+
+<span class="n">TypeManager</span> <span class="n">tm</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">MyTypeManager</span><span
class="o">();</span> <span class="c1">// implements interface TypeManager</span>
+<span class="n">MyWalker</span> <span class="n">myWalker</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">MyWalker</span><span
class="o">();</span>    
+<span class="n">queryObj</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">QueryObject</span><span class="o">(</span><span
class="n">tm</span><span class="o">);</span>
+<span class="n">QueryUtil</span> <span class="n">queryUtil</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">QueryUtil</span><span
class="o">();</span>
 
-<span class="n">queryObj</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">QueryObject</span><span class="o">(</span><span
class="n">tm</span><span class="o">,</span> <span class="n">myWalker</span><span
class="o">);</span>
+<span class="n">CmisQueryWalker</span> <span class="n">queryProcessor</span>
<span class="o">=</span> <span class="n">queryUtil</span><span
class="o">.</span><span class="na">traverseStatementAndCatchExc</span><span
class="o">(</span><span class="n">statement</span><span class="o">,</span>
<span class="n">queryObj</span><span class="o">,</span> <span class="n">myWalker</span><span
class="o">);</span>
 </pre></div>
 
 
-<p><code>queryObj</code> then will process the statement and call the interface
methods of
-your walker:</p>
+<p><code>queryUtil</code> then will process the statement and call the
interface methods of
+your walker (Note: This code is in opencmis, you don't have to implement it
+yourself.):</p>
 <div class="codehilite"><pre><span class="k">try</span> <span
class="o">{</span>
-
-    <span class="n">CmisQueryWalker</span> <span class="n">walker</span>
<span class="o">=</span> <span class="n">QueryObject</span><span
class="o">.</span><span class="na">getWalker</span><span class="o">(</span><span
class="n">statement</span><span class="o">);</span>
-    <span class="n">walker</span><span class="o">.</span><span
class="na">query</span><span class="o">(</span><span class="n">queryObj</span><span
class="o">);</span>
-
+    <span class="n">walker</span> <span class="o">=</span> <span
class="n">getWalker</span><span class="o">(</span><span class="n">statement</span><span
class="o">);</span>
+    <span class="n">walker</span><span class="o">.</span><span
class="na">query</span><span class="o">(</span><span class="n">queryObj</span><span
class="o">,</span> <span class="n">pw</span><span class="o">);</span>
+    <span class="k">return</span> <span class="n">walker</span><span
class="o">;</span> 
 <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span
class="n">RecognitionException</span> <span class="n">e</span><span
class="o">)</span> <span class="o">{</span>
-    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with RecognitionException error:\n &quot;</span> <span class="o">+</span>
<span class="n">e</span><span class="o">);</span>
+    <span class="n">String</span> <span class="n">errorMsg</span>
<span class="o">=</span> <span class="n">queryObj</span><span class="o">.</span><span
class="na">getErrorMessage</span><span class="o">();</span>
+    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">CmisInvalidArgumentException</span><span class="o">(</span><span
class="s">&quot;Walking of statement failed with RecognitionException error: \n   &quot;</span>
<span class="o">+</span> <span class="n">errorMsg</span><span class="o">);</span>
+<span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span
class="n">CmisBaseException</span> <span class="n">e</span><span class="o">)</span>
<span class="o">{</span>
+    <span class="k">throw</span> <span class="n">e</span><span
class="o">;</span>
 <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span
class="n">Exception</span> <span class="n">e</span><span class="o">)</span>
<span class="o">{</span>
-    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Walking
of statement failed with exception:\n &quot;</span> <span class="o">+</span>
<span class="n">e</span><span class="o">);</span>
+    <span class="k">throw</span> <span class="k">new</span> <span
class="nf">CmisInvalidArgumentException</span><span class="o">(</span><span
class="s">&quot;Walking of statement failed with exception: \n   &quot;</span>
<span class="o">+</span> <span class="n">e</span><span class="o">);</span>
 <span class="o">}</span>
 </pre></div>
 
@@ -312,18 +326,18 @@ example the statement</p>
 </pre></div>
 
 
-<p>will result in calling the method <code>onLessThan()</code> in your
walker callback
+<p>will result in calling the method <code>walkLessThan()</code> in your
walker callback
 implementation:</p>
-<div class="codehilite"><pre><span class="kd">public</span> <span
class="kt">void</span> <span class="nf">onLessThan</span><span class="o">(</span><span
class="n">Tree</span> <span class="n">ltNode</span><span class="o">,</span>
<span class="n">Tree</span> <span class="n">leftNode</span><span
class="o">,</span> <span class="n">Tree</span> <span class="n">rightNode</span><span
class="o">)</span> <span class="o">{</span>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="n">Boolean</span> <span class="nf">walkLessThan</span><span
class="o">(</span><span class="n">Tree</span> <span class="n">ltNode</span><span
class="o">,</span> <span class="n">Tree</span> <span class="n">leftNode</span><span
class="o">,</span> <span class="n">Tree</span> <span class="n">rightNode</span><span
class="o">)</span> <span class="o">{</span>
 
-    <span class="n">Object</span> <span class="n">rVal</span> <span
class="o">=</span> <span class="n">onLiteral</span><span class="o">(</span><span
class="n">rightChild</span><span class="o">);</span>
+    <span class="n">Object</span> <span class="n">rVal</span> <span
class="o">=</span> <span class="n">walkLiteral</span><span class="o">(</span><span
class="n">rightChild</span><span class="o">);</span>
     <span class="n">ColumnReference</span> <span class="n">colRef</span><span
class="o">;</span>
 
     <span class="n">CmisSelector</span> <span class="n">sel</span>
<span class="o">=</span> <span class="n">queryObj</span><span class="o">.</span><span
class="na">getColumnReference</span><span class="o">(</span><span
class="n">columnNode</span>
              <span class="o">.</span><span class="na">getTokenStartIndex</span><span
class="o">());</span>
 
     <span class="k">if</span> <span class="o">(</span><span class="kc">null</span>
<span class="o">==</span> <span class="n">sel</span><span class="o">)</span>
-       <span class="k">throw</span> <span class="k">new</span> <span
class="nf">RuntimeException</span><span class="o">(</span><span class="s">&quot;Unknown
property query name &quot;</span> <span class="o">+</span>
+       <span class="k">throw</span> <span class="k">new</span> <span
class="nf">CmisInvalidArgumentException</span><span class="o">(</span><span
class="s">&quot;Unknown property query name &quot;</span> <span class="o">+</span>
               <span class="n">columnNode</span><span class="o">.</span><span
class="na">getChild</span><span class="o">(</span><span class="mi">0</span><span
class="o">));</span>
     <span class="k">else</span> <span class="nf">if</span> <span
class="o">(</span><span class="n">sel</span> <span class="k">instanceof</span>
<span class="n">ColumnReference</span><span class="o">)</span>
        <span class="n">colRef</span> <span class="o">=</span> <span
class="o">(</span><span class="n">ColumnReference</span><span class="o">)</span>
<span class="n">sel</span><span class="o">;</span>
@@ -339,7 +353,7 @@ implementation:</p>
 
 
 <p>The right child node is a literal and you will get an Integer object with
-value 123. The left node is a reference to property and
+value 123. The left node is a reference to a property and
 <code>getColumnReference()</code> will either give you a function (currently
the only
 supported function is <code>SCORE()</code>) or a reference to a property in a
type of
 your type system. The query object maintains several maps to resolve
@@ -356,7 +370,11 @@ the requested information:</p>
 
 
 <p>Key of the map is the query name and value is the alias if an alias was
-used in the statement or the query name otherwise.</p></div>
+used in the statement or the query name otherwise.</p>
+<h2 id="limitations">Limitations</h2>
+<p>Currently the query parser does not include the full text search part
+of the grammar. Support for JOIN is limited. This will be enhanced in a
+future version</p></div>
              <!-- Content -->
            </td>
           </tr>



Mime
View raw message