You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by fi...@apache.org on 2005/02/14 23:01:13 UTC
svn commit: r153861 [6/10] - in incubator/jackrabbit/site: ./ apidocs/
apidocs/org/apache/jackrabbit/core/
apidocs/org/apache/jackrabbit/core/fs/class-use/
apidocs/org/apache/jackrabbit/core/search/
apidocs/org/apache/jackrabbit/core/search/lucene/
apidocs/org/apache/jackrabbit/core/search/xpath/
apidocs/org/apache/jackrabbit/core/state/
apidocs/org/apache/jackrabbit/core/state/class-use/
apidocs/org/apache/jackrabbit/core/version/
apidocs/org/apache/jackrabbit/core/xml/ xref-test/
xref-test/org/apache/jackrabbit/init/ xref-test/org/apache/jackrabbit/test/
xref-test/org/apache/jackrabbit/test/api/
xref-test/org/apache/jackrabbit/test/api/query/
xref-test/org/apache/jackrabbit/test/search/
xref/org/apache/jackrabbit/core/ xref/org/apache/jackrabbit/core/search/
xref/org/apache/jackrabbit/core/search/lucene/
xref/org/apache/jackrabbit/core/search/xpath/
Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/AbstractJCRTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/AbstractJCRTest.html?view=diff&r1=153860&r2=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/AbstractJCRTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/AbstractJCRTest.html Mon Feb 14 14:00:49 2005
@@ -160,10 +160,10 @@
<a name="151" href="#151">151</a> <strong>protected</strong> Session superuser;
<a name="152" href="#152">152</a>
<a name="153" href="#153">153</a> <em>/**<em>*</em></em>
-<a name="154" href="#154">154</a> <em> * Flag that indicates if the current test is a level1 test, that is</em>
-<a name="155" href="#155">155</a> <em> * the workspace is read-only.</em>
+<a name="154" href="#154">154</a> <em> * Flag that indicates if the current test is a read-only test, that is</em>
+<a name="155" href="#155">155</a> <em> * no content is written to the workspace by the test.</em>
<a name="156" href="#156">156</a> <em> */</em>
-<a name="157" href="#157">157</a> <strong>protected</strong> <strong>boolean</strong> isLevel1Test = false;
+<a name="157" href="#157">157</a> <strong>protected</strong> <strong>boolean</strong> isReadOnly = false;
<a name="158" href="#158">158</a>
<a name="159" href="#159">159</a> <em>/**<em>*</em></em>
<a name="160" href="#160">160</a> <em> * The root <code>Node</code> for testing</em>
@@ -241,89 +241,90 @@
<a name="232" href="#232">232</a> }
<a name="233" href="#233">233</a> }
<a name="234" href="#234">234</a>
-<a name="235" href="#235">235</a> <strong>if</strong> (isLevel1Test) {
+<a name="235" href="#235">235</a> <strong>if</strong> (isReadOnly) {
<a name="236" href="#236">236</a> <strong>if</strong> (!superuser.getRootNode().hasNode(testPath)) {
<a name="237" href="#237">237</a> fail(<span class="string">"Workspace does not contain test data at: "</span> + testRoot);
<a name="238" href="#238">238</a> }
-<a name="239" href="#239">239</a> } <strong>else</strong> {
-<a name="240" href="#240">240</a> Node root = superuser.getRootNode();
-<a name="241" href="#241">241</a> <strong>if</strong> (root.hasNode(testPath)) {
-<a name="242" href="#242">242</a> <em class="comment">// clean test root</em>
-<a name="243" href="#243">243</a> testRootNode = root.getNode(testPath);
-<a name="244" href="#244">244</a> <strong>for</strong> (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
-<a name="245" href="#245">245</a> children.nextNode().remove();
-<a name="246" href="#246">246</a> }
-<a name="247" href="#247">247</a> } <strong>else</strong> {
-<a name="248" href="#248">248</a> <em class="comment">// create nodes to testPath</em>
-<a name="249" href="#249">249</a> StringTokenizer names = <strong>new</strong> StringTokenizer(testPath, <span class="string">"/"</span>);
-<a name="250" href="#250">250</a> Node currentNode = root;
-<a name="251" href="#251">251</a> <strong>while</strong> (names.hasMoreTokens()) {
-<a name="252" href="#252">252</a> currentNode = currentNode.addNode(names.nextToken(), testNodeType);
-<a name="253" href="#253">253</a> }
-<a name="254" href="#254">254</a> testRootNode = currentNode;
-<a name="255" href="#255">255</a> }
-<a name="256" href="#256">256</a> root.save();
-<a name="257" href="#257">257</a> }
-<a name="258" href="#258">258</a> }
-<a name="259" href="#259">259</a>
-<a name="260" href="#260">260</a> <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
-<a name="261" href="#261">261</a> <strong>if</strong> (superuser != <strong>null</strong>) {
-<a name="262" href="#262">262</a> <strong>try</strong> {
-<a name="263" href="#263">263</a> <strong>if</strong> (!isLevel1Test) {
-<a name="264" href="#264">264</a> <em class="comment">// do a 'rollback'</em>
-<a name="265" href="#265">265</a> superuser.refresh(false);
-<a name="266" href="#266">266</a> Node root = superuser.getRootNode();
-<a name="267" href="#267">267</a> <strong>if</strong> (root.hasNode(testPath)) {
-<a name="268" href="#268">268</a> <em class="comment">// clean test root</em>
-<a name="269" href="#269">269</a> testRootNode = root.getNode(testPath);
-<a name="270" href="#270">270</a> <strong>for</strong> (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
-<a name="271" href="#271">271</a> children.nextNode().remove();
-<a name="272" href="#272">272</a> }
-<a name="273" href="#273">273</a> root.save();
-<a name="274" href="#274">274</a> }
-<a name="275" href="#275">275</a> }
-<a name="276" href="#276">276</a> } <strong>finally</strong> {
-<a name="277" href="#277">277</a> superuser.logout();
-<a name="278" href="#278">278</a> }
-<a name="279" href="#279">279</a> }
-<a name="280" href="#280">280</a> }
-<a name="281" href="#281">281</a>
-<a name="282" href="#282">282</a> <strong>protected</strong> String getProperty(String name) throws RepositoryException {
-<a name="283" href="#283">283</a> String testCaseName = getName();
-<a name="284" href="#284">284</a> String testClassName = getClass().getName();
-<a name="285" href="#285">285</a> String testPackName = <span class="string">""</span>;
-<a name="286" href="#286">286</a> <strong>int</strong> idx;
-<a name="287" href="#287">287</a> <strong>if</strong> ((idx = testClassName.lastIndexOf('.')) > -1) {
-<a name="288" href="#288">288</a> testPackName = testClassName.substring(testClassName.lastIndexOf('.', idx - 1) + 1, idx);
-<a name="289" href="#289">289</a> testClassName = testClassName.substring(idx + 1);
-<a name="290" href="#290">290</a> }
-<a name="291" href="#291">291</a>
-<a name="292" href="#292">292</a> <em class="comment">// 1) test case specific property first</em>
-<a name="293" href="#293">293</a> String value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
-<a name="294" href="#294">294</a> + testClassName + <span class="string">"."</span> + testCaseName + <span class="string">"."</span> + name);
-<a name="295" href="#295">295</a> <strong>if</strong> (value != <strong>null</strong>) {
-<a name="296" href="#296">296</a> <strong>return</strong> value;
-<a name="297" href="#297">297</a> }
-<a name="298" href="#298">298</a>
-<a name="299" href="#299">299</a> <em class="comment">// 2) check test class property</em>
-<a name="300" href="#300">300</a> value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
-<a name="301" href="#301">301</a> + testClassName + <span class="string">"."</span> + name);
-<a name="302" href="#302">302</a> <strong>if</strong> (value != <strong>null</strong>) {
-<a name="303" href="#303">303</a> <strong>return</strong> value;
-<a name="304" href="#304">304</a> }
-<a name="305" href="#305">305</a>
-<a name="306" href="#306">306</a> <em class="comment">// 3) check package property</em>
-<a name="307" href="#307">307</a> value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
-<a name="308" href="#308">308</a> + testPackName + <span class="string">"."</span> + name);
-<a name="309" href="#309">309</a> <strong>if</strong> (value != <strong>null</strong>) {
-<a name="310" href="#310">310</a> <strong>return</strong> value;
-<a name="311" href="#311">311</a> }
-<a name="312" href="#312">312</a>
-<a name="313" href="#313">313</a> <em class="comment">// finally try global property</em>
-<a name="314" href="#314">314</a> <strong>return</strong> helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span> + name);
-<a name="315" href="#315">315</a> }
-<a name="316" href="#316">316</a>
-<a name="317" href="#317">317</a> }
+<a name="239" href="#239">239</a> testRootNode = superuser.getRootNode().getNode(testPath);
+<a name="240" href="#240">240</a> } <strong>else</strong> {
+<a name="241" href="#241">241</a> Node root = superuser.getRootNode();
+<a name="242" href="#242">242</a> <strong>if</strong> (root.hasNode(testPath)) {
+<a name="243" href="#243">243</a> <em class="comment">// clean test root</em>
+<a name="244" href="#244">244</a> testRootNode = root.getNode(testPath);
+<a name="245" href="#245">245</a> <strong>for</strong> (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
+<a name="246" href="#246">246</a> children.nextNode().remove();
+<a name="247" href="#247">247</a> }
+<a name="248" href="#248">248</a> } <strong>else</strong> {
+<a name="249" href="#249">249</a> <em class="comment">// create nodes to testPath</em>
+<a name="250" href="#250">250</a> StringTokenizer names = <strong>new</strong> StringTokenizer(testPath, <span class="string">"/"</span>);
+<a name="251" href="#251">251</a> Node currentNode = root;
+<a name="252" href="#252">252</a> <strong>while</strong> (names.hasMoreTokens()) {
+<a name="253" href="#253">253</a> currentNode = currentNode.addNode(names.nextToken(), testNodeType);
+<a name="254" href="#254">254</a> }
+<a name="255" href="#255">255</a> testRootNode = currentNode;
+<a name="256" href="#256">256</a> }
+<a name="257" href="#257">257</a> root.save();
+<a name="258" href="#258">258</a> }
+<a name="259" href="#259">259</a> }
+<a name="260" href="#260">260</a>
+<a name="261" href="#261">261</a> <strong>protected</strong> <strong>void</strong> tearDown() throws Exception {
+<a name="262" href="#262">262</a> <strong>if</strong> (superuser != <strong>null</strong>) {
+<a name="263" href="#263">263</a> <strong>try</strong> {
+<a name="264" href="#264">264</a> <strong>if</strong> (!isReadOnly) {
+<a name="265" href="#265">265</a> <em class="comment">// do a 'rollback'</em>
+<a name="266" href="#266">266</a> superuser.refresh(false);
+<a name="267" href="#267">267</a> Node root = superuser.getRootNode();
+<a name="268" href="#268">268</a> <strong>if</strong> (root.hasNode(testPath)) {
+<a name="269" href="#269">269</a> <em class="comment">// clean test root</em>
+<a name="270" href="#270">270</a> testRootNode = root.getNode(testPath);
+<a name="271" href="#271">271</a> <strong>for</strong> (NodeIterator children = testRootNode.getNodes(); children.hasNext();) {
+<a name="272" href="#272">272</a> children.nextNode().remove();
+<a name="273" href="#273">273</a> }
+<a name="274" href="#274">274</a> root.save();
+<a name="275" href="#275">275</a> }
+<a name="276" href="#276">276</a> }
+<a name="277" href="#277">277</a> } <strong>finally</strong> {
+<a name="278" href="#278">278</a> superuser.logout();
+<a name="279" href="#279">279</a> }
+<a name="280" href="#280">280</a> }
+<a name="281" href="#281">281</a> }
+<a name="282" href="#282">282</a>
+<a name="283" href="#283">283</a> <strong>protected</strong> String getProperty(String name) throws RepositoryException {
+<a name="284" href="#284">284</a> String testCaseName = getName();
+<a name="285" href="#285">285</a> String testClassName = getClass().getName();
+<a name="286" href="#286">286</a> String testPackName = <span class="string">""</span>;
+<a name="287" href="#287">287</a> <strong>int</strong> idx;
+<a name="288" href="#288">288</a> <strong>if</strong> ((idx = testClassName.lastIndexOf('.')) > -1) {
+<a name="289" href="#289">289</a> testPackName = testClassName.substring(testClassName.lastIndexOf('.', idx - 1) + 1, idx);
+<a name="290" href="#290">290</a> testClassName = testClassName.substring(idx + 1);
+<a name="291" href="#291">291</a> }
+<a name="292" href="#292">292</a>
+<a name="293" href="#293">293</a> <em class="comment">// 1) test case specific property first</em>
+<a name="294" href="#294">294</a> String value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
+<a name="295" href="#295">295</a> + testClassName + <span class="string">"."</span> + testCaseName + <span class="string">"."</span> + name);
+<a name="296" href="#296">296</a> <strong>if</strong> (value != <strong>null</strong>) {
+<a name="297" href="#297">297</a> <strong>return</strong> value;
+<a name="298" href="#298">298</a> }
+<a name="299" href="#299">299</a>
+<a name="300" href="#300">300</a> <em class="comment">// 2) check test class property</em>
+<a name="301" href="#301">301</a> value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
+<a name="302" href="#302">302</a> + testClassName + <span class="string">"."</span> + name);
+<a name="303" href="#303">303</a> <strong>if</strong> (value != <strong>null</strong>) {
+<a name="304" href="#304">304</a> <strong>return</strong> value;
+<a name="305" href="#305">305</a> }
+<a name="306" href="#306">306</a>
+<a name="307" href="#307">307</a> <em class="comment">// 3) check package property</em>
+<a name="308" href="#308">308</a> value = helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span>
+<a name="309" href="#309">309</a> + testPackName + <span class="string">"."</span> + name);
+<a name="310" href="#310">310</a> <strong>if</strong> (value != <strong>null</strong>) {
+<a name="311" href="#311">311</a> <strong>return</strong> value;
+<a name="312" href="#312">312</a> }
+<a name="313" href="#313">313</a>
+<a name="314" href="#314">314</a> <em class="comment">// finally try global property</em>
+<a name="315" href="#315">315</a> <strong>return</strong> helper.getProperty(RepositoryStub.PROP_PREFIX + <span class="string">"."</span> + name);
+<a name="316" href="#316">316</a> }
+<a name="317" href="#317">317</a>
+<a name="318" href="#318">318</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/GetAncestorTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/GetAncestorTest.html?view=diff&r1=153860&r2=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/GetAncestorTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/GetAncestorTest.html Mon Feb 14 14:00:49 2005
@@ -42,7 +42,7 @@
<a name="33" href="#33">33</a> <strong>protected</strong> Item item;
<a name="34" href="#34">34</a>
<a name="35" href="#35">35</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
-<a name="36" href="#36">36</a> isLevel1Test = <strong>true</strong>;
+<a name="36" href="#36">36</a> isReadOnly = <strong>true</strong>;
<a name="37" href="#37">37</a> <strong>super</strong>.setUp();
<a name="38" href="#38">38</a> item = helper.getReadOnlySession().getRootNode();
<a name="39" href="#39">39</a> }
Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/RootNodeTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/RootNodeTest.html?view=diff&r1=153860&r2=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/RootNodeTest.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/RootNodeTest.html Mon Feb 14 14:00:49 2005
@@ -44,7 +44,7 @@
<a name="35" href="#35">35</a> Node rootNode;
<a name="36" href="#36">36</a>
<a name="37" href="#37">37</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
-<a name="38" href="#38">38</a> isLevel1Test = <strong>true</strong>;
+<a name="38" href="#38">38</a> isReadOnly = <strong>true</strong>;
<a name="39" href="#39">39</a> <strong>super</strong>.setUp();
<a name="40" href="#40">40</a> rootNode = helper.getReadOnlySession().getRootNode();
<a name="41" href="#41">41</a> }
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryLevel2Test.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryLevel2Test.html?view=auto&rev=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryLevel2Test.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryLevel2Test.html Mon Feb 14 14:00:49 2005
@@ -0,0 +1,132 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>AbstractQueryLevel2Test xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="comment">/*</em>
+<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a> <em class="comment"> * as applicable.</em>
+<a name="4" href="#4">4</a> <em class="comment"> *</em>
+<a name="5" href="#5">5</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a> <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a> <em class="comment"> *</em>
+<a name="9" href="#9">9</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a> <em class="comment"> *</em>
+<a name="11" href="#11">11</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a> <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a> <em class="comment"> */</em>
+<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/package-summary.html">org.apache.jackrabbit.test.api.query</a>;
+<a name="18" href="#18">18</a>
+<a name="19" href="#19">19</a> <strong>import</strong> org.apache.jackrabbit.test.NotExecutableException;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.nodetype.NodeType;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.query.RowIterator;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.query.Row;
+<a name="24" href="#24">24</a> <strong>import</strong> javax.jcr.Value;
+<a name="25" href="#25">25</a> <strong>import</strong> javax.jcr.RepositoryException;
+<a name="26" href="#26">26</a> <strong>import</strong> javax.jcr.Node;
+<a name="27" href="#27">27</a> <strong>import</strong> javax.jcr.StringValue;
+<a name="28" href="#28">28</a>
+<a name="29" href="#29">29</a> <em>/**<em>*</em></em>
+<a name="30" href="#30">30</a> <em> * Implements common setup methods for level 2 queries.</em>
+<a name="31" href="#31">31</a> <em> */</em>
+<a name="32" href="#32">32</a> <strong>public</strong> <strong>abstract</strong> <strong>class</strong> AbstractQueryLevel2Test <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/AbstractQueryTest.html">AbstractQueryTest</a> {
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> <em>/**<em>*</em></em>
+<a name="35" href="#35">35</a> <em> * Creates two nodes with name {@link #nodeName1} and {@link #nodeName2}</em>
+<a name="36" href="#36">36</a> <em> * with nodetype {@link #testNodeType}. The node type must allow a String</em>
+<a name="37" href="#37">37</a> <em> * property with name {@link #propertyName1} which is fulltext indexed.</em>
+<a name="38" href="#38">38</a> <em> */</em>
+<a name="39" href="#39">39</a> <strong>protected</strong> <strong>void</strong> setUpFullTextTest() throws RepositoryException {
+<a name="40" href="#40">40</a> Node node = testRootNode.addNode(nodeName1, testNodeType);
+<a name="41" href="#41">41</a> node.setProperty(propertyName1, <span class="string">"The quick brown fox jumps over the lazy dog."</span>);
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> node = testRootNode.addNode(nodeName2, testNodeType);
+<a name="44" href="#44">44</a> node.setProperty(propertyName1, <span class="string">"The quick brown cat jumps over the lazy dog."</span>);
+<a name="45" href="#45">45</a> testRootNode.save();
+<a name="46" href="#46">46</a> }
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> <em>/**<em>*</em></em>
+<a name="49" href="#49">49</a> <em> * Creates three nodes with names: {@link #nodeName1}, {@link #nodeName2}</em>
+<a name="50" href="#50">50</a> <em> * and {@link #nodeName3}. All nodes are of node type {@link #testNodeType}.</em>
+<a name="51" href="#51">51</a> <em> * the node type must allow a String property with name {@link</em>
+<a name="52" href="#52">52</a> <em> * #propertyName1}.</em>
+<a name="53" href="#53">53</a> <em> */</em>
+<a name="54" href="#54">54</a> <strong>protected</strong> <strong>void</strong> setUpRangeTest() throws RepositoryException {
+<a name="55" href="#55">55</a> Node node = testRootNode.addNode(nodeName1, testNodeType);
+<a name="56" href="#56">56</a> node.setProperty(propertyName1, <span class="string">"a"</span>);
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> node = testRootNode.addNode(nodeName2, testNodeType);
+<a name="59" href="#59">59</a> node.setProperty(propertyName1, <span class="string">"b"</span>);
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> Node cNode = node.addNode(nodeName3, testNodeType);
+<a name="62" href="#62">62</a> cNode.setProperty(propertyName1, <span class="string">"c"</span>);
+<a name="63" href="#63">63</a> testRootNode.save();
+<a name="64" href="#64">64</a> }
+<a name="65" href="#65">65</a>
+<a name="66" href="#66">66</a> <em>/**<em>*</em></em>
+<a name="67" href="#67">67</a> <em> * Creates three nodes with names: {@link #nodeName1}, {@link #nodeName2}</em>
+<a name="68" href="#68">68</a> <em> * and {@link #nodeName3}. All nodes are of node type {@link #testNodeType}.</em>
+<a name="69" href="#69">69</a> <em> * the node type must allow a String property with name {@link</em>
+<a name="70" href="#70">70</a> <em> * #propertyName1} and a multi valued String property with name {@link</em>
+<a name="71" href="#71">71</a> <em> * #propertyName2}.</em>
+<a name="72" href="#72">72</a> <em> * <p/></em>
+<a name="73" href="#73">73</a> <em> * If the node type does not support multi values for {@link #propertyName2}</em>
+<a name="74" href="#74">74</a> <em> * a {@link org.apache.jackrabbit.test.NotExecutableException} is thrown.</em>
+<a name="75" href="#75">75</a> <em> */</em>
+<a name="76" href="#76">76</a> <strong>protected</strong> <strong>void</strong> setUpMultiValueTest() throws RepositoryException, NotExecutableException {
+<a name="77" href="#77">77</a> <em class="comment">// check if NodeType supports mvp</em>
+<a name="78" href="#78">78</a> NodeType nt = superuser.getWorkspace().getNodeTypeManager().getNodeType(testNodeType);
+<a name="79" href="#79">79</a> Value[] testValue = <strong>new</strong> Value[]{<strong>new</strong> StringValue(<span class="string">"one"</span>), <strong>new</strong> StringValue(<span class="string">"two"</span>), <strong>new</strong> StringValue(<span class="string">"three"</span>)};
+<a name="80" href="#80">80</a> <strong>if</strong> (!nt.canSetProperty(propertyName2, testValue)) {
+<a name="81" href="#81">81</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>(<span class="string">"Property "</span> + propertyName2 + <span class="string">" of NodeType "</span> + testNodeType + <span class="string">" does not allow multi values"</span>);
+<a name="82" href="#82">82</a> }
+<a name="83" href="#83">83</a>
+<a name="84" href="#84">84</a> Node node = testRootNode.addNode(nodeName1, testNodeType);
+<a name="85" href="#85">85</a> node.setProperty(propertyName1, <span class="string">"existence"</span>);
+<a name="86" href="#86">86</a> node.setProperty(propertyName2, testValue);
+<a name="87" href="#87">87</a>
+<a name="88" href="#88">88</a> node = testRootNode.addNode(nodeName2, testNodeType);
+<a name="89" href="#89">89</a> node.setProperty(propertyName1, <span class="string">"nonexistence"</span>);
+<a name="90" href="#90">90</a> node.setProperty(propertyName2, <strong>new</strong> String[]{<span class="string">"one"</span>, <span class="string">"three"</span>});
+<a name="91" href="#91">91</a>
+<a name="92" href="#92">92</a> Node cNode = node.addNode(nodeName3, testNodeType);
+<a name="93" href="#93">93</a> cNode.setProperty(propertyName1, <span class="string">"existence"</span>);
+<a name="94" href="#94">94</a> testRootNode.save();
+<a name="95" href="#95">95</a> }
+<a name="96" href="#96">96</a>
+<a name="97" href="#97">97</a> <em>/**<em>*</em></em>
+<a name="98" href="#98">98</a> <em> * Tests if all results contain only the searched value is contained in the</em>
+<a name="99" href="#99">99</a> <em> * selected property</em>
+<a name="100" href="#100">100</a> <em> *</em>
+<a name="101" href="#101">101</a> <em> * @param itr rows of the query result.</em>
+<a name="102" href="#102">102</a> <em> * @param propertyName selected property, that should contain the value.</em>
+<a name="103" href="#103">103</a> <em> * @param expectedValue the value that is expected to be found</em>
+<a name="104" href="#104">104</a> <em> */</em>
+<a name="105" href="#105">105</a> <strong>protected</strong> <strong>void</strong> checkValue(RowIterator itr,
+<a name="106" href="#106">106</a> String propertyName,
+<a name="107" href="#107">107</a> String expectedValue) throws RepositoryException {
+<a name="108" href="#108">108</a> <strong>while</strong> (itr.hasNext()) {
+<a name="109" href="#109">109</a> Row row = itr.nextRow();
+<a name="110" href="#110">110</a> <em class="comment">// check fullText</em>
+<a name="111" href="#111">111</a> Value value = row.getValue(propertyName);
+<a name="112" href="#112">112</a> <strong>if</strong> (value == <strong>null</strong>) {
+<a name="113" href="#113">113</a> fail(<span class="string">"Search Test: fails result does not contain value for selected property"</span>);
+<a name="114" href="#114">114</a> }
+<a name="115" href="#115">115</a> assertEquals(<span class="string">"Value in query result row does not match expected value"</span>,
+<a name="116" href="#116">116</a> expectedValue, value.getString());
+<a name="117" href="#117">117</a> }
+<a name="118" href="#118">118</a> }
+<a name="119" href="#119">119</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryLevel2Test.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.html?view=auto&rev=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.html Mon Feb 14 14:00:49 2005
@@ -0,0 +1,246 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>AbstractQueryTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="comment">/*</em>
+<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a> <em class="comment"> * as applicable.</em>
+<a name="4" href="#4">4</a> <em class="comment"> *</em>
+<a name="5" href="#5">5</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a> <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a> <em class="comment"> *</em>
+<a name="9" href="#9">9</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a> <em class="comment"> *</em>
+<a name="11" href="#11">11</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a> <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a> <em class="comment"> */</em>
+<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/package-summary.html">org.apache.jackrabbit.test.api.query</a>;
+<a name="18" href="#18">18</a>
+<a name="19" href="#19">19</a> <strong>import</strong> org.apache.jackrabbit.test.AbstractJCRTest;
+<a name="20" href="#20">20</a> <strong>import</strong> org.apache.jackrabbit.test.NotExecutableException;
+<a name="21" href="#21">21</a>
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.query.QueryResult;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.query.RowIterator;
+<a name="24" href="#24">24</a> <strong>import</strong> javax.jcr.query.Query;
+<a name="25" href="#25">25</a> <strong>import</strong> javax.jcr.RepositoryException;
+<a name="26" href="#26">26</a> <strong>import</strong> javax.jcr.Value;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em>/**<em>*</em></em>
+<a name="29" href="#29">29</a> <em> * Abstract base class for query test cases.</em>
+<a name="30" href="#30">30</a> <em> */</em>
+<a name="31" href="#31">31</a> <strong>public</strong> <strong>abstract</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/AbstractQueryTest.html">AbstractQueryTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/AbstractJCRTest.html">AbstractJCRTest</a> {
+<a name="32" href="#32">32</a>
+<a name="33" href="#33">33</a> <em>/**<em>*</em></em>
+<a name="34" href="#34">34</a> <em> * Namespace URI for jcr functions in XPath</em>
+<a name="35" href="#35">35</a> <em> */</em>
+<a name="36" href="#36">36</a> <strong>protected</strong> <strong>static</strong> <strong>final</strong> String NS_JCRFN_URI = <span class="string">"http://www.jcp.org/jcr/xpath-functions/1.0"</span>;
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a> <em>/**<em>*</em></em>
+<a name="39" href="#39">39</a> <em> * Resolved QName for jcr:score</em>
+<a name="40" href="#40">40</a> <em> */</em>
+<a name="41" href="#41">41</a> <strong>protected</strong> String jcrScore;
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> <em>/**<em>*</em></em>
+<a name="44" href="#44">44</a> <em> * Resolved QName for jcr:path</em>
+<a name="45" href="#45">45</a> <em> */</em>
+<a name="46" href="#46">46</a> <strong>protected</strong> String jcrPath;
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> <em>/**<em>*</em></em>
+<a name="49" href="#49">49</a> <em> * Resolved QName for jcr:root</em>
+<a name="50" href="#50">50</a> <em> */</em>
+<a name="51" href="#51">51</a> <strong>protected</strong> String jcrRoot;
+<a name="52" href="#52">52</a>
+<a name="53" href="#53">53</a> <em>/**<em>*</em></em>
+<a name="54" href="#54">54</a> <em> * Resolved QName for jcrfn:contains</em>
+<a name="55" href="#55">55</a> <em> */</em>
+<a name="56" href="#56">56</a> <strong>protected</strong> String jcrfnContains;
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <em>/**<em>*</em></em>
+<a name="59" href="#59">59</a> <em> * Set-up the configuration values used for the test. Per default retrieves</em>
+<a name="60" href="#60">60</a> <em> * a session, configures testRoot, and nodetype and checks if the query</em>
+<a name="61" href="#61">61</a> <em> * language for the current language is available.<br></em>
+<a name="62" href="#62">62</a> <em> */</em>
+<a name="63" href="#63">63</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="64" href="#64">64</a> <strong>super</strong>.setUp();
+<a name="65" href="#65">65</a> jcrScore = superuser.getNamespacePrefix(NS_JCR_URI) + <span class="string">":score"</span>;
+<a name="66" href="#66">66</a> jcrPath = superuser.getNamespacePrefix(NS_JCR_URI) + <span class="string">":path"</span>;
+<a name="67" href="#67">67</a> jcrRoot = superuser.getNamespacePrefix(NS_JCR_URI) + <span class="string">":root"</span>;
+<a name="68" href="#68">68</a> jcrfnContains = superuser.getNamespacePrefix(NS_JCRFN_URI) + <span class="string">":contains"</span>;
+<a name="69" href="#69">69</a> }
+<a name="70" href="#70">70</a>
+<a name="71" href="#71">71</a> <em>/**<em>*</em></em>
+<a name="72" href="#72">72</a> <em> * Create a {@link Query} for a given {@link Statement}.</em>
+<a name="73" href="#73">73</a> <em> *</em>
+<a name="74" href="#74">74</a> <em> * @param statement the query should be created for</em>
+<a name="75" href="#75">75</a> <em> * @return</em>
+<a name="76" href="#76">76</a> <em> *</em>
+<a name="77" href="#77">77</a> <em> * @throws RepositoryException</em>
+<a name="78" href="#78">78</a> <em> * @see #createQuery(String, String)</em>
+<a name="79" href="#79">79</a> <em> */</em>
+<a name="80" href="#80">80</a> <strong>protected</strong> Query createQuery(<a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> statement) throws RepositoryException {
+<a name="81" href="#81">81</a> <strong>return</strong> createQuery(statement.getStatement(), statement.getLanguage());
+<a name="82" href="#82">82</a> }
+<a name="83" href="#83">83</a>
+<a name="84" href="#84">84</a> <em>/**<em>*</em></em>
+<a name="85" href="#85">85</a> <em> * Creates a {@link Query} for the given statement in the requested</em>
+<a name="86" href="#86">86</a> <em> * language</em>
+<a name="87" href="#87">87</a> <em> *</em>
+<a name="88" href="#88">88</a> <em> * @param statement the query should be created for</em>
+<a name="89" href="#89">89</a> <em> * @param language query language to be used for Query creation</em>
+<a name="90" href="#90">90</a> <em> * @return</em>
+<a name="91" href="#91">91</a> <em> *</em>
+<a name="92" href="#92">92</a> <em> * @throws RepositoryException</em>
+<a name="93" href="#93">93</a> <em> */</em>
+<a name="94" href="#94">94</a> <strong>protected</strong> Query createQuery(String statement, String language) throws RepositoryException {
+<a name="95" href="#95">95</a> log.println(<span class="string">"Creating query: "</span> + statement);
+<a name="96" href="#96">96</a> <strong>return</strong> superuser.getWorkspace().getQueryManager().createQuery(statement,
+<a name="97" href="#97">97</a> language);
+<a name="98" href="#98">98</a> }
+<a name="99" href="#99">99</a>
+<a name="100" href="#100">100</a> <em>/**<em>*</em></em>
+<a name="101" href="#101">101</a> <em> * Creates and executes a {@link Query} for the given {@link Statement}</em>
+<a name="102" href="#102">102</a> <em> *</em>
+<a name="103" href="#103">103</a> <em> * @param statement to execute</em>
+<a name="104" href="#104">104</a> <em> * @return</em>
+<a name="105" href="#105">105</a> <em> *</em>
+<a name="106" href="#106">106</a> <em> * @throws RepositoryException</em>
+<a name="107" href="#107">107</a> <em> * @see #execute(String, String)</em>
+<a name="108" href="#108">108</a> <em> */</em>
+<a name="109" href="#109">109</a> <strong>protected</strong> QueryResult execute(<a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> statement) throws RepositoryException {
+<a name="110" href="#110">110</a> <strong>return</strong> execute(statement.getStatement(), statement.getLanguage());
+<a name="111" href="#111">111</a> }
+<a name="112" href="#112">112</a>
+<a name="113" href="#113">113</a> <em>/**<em>*</em></em>
+<a name="114" href="#114">114</a> <em> * Creates and executes a {@link Query} for a given Statement in a given</em>
+<a name="115" href="#115">115</a> <em> * query language</em>
+<a name="116" href="#116">116</a> <em> *</em>
+<a name="117" href="#117">117</a> <em> * @param statement the query should be build for</em>
+<a name="118" href="#118">118</a> <em> * @param language query language the stement is written in</em>
+<a name="119" href="#119">119</a> <em> * @return</em>
+<a name="120" href="#120">120</a> <em> *</em>
+<a name="121" href="#121">121</a> <em> * @throws RepositoryException</em>
+<a name="122" href="#122">122</a> <em> */</em>
+<a name="123" href="#123">123</a> <strong>protected</strong> QueryResult execute(String statement, String language)
+<a name="124" href="#124">124</a> throws RepositoryException {
+<a name="125" href="#125">125</a> Query query = createQuery(statement, language);
+<a name="126" href="#126">126</a> <strong>return</strong> query.execute();
+<a name="127" href="#127">127</a> }
+<a name="128" href="#128">128</a>
+<a name="129" href="#129">129</a> <em>/**<em>*</em></em>
+<a name="130" href="#130">130</a> <em> * Checks if the <code>result</code> contains a number of</em>
+<a name="131" href="#131">131</a> <em> * <code>hits</code>.</em>
+<a name="132" href="#132">132</a> <em> *</em>
+<a name="133" href="#133">133</a> <em> * @param result the <code>QueryResult</code>.</em>
+<a name="134" href="#134">134</a> <em> * @param hits the number of expected hits.</em>
+<a name="135" href="#135">135</a> <em> * @throws RepositoryException if an error occurs while iterating over the</em>
+<a name="136" href="#136">136</a> <em> * result nodes.</em>
+<a name="137" href="#137">137</a> <em> */</em>
+<a name="138" href="#138">138</a> <strong>protected</strong> <strong>void</strong> checkResult(QueryResult result, <strong>int</strong> hits)
+<a name="139" href="#139">139</a> throws RepositoryException {
+<a name="140" href="#140">140</a> RowIterator itr = result.getRows();
+<a name="141" href="#141">141</a> <strong>long</strong> count = itr.getSize();
+<a name="142" href="#142">142</a> <strong>if</strong> (count == 0) {
+<a name="143" href="#143">143</a> log.println(<span class="string">" NONE"</span>);
+<a name="144" href="#144">144</a> }
+<a name="145" href="#145">145</a> assertEquals(<span class="string">"Wrong hit count."</span>, hits, count);
+<a name="146" href="#146">146</a> }
+<a name="147" href="#147">147</a>
+<a name="148" href="#148">148</a> <em>/**<em>*</em></em>
+<a name="149" href="#149">149</a> <em> * Checks if the <code>result</code> contains a number of <code>hits</code></em>
+<a name="150" href="#150">150</a> <em> * and <code>properties</code>.</em>
+<a name="151" href="#151">151</a> <em> *</em>
+<a name="152" href="#152">152</a> <em> * @param result the <code>QueryResult</code>.</em>
+<a name="153" href="#153">153</a> <em> * @param hits the number of expected hits.</em>
+<a name="154" href="#154">154</a> <em> * @param properties the number of expected properties.</em>
+<a name="155" href="#155">155</a> <em> * @throws RepositoryException if an error occurs while iterating over the</em>
+<a name="156" href="#156">156</a> <em> * result nodes.</em>
+<a name="157" href="#157">157</a> <em> */</em>
+<a name="158" href="#158">158</a> <strong>protected</strong> <strong>void</strong> checkResult(QueryResult result, <strong>int</strong> hits, <strong>int</strong> properties)
+<a name="159" href="#159">159</a> throws RepositoryException {
+<a name="160" href="#160">160</a> checkResult(result, hits);
+<a name="161" href="#161">161</a> <em class="comment">// now check property count</em>
+<a name="162" href="#162">162</a> <strong>int</strong> count = 0;
+<a name="163" href="#163">163</a> log.println(<span class="string">"Properties:"</span>);
+<a name="164" href="#164">164</a> String[] propNames = result.getPropertyNames();
+<a name="165" href="#165">165</a> <strong>for</strong> (RowIterator it = result.getRows(); it.hasNext();) {
+<a name="166" href="#166">166</a> StringBuffer msg = <strong>new</strong> StringBuffer();
+<a name="167" href="#167">167</a> Value[] values = it.nextRow().getValues();
+<a name="168" href="#168">168</a> <strong>for</strong> (<strong>int</strong> i = 0; i < propNames.length; i++, count++) {
+<a name="169" href="#169">169</a> msg.append(<span class="string">" "</span>).append(propNames[i]).append(<span class="string">": "</span>);
+<a name="170" href="#170">170</a> <strong>if</strong> (values[i] == <strong>null</strong>) {
+<a name="171" href="#171">171</a> msg.append(<span class="string">"null"</span>);
+<a name="172" href="#172">172</a> } <strong>else</strong> {
+<a name="173" href="#173">173</a> msg.append(values[i].getString());
+<a name="174" href="#174">174</a> }
+<a name="175" href="#175">175</a> }
+<a name="176" href="#176">176</a> log.println(msg);
+<a name="177" href="#177">177</a> }
+<a name="178" href="#178">178</a> <strong>if</strong> (count == 0) {
+<a name="179" href="#179">179</a> log.println(<span class="string">" NONE"</span>);
+<a name="180" href="#180">180</a> }
+<a name="181" href="#181">181</a> assertEquals(<span class="string">"Wrong property count."</span>, properties, count);
+<a name="182" href="#182">182</a> }
+<a name="183" href="#183">183</a>
+<a name="184" href="#184">184</a> <em>/**<em>*</em></em>
+<a name="185" href="#185">185</a> <em> * Checks if the {@link QueryResult} is ordered according order property in</em>
+<a name="186" href="#186">186</a> <em> * direction of related argument.</em>
+<a name="187" href="#187">187</a> <em> *</em>
+<a name="188" href="#188">188</a> <em> * @param queryResult to be tested</em>
+<a name="189" href="#189">189</a> <em> * @param propName Name of the porperty to order by</em>
+<a name="190" href="#190">190</a> <em> * @param descending if <code>true</code> order has to be descending</em>
+<a name="191" href="#191">191</a> <em> * @throws RepositoryException</em>
+<a name="192" href="#192">192</a> <em> * @throws NotExecutableException in case of less than two results or all</em>
+<a name="193" href="#193">193</a> <em> * results have same size of value in its</em>
+<a name="194" href="#194">194</a> <em> * order-property</em>
+<a name="195" href="#195">195</a> <em> */</em>
+<a name="196" href="#196">196</a> <strong>protected</strong> <strong>void</strong> evaluateResultOrder(QueryResult queryResult, String propName,
+<a name="197" href="#197">197</a> <strong>boolean</strong> descending)
+<a name="198" href="#198">198</a> throws RepositoryException, <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a> {
+<a name="199" href="#199">199</a> RowIterator rows = queryResult.getRows();
+<a name="200" href="#200">200</a> <strong>if</strong> (rows.getSize() < 2) {
+<a name="201" href="#201">201</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>(<span class="string">"Can not test ordering on less than 2 results"</span>);
+<a name="202" href="#202">202</a> }
+<a name="203" href="#203">203</a> <strong>int</strong> changeCnt = 0;
+<a name="204" href="#204">204</a> String last = <span class="string">""</span>;
+<a name="205" href="#205">205</a> <strong>while</strong> (rows.hasNext()) {
+<a name="206" href="#206">206</a> String value = rows.nextRow().getValue(propName).getString();
+<a name="207" href="#207">207</a> <strong>int</strong> cp = value.compareTo(last);
+<a name="208" href="#208">208</a> <em class="comment">// if value changed evauluate if the derection is correct</em>
+<a name="209" href="#209">209</a> <strong>if</strong> (cp != 0) {
+<a name="210" href="#210">210</a> changeCnt++;
+<a name="211" href="#211">211</a> <strong>if</strong> (cp == 1 && descending) {
+<a name="212" href="#212">212</a> fail(<span class="string">"Repository doesn't order properly descending"</span>);
+<a name="213" href="#213">213</a> } <strong>else</strong> <strong>if</strong> (cp == -1 && !descending) {
+<a name="214" href="#214">214</a> fail(<span class="string">"Repository doesn't order properly ascending"</span>);
+<a name="215" href="#215">215</a> }
+<a name="216" href="#216">216</a> }
+<a name="217" href="#217">217</a> last = value;
+<a name="218" href="#218">218</a> }
+<a name="219" href="#219">219</a> <strong>if</strong> (changeCnt < 1) {
+<a name="220" href="#220">220</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>(<span class="string">"Can not test ordering on only one value"</span>);
+<a name="221" href="#221">221</a> }
+<a name="222" href="#222">222</a> }
+<a name="223" href="#223">223</a>
+<a name="224" href="#224">224</a> <em>/**<em>*</em></em>
+<a name="225" href="#225">225</a> <em> * Test if the requested Descriptor is registred at repository</em>
+<a name="226" href="#226">226</a> <em> *</em>
+<a name="227" href="#227">227</a> <em> * @param descriptor to be searched.</em>
+<a name="228" href="#228">228</a> <em> * @return true if descriptor is contained in the repository</em>
+<a name="229" href="#229">229</a> <em> */</em>
+<a name="230" href="#230">230</a> <strong>protected</strong> <strong>boolean</strong> hasDescriptor(String descriptor) {
+<a name="231" href="#231">231</a> <strong>return</strong> superuser.getRepository().getDescriptor(descriptor) != <strong>null</strong>;
+<a name="232" href="#232">232</a> }
+<a name="233" href="#233">233</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLOrderByTest.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLOrderByTest.html?view=auto&rev=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLOrderByTest.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLOrderByTest.html Mon Feb 14 14:00:49 2005
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>SQLOrderByTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="comment">/*</em>
+<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a> <em class="comment"> * as applicable.</em>
+<a name="4" href="#4">4</a> <em class="comment"> *</em>
+<a name="5" href="#5">5</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a> <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a> <em class="comment"> *</em>
+<a name="9" href="#9">9</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a> <em class="comment"> *</em>
+<a name="11" href="#11">11</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a> <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a> <em class="comment"> */</em>
+<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/package-summary.html">org.apache.jackrabbit.test.api.query</a>;
+<a name="18" href="#18">18</a>
+<a name="19" href="#19">19</a> <strong>import</strong> javax.jcr.query.Query;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a>
+<a name="22" href="#22">22</a> <em>/**<em>*</em></em>
+<a name="23" href="#23">23</a> <em> * This test searches for all nodes of a specific node type and orders them by</em>
+<a name="24" href="#24">24</a> <em> * the property with name configured as {@link #propertyName1}.</em>
+<a name="25" href="#25">25</a> <em> * <p/></em>
+<a name="26" href="#26">26</a> <em> * The default workspace must at least contain two nodes of type {@link #testNodeType}</em>
+<a name="27" href="#27">27</a> <em> * with String properties named {@link #propertyName1} containing distinct</em>
+<a name="28" href="#28">28</a> <em> * values.</em>
+<a name="29" href="#29">29</a> <em> *</em>
+<a name="30" href="#30">30</a> <em> * @test</em>
+<a name="31" href="#31">31</a> <em> * @sources SQLOrderByTest.java</em>
+<a name="32" href="#32">32</a> <em> * @executeClass org.apache.jackrabbit.test.api.query.SQLOrderByTest</em>
+<a name="33" href="#33">33</a> <em> * @keywords sql</em>
+<a name="34" href="#34">34</a> <em> */</em>
+<a name="35" href="#35">35</a> <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/SQLOrderByTest.html">SQLOrderByTest</a> <strong>extends</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/AbstractQueryTest.html">AbstractQueryTest</a> {
+<a name="36" href="#36">36</a>
+<a name="37" href="#37">37</a> <em>/**<em>*</em></em>
+<a name="38" href="#38">38</a> <em> * Statement without order by modifier.</em>
+<a name="39" href="#39">39</a> <em> */</em>
+<a name="40" href="#40">40</a> <strong>private</strong> String baseStatement;
+<a name="41" href="#41">41</a>
+<a name="42" href="#42">42</a> <em>/**<em>*</em></em>
+<a name="43" href="#43">43</a> <em> * Prepare a statement without the order by modifier to be used for the</em>
+<a name="44" href="#44">44</a> <em> * tests</em>
+<a name="45" href="#45">45</a> <em> */</em>
+<a name="46" href="#46">46</a> <strong>protected</strong> <strong>void</strong> setUp() throws Exception {
+<a name="47" href="#47">47</a> isReadOnly = <strong>true</strong>;
+<a name="48" href="#48">48</a> <strong>super</strong>.setUp();
+<a name="49" href="#49">49</a> <em class="comment">// setup common base statement</em>
+<a name="50" href="#50">50</a> StringBuffer tmp = <strong>new</strong> StringBuffer(<span class="string">"SELECT "</span>).append(propertyName1);
+<a name="51" href="#51">51</a> tmp.append(<span class="string">" FROM "</span>).append(testNodeType);
+<a name="52" href="#52">52</a> tmp.append(<span class="string">" WHERE "</span>).append(propertyName1).append(<span class="string">" IS NOT NULL"</span>);
+<a name="53" href="#53">53</a> tmp.append(<span class="string">" ORDER BY "</span>);
+<a name="54" href="#54">54</a> tmp.append(propertyName1);
+<a name="55" href="#55">55</a> baseStatement = tmp.toString();
+<a name="56" href="#56">56</a> }
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <em>/**<em>*</em></em>
+<a name="59" href="#59">59</a> <em> * Test if sort order <i>ascending</i> is respected.</em>
+<a name="60" href="#60">60</a> <em> * <p/></em>
+<a name="61" href="#61">61</a> <em> * For configuration description see {@link SQLOrderByTest}.</em>
+<a name="62" href="#62">62</a> <em> */</em>
+<a name="63" href="#63">63</a> <strong>public</strong> <strong>void</strong> testOrderByAscending() throws Exception {
+<a name="64" href="#64">64</a> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> stmt = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(baseStatement + <span class="string">" ASC"</span>, Query.SQL);
+<a name="65" href="#65">65</a> evaluateResultOrder(execute(stmt), propertyName1, false);
+<a name="66" href="#66">66</a> }
+<a name="67" href="#67">67</a>
+<a name="68" href="#68">68</a> <em>/**<em>*</em></em>
+<a name="69" href="#69">69</a> <em> * Test if sort order <i>descending</i> is respected.</em>
+<a name="70" href="#70">70</a> <em> * <p/></em>
+<a name="71" href="#71">71</a> <em> * For configuration description see {@link SQLOrderByTest}.</em>
+<a name="72" href="#72">72</a> <em> */</em>
+<a name="73" href="#73">73</a> <strong>public</strong> <strong>void</strong> testOrderByDescending() throws Exception {
+<a name="74" href="#74">74</a> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> stmt = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(baseStatement + <span class="string">" DESC"</span>, Query.SQL);
+<a name="75" href="#75">75</a> evaluateResultOrder(execute(stmt), propertyName1, <strong>true</strong>);
+<a name="76" href="#76">76</a> }
+<a name="77" href="#77">77</a>
+<a name="78" href="#78">78</a> <em>/**<em>*</em></em>
+<a name="79" href="#79">79</a> <em> * Test if default sort order is respected and is <i>ascending</i> if the</em>
+<a name="80" href="#80">80</a> <em> * order by modifier is missing.</em>
+<a name="81" href="#81">81</a> <em> * <p/></em>
+<a name="82" href="#82">82</a> <em> * For configuration description see {@link SQLOrderByTest}.</em>
+<a name="83" href="#83">83</a> <em> */</em>
+<a name="84" href="#84">84</a> <strong>public</strong> <strong>void</strong> testOrderByDefault() throws Exception {
+<a name="85" href="#85">85</a> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> stmt = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(baseStatement, Query.SQL);
+<a name="86" href="#86">86</a> evaluateResultOrder(execute(stmt), propertyName1, false);
+<a name="87" href="#87">87</a> }
+<a name="88" href="#88">88</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLOrderByTest.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.html?view=auto&rev=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.html Mon Feb 14 14:00:49 2005
@@ -0,0 +1,193 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>SQLQueryLevel2Test xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="comment">/*</em>
+<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a> <em class="comment"> * as applicable.</em>
+<a name="4" href="#4">4</a> <em class="comment"> *</em>
+<a name="5" href="#5">5</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a> <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a> <em class="comment"> *</em>
+<a name="9" href="#9">9</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a> <em class="comment"> *</em>
+<a name="11" href="#11">11</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a> <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a> <em class="comment"> */</em>
+<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/package-summary.html">org.apache.jackrabbit.test.api.query</a>;
+<a name="18" href="#18">18</a>
+<a name="19" href="#19">19</a> <strong>import</strong> org.apache.jackrabbit.test.NotExecutableException;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong>import</strong> javax.jcr.query.Query;
+<a name="22" href="#22">22</a> <strong>import</strong> javax.jcr.query.QueryResult;
+<a name="23" href="#23">23</a> <strong>import</strong> javax.jcr.query.RowIterator;
+<a name="24" href="#24">24</a> <strong>import</strong> javax.jcr.query.Row;
+<a name="25" href="#25">25</a> <strong>import</strong> javax.jcr.Repository;
+<a name="26" href="#26">26</a> <strong>import</strong> javax.jcr.Value;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em>/**<em>*</em></em>
+<a name="29" href="#29">29</a> <em> * Tests SQL queries on content written to the workspace by the test itself.</em>
+<a name="30" href="#30">30</a> <em> *</em>
+<a name="31" href="#31">31</a> <em> * @test</em>
+<a name="32" href="#32">32</a> <em> * @sources SQLQueryLevel2Test.java</em>
+<a name="33" href="#33">33</a> <em> * @executeClass org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test</em>
+<a name="34" href="#34">34</a> <em> * @keywords level2 sql</em>
+<a name="35" href="#35">35</a> <em> */</em>
+<a name="36" href="#36">36</a> <strong>public</strong> <strong>class</strong> SQLQueryLevel2Test <strong>extends</strong> AbstractQueryLevel2Test {
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a> <em>/**<em>*</em></em>
+<a name="39" href="#39">39</a> <em> * Test if the optional jcr:score property for full-text search is</em>
+<a name="40" href="#40">40</a> <em> * supported.</em>
+<a name="41" href="#41">41</a> <em> * <p/></em>
+<a name="42" href="#42">42</a> <em> * For configuration description see {@link #setUpFullTextTest()}.</em>
+<a name="43" href="#43">43</a> <em> */</em>
+<a name="44" href="#44">44</a> <strong>public</strong> <strong>void</strong> testScoreColumn() throws Exception {
+<a name="45" href="#45">45</a> <strong>if</strong> (!hasDescriptor(Repository.QUERY_JCRSCORE)) {
+<a name="46" href="#46">46</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>(<span class="string">"Repository does not support jcr:score"</span>);
+<a name="47" href="#47">47</a> }
+<a name="48" href="#48">48</a> setUpFullTextTest();
+<a name="49" href="#49">49</a> QueryResult result = execute(getFullTextStatement());
+<a name="50" href="#50">50</a> RowIterator rows = result.getRows();
+<a name="51" href="#51">51</a> <em class="comment">// test mere existence</em>
+<a name="52" href="#52">52</a> rows.nextRow().getValue(jcrScore);
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> <em>/**<em>*</em></em>
+<a name="56" href="#56">56</a> <em> * Test full-text search of the repository.</em>
+<a name="57" href="#57">57</a> <em> * <p/></em>
+<a name="58" href="#58">58</a> <em> * For configuration description see {@link #setUpFullTextTest()}.</em>
+<a name="59" href="#59">59</a> <em> */</em>
+<a name="60" href="#60">60</a> <strong>public</strong> <strong>void</strong> testFullTextSearch() throws Exception {
+<a name="61" href="#61">61</a> setUpFullTextTest();
+<a name="62" href="#62">62</a> QueryResult result = execute(getFullTextStatement());
+<a name="63" href="#63">63</a>
+<a name="64" href="#64">64</a> <em class="comment">// must be 1</em>
+<a name="65" href="#65">65</a> checkResult(result, 1);
+<a name="66" href="#66">66</a>
+<a name="67" href="#67">67</a> <em class="comment">// evaluate result</em>
+<a name="68" href="#68">68</a> RowIterator itr = result.getRows();
+<a name="69" href="#69">69</a> <strong>while</strong> (itr.hasNext()) {
+<a name="70" href="#70">70</a> Row row = itr.nextRow();
+<a name="71" href="#71">71</a> Value value = row.getValue(propertyName1);
+<a name="72" href="#72">72</a> <strong>if</strong> (value != <strong>null</strong>) {
+<a name="73" href="#73">73</a> String fullText = value.getString();
+<a name="74" href="#74">74</a> <strong>if</strong> (fullText.indexOf(<span class="string">"cat"</span>) > 0) {
+<a name="75" href="#75">75</a> fail(<span class="string">"Search Text: full text search not correct, returned prohibited text"</span>);
+<a name="76" href="#76">76</a> }
+<a name="77" href="#77">77</a> }
+<a name="78" href="#78">78</a> }
+<a name="79" href="#79">79</a> }
+<a name="80" href="#80">80</a>
+<a name="81" href="#81">81</a> <em>/**<em>*</em></em>
+<a name="82" href="#82">82</a> <em> * Test range evaluation of a Query.</em>
+<a name="83" href="#83">83</a> <em> * <p/></em>
+<a name="84" href="#84">84</a> <em> * For configuration description see {@link #setUpRangeTest()}.</em>
+<a name="85" href="#85">85</a> <em> */</em>
+<a name="86" href="#86">86</a> <strong>public</strong> <strong>void</strong> testRange() throws Exception {
+<a name="87" href="#87">87</a> setUpRangeTest();
+<a name="88" href="#88">88</a> QueryResult result = execute(getRangeStatement());
+<a name="89" href="#89">89</a>
+<a name="90" href="#90">90</a> <em class="comment">// should be 1</em>
+<a name="91" href="#91">91</a> checkResult(result, 1);
+<a name="92" href="#92">92</a>
+<a name="93" href="#93">93</a> <em class="comment">// evaluate result</em>
+<a name="94" href="#94">94</a> checkValue(result.getRows(), propertyName1, <span class="string">"b"</span>);
+<a name="95" href="#95">95</a> }
+<a name="96" href="#96">96</a>
+<a name="97" href="#97">97</a> <em>/**<em>*</em></em>
+<a name="98" href="#98">98</a> <em> * Test multi-value support of search.</em>
+<a name="99" href="#99">99</a> <em> * <p/></em>
+<a name="100" href="#100">100</a> <em> * For configuration description see {@link #setUpMultiValueTest()}.</em>
+<a name="101" href="#101">101</a> <em> */</em>
+<a name="102" href="#102">102</a> <strong>public</strong> <strong>void</strong> testMultiValueSearch() throws Exception {
+<a name="103" href="#103">103</a> setUpMultiValueTest();
+<a name="104" href="#104">104</a> QueryResult result = execute(getMultiValueStatement());
+<a name="105" href="#105">105</a>
+<a name="106" href="#106">106</a> <em class="comment">//should be 1</em>
+<a name="107" href="#107">107</a> checkResult(result, 1);
+<a name="108" href="#108">108</a>
+<a name="109" href="#109">109</a> <em class="comment">//evaluate result</em>
+<a name="110" href="#110">110</a> checkValue(result.getRows(), propertyName1, <span class="string">"existence"</span>);
+<a name="111" href="#111">111</a> }
+<a name="112" href="#112">112</a>
+<a name="113" href="#113">113</a> <em>/**<em>*</em></em>
+<a name="114" href="#114">114</a> <em> * Test if the optional jcr:path pseudo property is contained in the query</em>
+<a name="115" href="#115">115</a> <em> * result.</em>
+<a name="116" href="#116">116</a> <em> * <p/></em>
+<a name="117" href="#117">117</a> <em> * For configuration description see {@link #setUpFullTextTest()}.</em>
+<a name="118" href="#118">118</a> <em> */</em>
+<a name="119" href="#119">119</a> <strong>public</strong> <strong>void</strong> testPathColumn() throws Exception {
+<a name="120" href="#120">120</a> <strong>if</strong> (!hasDescriptor(Repository.QUERY_JCRPATH)) {
+<a name="121" href="#121">121</a> <strong>throw</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/NotExecutableException.html">NotExecutableException</a>(<span class="string">"Repository does not support jcr:path"</span>);
+<a name="122" href="#122">122</a> }
+<a name="123" href="#123">123</a> setUpFullTextTest();
+<a name="124" href="#124">124</a> QueryResult result = execute(getFullTextStatement());
+<a name="125" href="#125">125</a> RowIterator rows = result.getRows();
+<a name="126" href="#126">126</a> <strong>if</strong> (rows.getSize() < 1) {
+<a name="127" href="#127">127</a> fail(<span class="string">"Query result did not return any nodes"</span>);
+<a name="128" href="#128">128</a> }
+<a name="129" href="#129">129</a>
+<a name="130" href="#130">130</a> <em class="comment">// test mere existence</em>
+<a name="131" href="#131">131</a> rows.nextRow().getValue(jcrPath);
+<a name="132" href="#132">132</a> }
+<a name="133" href="#133">133</a>
+<a name="134" href="#134">134</a> <em class="comment">//------------------------< internal >--------------------------------------</em>
+<a name="135" href="#135">135</a>
+<a name="136" href="#136">136</a> <em>/**<em>*</em></em>
+<a name="137" href="#137">137</a> <em> * @return Statement selecting a node by a phrase, and proper escaped value</em>
+<a name="138" href="#138">138</a> <em> * and excluding with a word</em>
+<a name="139" href="#139">139</a> <em> */</em>
+<a name="140" href="#140">140</a> <strong>private</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> getFullTextStatement() {
+<a name="141" href="#141">141</a> StringBuffer tmp = <strong>new</strong> StringBuffer(<span class="string">"SELECT "</span>);
+<a name="142" href="#142">142</a> tmp.append(jcrPath).append(<span class="string">", "</span>);
+<a name="143" href="#143">143</a> tmp.append(jcrScore).append(<span class="string">", "</span>);
+<a name="144" href="#144">144</a> tmp.append(propertyName1);
+<a name="145" href="#145">145</a> tmp.append(<span class="string">" FROM "</span>).append(testNodeType);
+<a name="146" href="#146">146</a> tmp.append(<span class="string">" WHERE CONTAINS("</span>);
+<a name="147" href="#147">147</a> tmp.append(<span class="string">"'''quick brown'' AND -cat')"</span>);
+<a name="148" href="#148">148</a> <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(tmp.toString(), Query.SQL);
+<a name="149" href="#149">149</a> }
+<a name="150" href="#150">150</a>
+<a name="151" href="#151">151</a> <em>/**<em>*</em></em>
+<a name="152" href="#152">152</a> <em> * @return Statement selecting nodes by its value contained in a multi-value</em>
+<a name="153" href="#153">153</a> <em> * property</em>
+<a name="154" href="#154">154</a> <em> */</em>
+<a name="155" href="#155">155</a> <strong>private</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> getMultiValueStatement() {
+<a name="156" href="#156">156</a> StringBuffer tmp = <strong>new</strong> StringBuffer(<span class="string">"SELECT "</span>);
+<a name="157" href="#157">157</a> tmp.append(propertyName1);
+<a name="158" href="#158">158</a> tmp.append(<span class="string">" FROM "</span>).append(testNodeType);
+<a name="159" href="#159">159</a> tmp.append(<span class="string">" WHERE 'two' IN "</span>);
+<a name="160" href="#160">160</a> tmp.append(propertyName2);
+<a name="161" href="#161">161</a> tmp.append(<span class="string">" AND 'existence' IN "</span>);
+<a name="162" href="#162">162</a> tmp.append(propertyName1);
+<a name="163" href="#163">163</a> <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(tmp.toString(), Query.SQL);
+<a name="164" href="#164">164</a> }
+<a name="165" href="#165">165</a>
+<a name="166" href="#166">166</a> <em>/**<em>*</em></em>
+<a name="167" href="#167">167</a> <em> * @return Statement selecting nodes by its range in {@link #propertyName1}</em>
+<a name="168" href="#168">168</a> <em> */</em>
+<a name="169" href="#169">169</a> <strong>private</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> getRangeStatement() {
+<a name="170" href="#170">170</a> StringBuffer tmp = <strong>new</strong> StringBuffer(<span class="string">"SELECT "</span>);
+<a name="171" href="#171">171</a> tmp.append(propertyName1);
+<a name="172" href="#172">172</a> tmp.append(<span class="string">" FROM "</span>).append(testNodeType);
+<a name="173" href="#173">173</a> tmp.append(<span class="string">" WHERE "</span>);
+<a name="174" href="#174">174</a> tmp.append(propertyName1);
+<a name="175" href="#175">175</a> tmp.append(<span class="string">" <= 'b' AND "</span>);
+<a name="176" href="#176">176</a> tmp.append(propertyName1);
+<a name="177" href="#177">177</a> tmp.append(<span class="string">" > 'a'"</span>);
+<a name="178" href="#178">178</a> <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(tmp.toString(), Query.SQL);
+<a name="179" href="#179">179</a> }
+<a name="180" href="#180">180</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/Statement.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/Statement.html?view=auto&rev=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/Statement.html (added)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/Statement.html Mon Feb 14 14:00:49 2005
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>Statement xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="comment">/*</em>
+<a name="2" href="#2">2</a> <em class="comment"> * Copyright 2004-2005 The Apache Software Foundation or its licensors,</em>
+<a name="3" href="#3">3</a> <em class="comment"> * as applicable.</em>
+<a name="4" href="#4">4</a> <em class="comment"> *</em>
+<a name="5" href="#5">5</a> <em class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</em>
+<a name="6" href="#6">6</a> <em class="comment"> * you may not use this file except in compliance with the License.</em>
+<a name="7" href="#7">7</a> <em class="comment"> * You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a> <em class="comment"> *</em>
+<a name="9" href="#9">9</a> <em class="comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a> <em class="comment"> *</em>
+<a name="11" href="#11">11</a> <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a> <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a> <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a> <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a> <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a> <em class="comment"> */</em>
+<a name="17" href="#17">17</a> <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/package-summary.html">org.apache.jackrabbit.test.api.query</a>;
+<a name="18" href="#18">18</a>
+<a name="19" href="#19">19</a> <em>/**<em>*</em></em>
+<a name="20" href="#20">20</a> <em> * Small Helper do define a Query-Statment as a String together with it's</em>
+<a name="21" href="#21">21</a> <em> * language.</em>
+<a name="22" href="#22">22</a> <em> */</em>
+<a name="23" href="#23">23</a> <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a> {
+<a name="24" href="#24">24</a>
+<a name="25" href="#25">25</a> <strong>private</strong> String statement;
+<a name="26" href="#26">26</a> <strong>private</strong> String language;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em>/**<em>*</em></em>
+<a name="29" href="#29">29</a> <em> * Constructs the Statment for the given language. No syntactical tests are</em>
+<a name="30" href="#30">30</a> <em> * performed, but both arguments must not be <code>null</code></em>
+<a name="31" href="#31">31</a> <em> *</em>
+<a name="32" href="#32">32</a> <em> * @param statement</em>
+<a name="33" href="#33">33</a> <em> * @param language</em>
+<a name="34" href="#34">34</a> <em> */</em>
+<a name="35" href="#35">35</a> <strong>public</strong> <a href="../../../../../../org/apache/jackrabbit/test/api/query/Statement.html">Statement</a>(String statement, String language) {
+<a name="36" href="#36">36</a> <strong>if</strong> (statement == <strong>null</strong> || language == <strong>null</strong>) {
+<a name="37" href="#37">37</a> <strong>throw</strong> <strong>new</strong> IllegalArgumentException(<span class="string">"Neither statement nor language argument must be null"</span>);
+<a name="38" href="#38">38</a> }
+<a name="39" href="#39">39</a> <strong>this</strong>.statement = statement;
+<a name="40" href="#40">40</a> <strong>this</strong>.language = language;
+<a name="41" href="#41">41</a> }
+<a name="42" href="#42">42</a>
+<a name="43" href="#43">43</a> <em>/**<em>*</em></em>
+<a name="44" href="#44">44</a> <em> * @return statment as string</em>
+<a name="45" href="#45">45</a> <em> */</em>
+<a name="46" href="#46">46</a> <strong>public</strong> String getStatement() {
+<a name="47" href="#47">47</a> <strong>return</strong> statement;
+<a name="48" href="#48">48</a> }
+<a name="49" href="#49">49</a>
+<a name="50" href="#50">50</a> <em>/**<em>*</em></em>
+<a name="51" href="#51">51</a> <em> * @return Query language</em>
+<a name="52" href="#52">52</a> <em> */</em>
+<a name="53" href="#53">53</a> <strong>public</strong> String getLanguage() {
+<a name="54" href="#54">54</a> <strong>return</strong> language;
+<a name="55" href="#55">55</a> }
+<a name="56" href="#56">56</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Propchange: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/Statement.html
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/TestAll.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/TestAll.html?view=diff&r1=153860&r2=153861
==============================================================================
--- incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/TestAll.html (original)
+++ incubator/jackrabbit/site/xref-test/org/apache/jackrabbit/test/api/query/TestAll.html Mon Feb 14 14:00:49 2005
@@ -47,10 +47,16 @@
<a name="38" href="#38">38</a>
<a name="39" href="#39">39</a> <em class="comment">// ADD TEST CLASSES HERE:</em>
<a name="40" href="#40">40</a> suite.addTestSuite(SaveTest.<strong>class</strong>);
-<a name="41" href="#41">41</a>
-<a name="42" href="#42">42</a> <strong>return</strong> suite;
-<a name="43" href="#43">43</a> }
-<a name="44" href="#44">44</a> }
+<a name="41" href="#41">41</a> suite.addTestSuite(SQLOrderByTest.<strong>class</strong>);
+<a name="42" href="#42">42</a> suite.addTestSuite(SQLQueryLevel2Test.<strong>class</strong>);
+<a name="43" href="#43">43</a> suite.addTestSuite(XPathPosIndexTest.<strong>class</strong>);
+<a name="44" href="#44">44</a> suite.addTestSuite(XPathDocOrderTest.<strong>class</strong>);
+<a name="45" href="#45">45</a> suite.addTestSuite(XPathOrderByTest.<strong>class</strong>);
+<a name="46" href="#46">46</a> suite.addTestSuite(XPathQueryLevel2Test.<strong>class</strong>);
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> <strong>return</strong> suite;
+<a name="49" href="#49">49</a> }
+<a name="50" href="#50">50</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>