jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject svn commit: r149514 [12/13] - in incubator/jackrabbit/site: ./ apidocs/ apidocs/org/apache/jackrabbit/core/ apidocs/org/apache/jackrabbit/core/class-use/ apidocs/org/apache/jackrabbit/core/search/ apidocs/org/apache/jackrabbit/core/search/class-use/ apidocs/org/apache/jackrabbit/core/state/class-use/ apidocs/org/apache/jackrabbit/core/state/mem/ apidocs/org/apache/jackrabbit/core/state/obj/ apidocs/org/apache/jackrabbit/core/state/xml/ apidocs/org/apache/jackrabbit/core/version/ apidocs/org/apache/jackrabbit/core/xml/ xref-test/ xref-test/org/apache/jackrabbit/test/ xref-test/org/apache/jackrabbit/test/search/ xref/ xref/org/apache/jackrabbit/core/ xref/org/apache/jackrabbit/core/nodetype/ xref/org/apache/jackrabbit/core/search/ xref/org/apache/jackrabbit/core/search/lucene/ xref/org/apache/jackrabbit/core/version/
Date Wed, 02 Feb 2005 14:05:11 GMT
Modified: incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html Wed Feb  2 06:04:46 2005
@@ -27,73 +27,134 @@
 <a name="18" href="#18">18</a>  
 <a name="19" href="#19">19</a>  <strong>import</strong> org.apache.jackrabbit.core.ItemManager;
 <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.jackrabbit.core.NodeId;
-<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.log4j.Logger;
-<a name="22" href="#22">22</a>  
-<a name="23" href="#23">23</a>  <strong>import</strong> javax.jcr.Node;
-<a name="24" href="#24">24</a>  <strong>import</strong> javax.jcr.NodeIterator;
-<a name="25" href="#25">25</a>  <strong>import</strong> javax.jcr.RepositoryException;
-<a name="26" href="#26">26</a>  <strong>import</strong> java.util.NoSuchElementException;
-<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> */</em>
-<a name="30" href="#30">30</a>  <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a> implements NodeIterator {
-<a name="31" href="#31">31</a>  
-<a name="32" href="#32">32</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> Logger log = Logger.getLogger(NodeIteratorImpl.<strong>class</strong>);
-<a name="33" href="#33">33</a>  
-<a name="34" href="#34">34</a>      <strong>private</strong> <strong>final</strong> String[] uuids;
-<a name="35" href="#35">35</a>  
-<a name="36" href="#36">36</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.jackrabbit.core.NodeImpl;
+<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.log4j.Logger;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  <strong>import</strong> javax.jcr.Node;
+<a name="25" href="#25">25</a>  <strong>import</strong> javax.jcr.NodeIterator;
+<a name="26" href="#26">26</a>  <strong>import</strong> javax.jcr.RepositoryException;
+<a name="27" href="#27">27</a>  <strong>import</strong> java.util.NoSuchElementException;
+<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 a {@link javax.jcr.NodeIterator} returned by</em>
+<a name="31" href="#31">31</a>  <em> * {@link javax.jcr.query.QueryResult#getNodes()}.</em>
+<a name="32" href="#32">32</a>  <em> */</em>
+<a name="33" href="#33">33</a>  <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a> implements NodeIterator {
+<a name="34" href="#34">34</a>  
+<a name="35" href="#35">35</a>      <em>/**<em>* Logger instance for this class */</em></em>
+<a name="36" href="#36">36</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> Logger log = Logger.getLogger(NodeIteratorImpl.<strong>class</strong>);
 <a name="37" href="#37">37</a>  
-<a name="38" href="#38">38</a>      <strong>private</strong> <strong>int</strong> pos = 0;
-<a name="39" href="#39">39</a>  
-<a name="40" href="#40">40</a>      <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
-<a name="41" href="#41">41</a>                       String[] uuids) {
-<a name="42" href="#42">42</a>          <strong>this</strong>.itemMgr = itemMgr;
-<a name="43" href="#43">43</a>          <strong>this</strong>.uuids = uuids;
-<a name="44" href="#44">44</a>      }
-<a name="45" href="#45">45</a>  
-<a name="46" href="#46">46</a>      <strong>public</strong> Node nextNode() {
-<a name="47" href="#47">47</a>          <strong>if</strong> (pos >= uuids.length) {
-<a name="48" href="#48">48</a>              <strong>throw</strong> <strong>new</strong> NoSuchElementException();
-<a name="49" href="#49">49</a>          }
-<a name="50" href="#50">50</a>          <strong>try</strong> {
-<a name="51" href="#51">51</a>              <strong>return</strong> (Node) itemMgr.getItem(<strong>new</strong> NodeId(uuids[pos++]));
-<a name="52" href="#52">52</a>          } <strong>catch</strong> (RepositoryException e) {
-<a name="53" href="#53">53</a>              log.error(<span class="string">"Exception retrieving Node with UUID: "</span>
-<a name="54" href="#54">54</a>                      + uuids[pos] + <span class="string">": "</span> + e.toString());
-<a name="55" href="#55">55</a>              <em class="comment">// FIXME this is bad error handling!</em>
-<a name="56" href="#56">56</a>              <strong>throw</strong> <strong>new</strong> NoSuchElementException();
-<a name="57" href="#57">57</a>          }
-<a name="58" href="#58">58</a>      }
-<a name="59" href="#59">59</a>  
-<a name="60" href="#60">60</a>      <strong>public</strong> Object next() {
-<a name="61" href="#61">61</a>          <strong>return</strong> nextNode();
-<a name="62" href="#62">62</a>      }
-<a name="63" href="#63">63</a>  
-<a name="64" href="#64">64</a>      <strong>public</strong> <strong>void</strong> skip(<strong>long</strong> skipNum) {
-<a name="65" href="#65">65</a>          <strong>if</strong> ((pos + skipNum) > uuids.length) {
-<a name="66" href="#66">66</a>              <strong>throw</strong> <strong>new</strong> NoSuchElementException();
-<a name="67" href="#67">67</a>          }
-<a name="68" href="#68">68</a>          pos += skipNum;
-<a name="69" href="#69">69</a>      }
-<a name="70" href="#70">70</a>  
-<a name="71" href="#71">71</a>      <strong>public</strong> <strong>long</strong> getSize() {
-<a name="72" href="#72">72</a>          <strong>return</strong> uuids.length;
-<a name="73" href="#73">73</a>      }
-<a name="74" href="#74">74</a>  
-<a name="75" href="#75">75</a>      <strong>public</strong> <strong>long</strong> getPos() {
-<a name="76" href="#76">76</a>          <strong>return</strong> pos;
+<a name="38" href="#38">38</a>      <em>/**<em>* The UUIDs of the nodes in the result set */</em></em>
+<a name="39" href="#39">39</a>      <strong>private</strong> <strong>final</strong> String[] uuids;
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>      <em>/**<em>* <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> to turn UUIDs into Node instances */</em></em>
+<a name="42" href="#42">42</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr;
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <em>/**<em>* Current position in the UUID array */</em></em>
+<a name="45" href="#45">45</a>      <strong>private</strong> <strong>int</strong> pos = 0;
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <em>/**<em>*</em></em>
+<a name="48" href="#48">48</a>  <em>     * Creates a new &lt;code>NodeIteratorImpl&lt;/code> instance.</em>
+<a name="49" href="#49">49</a>  <em>     * @param itemMgr the &lt;code>ItemManager&lt;/code> to turn UUIDs into</em>
+<a name="50" href="#50">50</a>  <em>     *   &lt;code>Node&lt;/code> instances.</em>
+<a name="51" href="#51">51</a>  <em>     * @param uuids the UUIDs of the result nodes.</em>
+<a name="52" href="#52">52</a>  <em>     */</em>
+<a name="53" href="#53">53</a>      <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
+<a name="54" href="#54">54</a>                       String[] uuids) {
+<a name="55" href="#55">55</a>          <strong>this</strong>.itemMgr = itemMgr;
+<a name="56" href="#56">56</a>          <strong>this</strong>.uuids = uuids;
+<a name="57" href="#57">57</a>      }
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>      <em>/**<em>*</em></em>
+<a name="60" href="#60">60</a>  <em>     * Returns the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="61" href="#61">61</a>  <em>     * @return the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="62" href="#62">62</a>  <em>     * @throws java.util.NoSuchElementException if iteration has no more</em>
+<a name="63" href="#63">63</a>  <em>     *   &lt;code>Node&lt;/code>s.</em>
+<a name="64" href="#64">64</a>  <em>     */</em>
+<a name="65" href="#65">65</a>      <strong>public</strong> Node nextNode() {
+<a name="66" href="#66">66</a>          <strong>return</strong> nextNodeImpl();
+<a name="67" href="#67">67</a>      }
+<a name="68" href="#68">68</a>  
+<a name="69" href="#69">69</a>      <em>/**<em>*</em></em>
+<a name="70" href="#70">70</a>  <em>     * Returns the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="71" href="#71">71</a>  <em>     * @return the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="72" href="#72">72</a>  <em>     * @throws java.util.NoSuchElementException if iteration has no more</em>
+<a name="73" href="#73">73</a>  <em>     *   &lt;code>Node&lt;/code>s.</em>
+<a name="74" href="#74">74</a>  <em>     */</em>
+<a name="75" href="#75">75</a>      <strong>public</strong> Object next() {
+<a name="76" href="#76">76</a>          <strong>return</strong> nextNode();
 <a name="77" href="#77">77</a>      }
 <a name="78" href="#78">78</a>  
-<a name="79" href="#79">79</a>      <strong>public</strong> <strong>boolean</strong> hasNext() {
-<a name="80" href="#80">80</a>          <strong>return</strong> pos &lt; uuids.length;
-<a name="81" href="#81">81</a>      }
-<a name="82" href="#82">82</a>  
-<a name="83" href="#83">83</a>      <strong>public</strong> <strong>void</strong> remove() {
-<a name="84" href="#84">84</a>          <strong>throw</strong> <strong>new</strong> UnsupportedOperationException(<span class="string">"remove"</span>);
-<a name="85" href="#85">85</a>      }
-<a name="86" href="#86">86</a>  
-<a name="87" href="#87">87</a>  }
+<a name="79" href="#79">79</a>      <em>/**<em>*</em></em>
+<a name="80" href="#80">80</a>  <em>     * Skip a number of &lt;code>Node&lt;/code>s in this iterator.</em>
+<a name="81" href="#81">81</a>  <em>     * @param skipNum the non-negative number of &lt;code>Node&lt;/code>s to skip</em>
+<a name="82" href="#82">82</a>  <em>     * @throws java.util.NoSuchElementException</em>
+<a name="83" href="#83">83</a>  <em>     *          if skipped past the last &lt;code>Node&lt;/code> in this iterator.</em>
+<a name="84" href="#84">84</a>  <em>     */</em>
+<a name="85" href="#85">85</a>      <strong>public</strong> <strong>void</strong> skip(<strong>long</strong> skipNum) {
+<a name="86" href="#86">86</a>          <strong>if</strong> (skipNum &lt; 0) {
+<a name="87" href="#87">87</a>              <strong>throw</strong> <strong>new</strong> IllegalArgumentException(<span class="string">"skipNum must not be negative"</span>);
+<a name="88" href="#88">88</a>          }
+<a name="89" href="#89">89</a>          <strong>if</strong> ((pos + skipNum) > uuids.length) {
+<a name="90" href="#90">90</a>              <strong>throw</strong> <strong>new</strong> NoSuchElementException();
+<a name="91" href="#91">91</a>          }
+<a name="92" href="#92">92</a>          pos += skipNum;
+<a name="93" href="#93">93</a>      }
+<a name="94" href="#94">94</a>  
+<a name="95" href="#95">95</a>      <em>/**<em>*</em></em>
+<a name="96" href="#96">96</a>  <em>     * Returns the number of &lt;code>Node&lt;/code>s in this</em>
+<a name="97" href="#97">97</a>  <em>     * &lt;code>NodeIterator&lt;/code>.</em>
+<a name="98" href="#98">98</a>  <em>     * @return the number of &lt;code>Node&lt;/code>s in this</em>
+<a name="99" href="#99">99</a>  <em>     *   &lt;code>NodeIterator&lt;/code>.</em>
+<a name="100" href="#100">100</a> <em>     */</em>
+<a name="101" href="#101">101</a>     <strong>public</strong> <strong>long</strong> getSize() {
+<a name="102" href="#102">102</a>         <strong>return</strong> uuids.length;
+<a name="103" href="#103">103</a>     }
+<a name="104" href="#104">104</a> 
+<a name="105" href="#105">105</a>     <em>/**<em>*</em></em>
+<a name="106" href="#106">106</a> <em>     * Returns the current position in this &lt;code>NodeIterator&lt;/code>.</em>
+<a name="107" href="#107">107</a> <em>     * @return the current position in this &lt;code>NodeIterator&lt;/code>.</em>
+<a name="108" href="#108">108</a> <em>     */</em>
+<a name="109" href="#109">109</a>     <strong>public</strong> <strong>long</strong> getPos() {
+<a name="110" href="#110">110</a>         <strong>return</strong> pos;
+<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>     * Returns &lt;code>true&lt;/code> if there is another &lt;code>Node&lt;/code></em>
+<a name="115" href="#115">115</a> <em>     * available; &lt;code>false&lt;/code> otherwise.</em>
+<a name="116" href="#116">116</a> <em>     * @return &lt;code>true&lt;/code> if there is another &lt;code>Node&lt;/code></em>
+<a name="117" href="#117">117</a> <em>     *  available; &lt;code>false&lt;/code> otherwise.</em>
+<a name="118" href="#118">118</a> <em>     */</em>
+<a name="119" href="#119">119</a>     <strong>public</strong> <strong>boolean</strong> hasNext() {
+<a name="120" href="#120">120</a>         <strong>return</strong> pos &lt; uuids.length;
+<a name="121" href="#121">121</a>     }
+<a name="122" href="#122">122</a> 
+<a name="123" href="#123">123</a>     <em>/**<em>*</em></em>
+<a name="124" href="#124">124</a> <em>     * @throws UnsupportedOperationException always.</em>
+<a name="125" href="#125">125</a> <em>     */</em>
+<a name="126" href="#126">126</a>     <strong>public</strong> <strong>void</strong> remove() {
+<a name="127" href="#127">127</a>         <strong>throw</strong> <strong>new</strong> UnsupportedOperationException(<span class="string">"remove"</span>);
+<a name="128" href="#128">128</a>     }
+<a name="129" href="#129">129</a> 
+<a name="130" href="#130">130</a>     <em>/**<em>*</em></em>
+<a name="131" href="#131">131</a> <em>     * Returns the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="132" href="#132">132</a> <em>     * @return the next &lt;code>Node&lt;/code> in the result set.</em>
+<a name="133" href="#133">133</a> <em>     * @throws java.util.NoSuchElementException if iteration has no more</em>
+<a name="134" href="#134">134</a> <em>     *   &lt;code>Node&lt;/code>s.</em>
+<a name="135" href="#135">135</a> <em>     */</em>
+<a name="136" href="#136">136</a>     <a href="../../../../../../org/apache/jackrabbit/core/NodeImpl.html">NodeImpl</a> nextNodeImpl() {
+<a name="137" href="#137">137</a>         <strong>if</strong> (pos >= uuids.length) {
+<a name="138" href="#138">138</a>             <strong>throw</strong> <strong>new</strong> NoSuchElementException();
+<a name="139" href="#139">139</a>         }
+<a name="140" href="#140">140</a>         <strong>try</strong> {
+<a name="141" href="#141">141</a>             <strong>return</strong> (NodeImpl) itemMgr.getItem(<strong>new</strong> NodeId(uuids[pos++]));
+<a name="142" href="#142">142</a>         } <strong>catch</strong> (RepositoryException e) {
+<a name="143" href="#143">143</a>             log.error(<span class="string">"Exception retrieving Node with UUID: "</span>
+<a name="144" href="#144">144</a>                     + uuids[pos] + <span class="string">": "</span> + e.toString());
+<a name="145" href="#145">145</a>             <strong>throw</strong> <strong>new</strong> NoSuchElementException();
+<a name="146" href="#146">146</a>         }
+<a name="147" href="#147">147</a>     }
+<a name="148" href="#148">148</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/org/apache/jackrabbit/core/search/lucene/QueryImpl.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryImpl.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryImpl.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryImpl.html Wed Feb  2 06:04:46 2005
@@ -26,228 +26,261 @@
 <a name="17" href="#17">17</a>  <strong>package</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/package-summary.html">org.apache.jackrabbit.core.search.lucene</a>;
 <a name="18" href="#18">18</a>  
 <a name="19" href="#19">19</a>  <strong>import</strong> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
-<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.jackrabbit.core.search.QueryParser;
-<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.jackrabbit.core.search.QueryRootNode;
-<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.jackrabbit.core.search.OrderQueryNode;
-<a name="23" href="#23">23</a>  <strong>import</strong> org.apache.jackrabbit.core.QName;
-<a name="24" href="#24">24</a>  <strong>import</strong> org.apache.jackrabbit.core.NamespaceRegistryImpl;
-<a name="25" href="#25">25</a>  <strong>import</strong> org.apache.jackrabbit.core.SessionImpl;
-<a name="26" href="#26">26</a>  <strong>import</strong> org.apache.jackrabbit.core.ItemManager;
-<a name="27" href="#27">27</a>  <strong>import</strong> org.apache.jackrabbit.core.Path;
-<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.jackrabbit.core.MalformedPathException;
-<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.jackrabbit.core.NoPrefixDeclaredException;
-<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.jackrabbit.core.AccessManagerImpl;
-<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.jackrabbit.core.NodeId;
-<a name="32" href="#32">32</a>  <strong>import</strong> org.apache.jackrabbit.core.AccessManager;
-<a name="33" href="#33">33</a>  <strong>import</strong> org.apache.jackrabbit.core.NamespaceResolver;
-<a name="34" href="#34">34</a>  <strong>import</strong> org.apache.lucene.search.Hits;
-<a name="35" href="#35">35</a>  <strong>import</strong> org.apache.lucene.search.Query;
-<a name="36" href="#36">36</a>  
-<a name="37" href="#37">37</a>  <strong>import</strong> javax.jcr.nodetype.ConstraintViolationException;
-<a name="38" href="#38">38</a>  <strong>import</strong> javax.jcr.nodetype.NodeType;
-<a name="39" href="#39">39</a>  <strong>import</strong> javax.jcr.nodetype.NodeTypeManager;
-<a name="40" href="#40">40</a>  <strong>import</strong> javax.jcr.query.InvalidQueryException;
-<a name="41" href="#41">41</a>  <strong>import</strong> javax.jcr.query.QueryResult;
-<a name="42" href="#42">42</a>  <strong>import</strong> javax.jcr.*;
-<a name="43" href="#43">43</a>  <strong>import</strong> javax.jcr.lock.LockException;
-<a name="44" href="#44">44</a>  <strong>import</strong> javax.jcr.version.VersionException;
-<a name="45" href="#45">45</a>  <strong>import</strong> java.util.List;
-<a name="46" href="#46">46</a>  <strong>import</strong> java.util.ArrayList;
-<a name="47" href="#47">47</a>  <strong>import</strong> java.util.Collections;
-<a name="48" href="#48">48</a>  <strong>import</strong> java.io.IOException;
-<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> */</em>
-<a name="52" href="#52">52</a>  <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a> implements javax.jcr.query.Query {
-<a name="53" href="#53">53</a>  
-<a name="54" href="#54">54</a>      <em>/**<em>*</em></em>
-<a name="55" href="#55">55</a>  <em>     * jcr:statement</em>
-<a name="56" href="#56">56</a>  <em>     */</em>
-<a name="57" href="#57">57</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a> PROP_STATEMENT =
-<a name="58" href="#58">58</a>              <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>(NamespaceRegistryImpl.NS_JCR_URI, <span class="string">"statement"</span>);
-<a name="59" href="#59">59</a>  
-<a name="60" href="#60">60</a>      <em>/**<em>*</em></em>
-<a name="61" href="#61">61</a>  <em>     * jcr:language</em>
-<a name="62" href="#62">62</a>  <em>     */</em>
-<a name="63" href="#63">63</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a> PROP_LANGUAGE =
-<a name="64" href="#64">64</a>              <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>(NamespaceRegistryImpl.NS_JCR_URI, <span class="string">"language"</span>);
-<a name="65" href="#65">65</a>  
-<a name="66" href="#66">66</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/QueryRootNode.html">QueryRootNode</a> root;
-<a name="67" href="#67">67</a>  
-<a name="68" href="#68">68</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session;
-<a name="69" href="#69">69</a>  
-<a name="70" href="#70">70</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr;
-<a name="71" href="#71">71</a>  
-<a name="72" href="#72">72</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index;
-<a name="73" href="#73">73</a>  
-<a name="74" href="#74">74</a>      <strong>private</strong> <strong>final</strong> String statement;
-<a name="75" href="#75">75</a>  
-<a name="76" href="#76">76</a>      <strong>private</strong> <strong>final</strong> String language;
-<a name="77" href="#77">77</a>  
-<a name="78" href="#78">78</a>      <strong>private</strong> <a href="../../../../../../org/apache/jackrabbit/core/Path.html">Path</a> path;
-<a name="79" href="#79">79</a>  
-<a name="80" href="#80">80</a>      <strong>public</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session,
-<a name="81" href="#81">81</a>                       <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
-<a name="82" href="#82">82</a>                       <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index,
-<a name="83" href="#83">83</a>                       String statement,
-<a name="84" href="#84">84</a>                       String language) throws InvalidQueryException {
-<a name="85" href="#85">85</a>          <strong>this</strong>.session = session;
-<a name="86" href="#86">86</a>          <strong>this</strong>.itemMgr = itemMgr;
-<a name="87" href="#87">87</a>          <strong>this</strong>.index = index;
-<a name="88" href="#88">88</a>          <strong>this</strong>.statement = statement;
-<a name="89" href="#89">89</a>          <strong>this</strong>.language = language;
-<a name="90" href="#90">90</a>  
-<a name="91" href="#91">91</a>          <em class="comment">// parse query according to language</em>
-<a name="92" href="#92">92</a>          <em class="comment">// build query tree</em>
-<a name="93" href="#93">93</a>          <strong>this</strong>.root = QueryParser.parse(statement, language, session.getNamespaceResolver());
-<a name="94" href="#94">94</a>      }
-<a name="95" href="#95">95</a>  
-<a name="96" href="#96">96</a>      <strong>public</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session,
-<a name="97" href="#97">97</a>                       <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
-<a name="98" href="#98">98</a>                       <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index,
-<a name="99" href="#99">99</a>                       String absPath)
-<a name="100" href="#100">100</a>             throws ItemNotFoundException, InvalidQueryException, RepositoryException {
-<a name="101" href="#101">101</a> 
-<a name="102" href="#102">102</a>         <strong>this</strong>.session = session;
-<a name="103" href="#103">103</a>         <strong>this</strong>.itemMgr = itemMgr;
-<a name="104" href="#104">104</a>         <strong>this</strong>.index = index;
-<a name="105" href="#105">105</a> 
-<a name="106" href="#106">106</a>         <strong>try</strong> {
-<a name="107" href="#107">107</a>             Node query = <strong>null</strong>;
-<a name="108" href="#108">108</a>             <strong>if</strong> (session.getRootNode().hasNode(absPath)) {
-<a name="109" href="#109">109</a>                 query = session.getRootNode().getNode(absPath);
-<a name="110" href="#110">110</a>                 <em class="comment">// assert query has mix:referenceable</em>
-<a name="111" href="#111">111</a>                 query.getUUID();
-<a name="112" href="#112">112</a>                 NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
-<a name="113" href="#113">113</a>                 NodeType ntQuery = ntMgr.getNodeType(NodeTypeRegistry.NT_QUERY.toJCRName(session.getNamespaceResolver()));
-<a name="114" href="#114">114</a>                 <strong>if</strong> (!query.getPrimaryNodeType().equals(ntQuery)) {
-<a name="115" href="#115">115</a>                     <strong>throw</strong> <strong>new</strong> InvalidQueryException(<span class="string">"node is not of type nt:query"</span>);
-<a name="116" href="#116">116</a>                 }
-<a name="117" href="#117">117</a>             } <strong>else</strong> {
-<a name="118" href="#118">118</a>                 <strong>throw</strong> <strong>new</strong> ItemNotFoundException(absPath);
-<a name="119" href="#119">119</a>             }
-<a name="120" href="#120">120</a> 
-<a name="121" href="#121">121</a>             path = Path.create(absPath, session.getNamespaceResolver(), <strong>true</strong>);
-<a name="122" href="#122">122</a> 
-<a name="123" href="#123">123</a>             statement = query.getProperty(PROP_STATEMENT.toJCRName(session.getNamespaceResolver())).getString();
-<a name="124" href="#124">124</a>             language = query.getProperty(PROP_LANGUAGE.toJCRName(session.getNamespaceResolver())).getString();
-<a name="125" href="#125">125</a> 
-<a name="126" href="#126">126</a>             <em class="comment">// parse query according to language</em>
-<a name="127" href="#127">127</a>             <em class="comment">// build query tree and pass to QueryImpl</em>
-<a name="128" href="#128">128</a>             <a href="../../../../../../org/apache/jackrabbit/core/search/QueryRootNode.html">QueryRootNode</a> root = QueryParser.parse(statement, language, session.getNamespaceResolver());
-<a name="129" href="#129">129</a>             <strong>this</strong>.root = root;
-<a name="130" href="#130">130</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
-<a name="131" href="#131">131</a>             <strong>throw</strong> <strong>new</strong> InvalidQueryException(e.getMessage(), e);
-<a name="132" href="#132">132</a>         } <strong>catch</strong> (MalformedPathException e) {
-<a name="133" href="#133">133</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(absPath, e);
-<a name="134" href="#134">134</a>         }
-<a name="135" href="#135">135</a>     }
-<a name="136" href="#136">136</a> 
-<a name="137" href="#137">137</a>     <strong>public</strong> QueryResult execute() throws RepositoryException {
-<a name="138" href="#138">138</a>         <em class="comment">// build lucene query</em>
-<a name="139" href="#139">139</a>         Query query = LuceneQueryBuilder.createQuery(root,
-<a name="140" href="#140">140</a>                 session, index.getNamespaceMappings(), index.getAnalyzer());
-<a name="141" href="#141">141</a> 
-<a name="142" href="#142">142</a>         <a href="../../../../../../org/apache/jackrabbit/core/search/OrderQueryNode.html">OrderQueryNode</a> orderNode = root.getOrderNode();
+<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.jackrabbit.core.nodetype.PropertyDefImpl;
+<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.jackrabbit.core.search.QueryParser;
+<a name="23" href="#23">23</a>  <strong>import</strong> org.apache.jackrabbit.core.search.QueryRootNode;
+<a name="24" href="#24">24</a>  <strong>import</strong> org.apache.jackrabbit.core.search.OrderQueryNode;
+<a name="25" href="#25">25</a>  <strong>import</strong> org.apache.jackrabbit.core.search.LocationStepQueryNode;
+<a name="26" href="#26">26</a>  <strong>import</strong> org.apache.jackrabbit.core.search.QueryNode;
+<a name="27" href="#27">27</a>  <strong>import</strong> org.apache.jackrabbit.core.search.NodeTypeQueryNode;
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.jackrabbit.core.search.DefaultQueryNodeVisitor;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.jackrabbit.core.QName;
+<a name="30" href="#30">30</a>  <strong>import</strong> org.apache.jackrabbit.core.NamespaceRegistryImpl;
+<a name="31" href="#31">31</a>  <strong>import</strong> org.apache.jackrabbit.core.SessionImpl;
+<a name="32" href="#32">32</a>  <strong>import</strong> org.apache.jackrabbit.core.ItemManager;
+<a name="33" href="#33">33</a>  <strong>import</strong> org.apache.jackrabbit.core.Path;
+<a name="34" href="#34">34</a>  <strong>import</strong> org.apache.jackrabbit.core.MalformedPathException;
+<a name="35" href="#35">35</a>  <strong>import</strong> org.apache.jackrabbit.core.NoPrefixDeclaredException;
+<a name="36" href="#36">36</a>  <strong>import</strong> org.apache.jackrabbit.core.AccessManagerImpl;
+<a name="37" href="#37">37</a>  <strong>import</strong> org.apache.jackrabbit.core.NodeId;
+<a name="38" href="#38">38</a>  <strong>import</strong> org.apache.jackrabbit.core.AccessManager;
+<a name="39" href="#39">39</a>  <strong>import</strong> org.apache.jackrabbit.core.NamespaceResolver;
+<a name="40" href="#40">40</a>  <strong>import</strong> org.apache.lucene.search.Hits;
+<a name="41" href="#41">41</a>  <strong>import</strong> org.apache.lucene.search.Query;
+<a name="42" href="#42">42</a>  
+<a name="43" href="#43">43</a>  <strong>import</strong> javax.jcr.nodetype.ConstraintViolationException;
+<a name="44" href="#44">44</a>  <strong>import</strong> javax.jcr.nodetype.NodeType;
+<a name="45" href="#45">45</a>  <strong>import</strong> javax.jcr.nodetype.NodeTypeManager;
+<a name="46" href="#46">46</a>  <strong>import</strong> javax.jcr.nodetype.PropertyDef;
+<a name="47" href="#47">47</a>  <strong>import</strong> javax.jcr.query.InvalidQueryException;
+<a name="48" href="#48">48</a>  <strong>import</strong> javax.jcr.query.QueryResult;
+<a name="49" href="#49">49</a>  <strong>import</strong> javax.jcr.*;
+<a name="50" href="#50">50</a>  <strong>import</strong> javax.jcr.lock.LockException;
+<a name="51" href="#51">51</a>  <strong>import</strong> javax.jcr.version.VersionException;
+<a name="52" href="#52">52</a>  <strong>import</strong> java.util.List;
+<a name="53" href="#53">53</a>  <strong>import</strong> java.util.ArrayList;
+<a name="54" href="#54">54</a>  <strong>import</strong> java.util.Collections;
+<a name="55" href="#55">55</a>  <strong>import</strong> java.io.IOException;
+<a name="56" href="#56">56</a>  
+<a name="57" href="#57">57</a>  <em>/**<em>*</em></em>
+<a name="58" href="#58">58</a>  <em> */</em>
+<a name="59" href="#59">59</a>  <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a> implements javax.jcr.query.Query {
+<a name="60" href="#60">60</a>  
+<a name="61" href="#61">61</a>      <em>/**<em>*</em></em>
+<a name="62" href="#62">62</a>  <em>     * jcr:statement</em>
+<a name="63" href="#63">63</a>  <em>     */</em>
+<a name="64" href="#64">64</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a> PROP_STATEMENT =
+<a name="65" href="#65">65</a>              <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>(NamespaceRegistryImpl.NS_JCR_URI, <span class="string">"statement"</span>);
+<a name="66" href="#66">66</a>  
+<a name="67" href="#67">67</a>      <em>/**<em>*</em></em>
+<a name="68" href="#68">68</a>  <em>     * jcr:language</em>
+<a name="69" href="#69">69</a>  <em>     */</em>
+<a name="70" href="#70">70</a>      <strong>private</strong> <strong>static</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a> PROP_LANGUAGE =
+<a name="71" href="#71">71</a>              <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>(NamespaceRegistryImpl.NS_JCR_URI, <span class="string">"language"</span>);
+<a name="72" href="#72">72</a>  
+<a name="73" href="#73">73</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/QueryRootNode.html">QueryRootNode</a> root;
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session;
+<a name="76" href="#76">76</a>  
+<a name="77" href="#77">77</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr;
+<a name="78" href="#78">78</a>  
+<a name="79" href="#79">79</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index;
+<a name="80" href="#80">80</a>  
+<a name="81" href="#81">81</a>      <strong>private</strong> <strong>final</strong> String statement;
+<a name="82" href="#82">82</a>  
+<a name="83" href="#83">83</a>      <strong>private</strong> <strong>final</strong> String language;
+<a name="84" href="#84">84</a>  
+<a name="85" href="#85">85</a>      <strong>private</strong> <a href="../../../../../../org/apache/jackrabbit/core/Path.html">Path</a> path;
+<a name="86" href="#86">86</a>  
+<a name="87" href="#87">87</a>      <strong>public</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session,
+<a name="88" href="#88">88</a>                       <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
+<a name="89" href="#89">89</a>                       <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index,
+<a name="90" href="#90">90</a>                       String statement,
+<a name="91" href="#91">91</a>                       String language) throws InvalidQueryException {
+<a name="92" href="#92">92</a>          <strong>this</strong>.session = session;
+<a name="93" href="#93">93</a>          <strong>this</strong>.itemMgr = itemMgr;
+<a name="94" href="#94">94</a>          <strong>this</strong>.index = index;
+<a name="95" href="#95">95</a>          <strong>this</strong>.statement = statement;
+<a name="96" href="#96">96</a>          <strong>this</strong>.language = language;
+<a name="97" href="#97">97</a>  
+<a name="98" href="#98">98</a>          <em class="comment">// parse query according to language</em>
+<a name="99" href="#99">99</a>          <em class="comment">// build query tree</em>
+<a name="100" href="#100">100</a>         <strong>this</strong>.root = QueryParser.parse(statement, language, session.getNamespaceResolver());
+<a name="101" href="#101">101</a>     }
+<a name="102" href="#102">102</a> 
+<a name="103" href="#103">103</a>     <strong>public</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryImpl.html">QueryImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/SessionImpl.html">SessionImpl</a> session,
+<a name="104" href="#104">104</a>                      <a href="../../../../../../org/apache/jackrabbit/core/ItemManager.html">ItemManager</a> itemMgr,
+<a name="105" href="#105">105</a>                      <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/SearchIndex.html">SearchIndex</a> index,
+<a name="106" href="#106">106</a>                      String absPath)
+<a name="107" href="#107">107</a>             throws ItemNotFoundException, InvalidQueryException, RepositoryException {
+<a name="108" href="#108">108</a> 
+<a name="109" href="#109">109</a>         <strong>this</strong>.session = session;
+<a name="110" href="#110">110</a>         <strong>this</strong>.itemMgr = itemMgr;
+<a name="111" href="#111">111</a>         <strong>this</strong>.index = index;
+<a name="112" href="#112">112</a> 
+<a name="113" href="#113">113</a>         <strong>try</strong> {
+<a name="114" href="#114">114</a>             Node query = <strong>null</strong>;
+<a name="115" href="#115">115</a>             <strong>if</strong> (session.getRootNode().hasNode(absPath)) {
+<a name="116" href="#116">116</a>                 query = session.getRootNode().getNode(absPath);
+<a name="117" href="#117">117</a>                 <em class="comment">// assert query has mix:referenceable</em>
+<a name="118" href="#118">118</a>                 query.getUUID();
+<a name="119" href="#119">119</a>                 NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
+<a name="120" href="#120">120</a>                 NodeType ntQuery = ntMgr.getNodeType(NodeTypeRegistry.NT_QUERY.toJCRName(session.getNamespaceResolver()));
+<a name="121" href="#121">121</a>                 <strong>if</strong> (!query.getPrimaryNodeType().equals(ntQuery)) {
+<a name="122" href="#122">122</a>                     <strong>throw</strong> <strong>new</strong> InvalidQueryException(<span class="string">"node is not of type nt:query"</span>);
+<a name="123" href="#123">123</a>                 }
+<a name="124" href="#124">124</a>             } <strong>else</strong> {
+<a name="125" href="#125">125</a>                 <strong>throw</strong> <strong>new</strong> ItemNotFoundException(absPath);
+<a name="126" href="#126">126</a>             }
+<a name="127" href="#127">127</a> 
+<a name="128" href="#128">128</a>             path = Path.create(absPath, session.getNamespaceResolver(), <strong>true</strong>);
+<a name="129" href="#129">129</a> 
+<a name="130" href="#130">130</a>             statement = query.getProperty(PROP_STATEMENT.toJCRName(session.getNamespaceResolver())).getString();
+<a name="131" href="#131">131</a>             language = query.getProperty(PROP_LANGUAGE.toJCRName(session.getNamespaceResolver())).getString();
+<a name="132" href="#132">132</a> 
+<a name="133" href="#133">133</a>             <em class="comment">// parse query according to language</em>
+<a name="134" href="#134">134</a>             <em class="comment">// build query tree and pass to QueryImpl</em>
+<a name="135" href="#135">135</a>             <a href="../../../../../../org/apache/jackrabbit/core/search/QueryRootNode.html">QueryRootNode</a> root = QueryParser.parse(statement, language, session.getNamespaceResolver());
+<a name="136" href="#136">136</a>             <strong>this</strong>.root = root;
+<a name="137" href="#137">137</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
+<a name="138" href="#138">138</a>             <strong>throw</strong> <strong>new</strong> InvalidQueryException(e.getMessage(), e);
+<a name="139" href="#139">139</a>         } <strong>catch</strong> (MalformedPathException e) {
+<a name="140" href="#140">140</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(absPath, e);
+<a name="141" href="#141">141</a>         }
+<a name="142" href="#142">142</a>     }
 <a name="143" href="#143">143</a> 
-<a name="144" href="#144">144</a>         OrderQueryNode.OrderSpec[] orderSpecs = <strong>null</strong>;
-<a name="145" href="#145">145</a>         <strong>if</strong> (orderNode != <strong>null</strong>) {
-<a name="146" href="#146">146</a>             orderSpecs = orderNode.getOrderSpecs();
-<a name="147" href="#147">147</a>         } <strong>else</strong> {
-<a name="148" href="#148">148</a>             orderSpecs = <strong>new</strong> OrderQueryNode.OrderSpec[0];
-<a name="149" href="#149">149</a>         }
-<a name="150" href="#150">150</a>         <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] orderProperties = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[orderSpecs.length];
-<a name="151" href="#151">151</a>         <strong>boolean</strong>[] ascSpecs = <strong>new</strong> <strong>boolean</strong>[orderSpecs.length];
-<a name="152" href="#152">152</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; orderSpecs.length; i++) {
-<a name="153" href="#153">153</a>             orderProperties[i] = orderSpecs[i].getProperty();
-<a name="154" href="#154">154</a>             ascSpecs[i] = orderSpecs[i].isAscending();
-<a name="155" href="#155">155</a>         }
-<a name="156" href="#156">156</a> 
-<a name="157" href="#157">157</a> 
-<a name="158" href="#158">158</a>         List uuids;
-<a name="159" href="#159">159</a>         <a href="../../../../../../org/apache/jackrabbit/core/AccessManagerImpl.html">AccessManagerImpl</a> accessMgr = session.getAccessManager();
-<a name="160" href="#160">160</a> 
-<a name="161" href="#161">161</a>         <em class="comment">// execute it</em>
-<a name="162" href="#162">162</a>         <strong>try</strong> {
-<a name="163" href="#163">163</a>             Hits result = index.executeQuery(query, orderProperties, ascSpecs);
-<a name="164" href="#164">164</a>             uuids = <strong>new</strong> ArrayList(result.length());
-<a name="165" href="#165">165</a>             <strong>for</strong> (<strong>int</strong> i = 0; i &lt; result.length(); i++) {
-<a name="166" href="#166">166</a>                 String uuid = result.doc(i).get(FieldNames.UUID);
-<a name="167" href="#167">167</a>                 <em class="comment">// check access</em>
-<a name="168" href="#168">168</a>                 <strong>if</strong> (accessMgr.isGranted(<strong>new</strong> NodeId(uuid), AccessManager.READ)) {
-<a name="169" href="#169">169</a>                     uuids.add(uuid);
-<a name="170" href="#170">170</a>                 }
-<a name="171" href="#171">171</a>             }
-<a name="172" href="#172">172</a>         } <strong>catch</strong> (IOException e) {
-<a name="173" href="#173">173</a>             uuids = Collections.EMPTY_LIST;
-<a name="174" href="#174">174</a>         }
-<a name="175" href="#175">175</a> 
-<a name="176" href="#176">176</a>         <em class="comment">// return QueryResult</em>
-<a name="177" href="#177">177</a>         <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html">QueryResultImpl</a>(itemMgr,
-<a name="178" href="#178">178</a>                 (String[]) uuids.toArray(<strong>new</strong> String[uuids.size()]),
-<a name="179" href="#179">179</a>                 root.getSelectProperties(),
-<a name="180" href="#180">180</a>                 session.getNamespaceResolver());
-<a name="181" href="#181">181</a>     }
+<a name="144" href="#144">144</a>     <strong>public</strong> QueryResult execute() throws RepositoryException {
+<a name="145" href="#145">145</a>         <em class="comment">// build lucene query</em>
+<a name="146" href="#146">146</a>         Query query = LuceneQueryBuilder.createQuery(root,
+<a name="147" href="#147">147</a>                 session, index.getNamespaceMappings(), index.getAnalyzer());
+<a name="148" href="#148">148</a> 
+<a name="149" href="#149">149</a>         <a href="../../../../../../org/apache/jackrabbit/core/search/OrderQueryNode.html">OrderQueryNode</a> orderNode = root.getOrderNode();
+<a name="150" href="#150">150</a> 
+<a name="151" href="#151">151</a>         OrderQueryNode.OrderSpec[] orderSpecs = <strong>null</strong>;
+<a name="152" href="#152">152</a>         <strong>if</strong> (orderNode != <strong>null</strong>) {
+<a name="153" href="#153">153</a>             orderSpecs = orderNode.getOrderSpecs();
+<a name="154" href="#154">154</a>         } <strong>else</strong> {
+<a name="155" href="#155">155</a>             orderSpecs = <strong>new</strong> OrderQueryNode.OrderSpec[0];
+<a name="156" href="#156">156</a>         }
+<a name="157" href="#157">157</a>         <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] orderProperties = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[orderSpecs.length];
+<a name="158" href="#158">158</a>         <strong>boolean</strong>[] ascSpecs = <strong>new</strong> <strong>boolean</strong>[orderSpecs.length];
+<a name="159" href="#159">159</a>         <strong>for</strong> (<strong>int</strong> i = 0; i &lt; orderSpecs.length; i++) {
+<a name="160" href="#160">160</a>             orderProperties[i] = orderSpecs[i].getProperty();
+<a name="161" href="#161">161</a>             ascSpecs[i] = orderSpecs[i].isAscending();
+<a name="162" href="#162">162</a>         }
+<a name="163" href="#163">163</a> 
+<a name="164" href="#164">164</a> 
+<a name="165" href="#165">165</a>         List uuids;
+<a name="166" href="#166">166</a>         <a href="../../../../../../org/apache/jackrabbit/core/AccessManagerImpl.html">AccessManagerImpl</a> accessMgr = session.getAccessManager();
+<a name="167" href="#167">167</a> 
+<a name="168" href="#168">168</a>         <em class="comment">// execute it</em>
+<a name="169" href="#169">169</a>         <strong>try</strong> {
+<a name="170" href="#170">170</a>             Hits result = index.executeQuery(query, orderProperties, ascSpecs);
+<a name="171" href="#171">171</a>             uuids = <strong>new</strong> ArrayList(result.length());
+<a name="172" href="#172">172</a>             <strong>for</strong> (<strong>int</strong> i = 0; i &lt; result.length(); i++) {
+<a name="173" href="#173">173</a>                 String uuid = result.doc(i).get(FieldNames.UUID);
+<a name="174" href="#174">174</a>                 <em class="comment">// check access</em>
+<a name="175" href="#175">175</a>                 <strong>if</strong> (accessMgr.isGranted(<strong>new</strong> NodeId(uuid), AccessManager.READ)) {
+<a name="176" href="#176">176</a>                     uuids.add(uuid);
+<a name="177" href="#177">177</a>                 }
+<a name="178" href="#178">178</a>             }
+<a name="179" href="#179">179</a>         } <strong>catch</strong> (IOException e) {
+<a name="180" href="#180">180</a>             uuids = Collections.EMPTY_LIST;
+<a name="181" href="#181">181</a>         }
 <a name="182" href="#182">182</a> 
-<a name="183" href="#183">183</a>     <strong>public</strong> String getStatement() {
-<a name="184" href="#184">184</a>         <strong>return</strong> statement;
-<a name="185" href="#185">185</a>     }
-<a name="186" href="#186">186</a> 
-<a name="187" href="#187">187</a>     <strong>public</strong> String getLanguage() {
-<a name="188" href="#188">188</a>         <strong>return</strong> language;
-<a name="189" href="#189">189</a>     }
-<a name="190" href="#190">190</a> 
-<a name="191" href="#191">191</a>     <strong>public</strong> String getPersistentQueryPath() throws ItemNotFoundException {
-<a name="192" href="#192">192</a>         <strong>if</strong> (path == <strong>null</strong>) {
-<a name="193" href="#193">193</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(<span class="string">"not a persistent query"</span>);
-<a name="194" href="#194">194</a>         }
-<a name="195" href="#195">195</a>         <strong>try</strong> {
-<a name="196" href="#196">196</a>             <strong>return</strong> path.toJCRPath(session.getNamespaceResolver());
-<a name="197" href="#197">197</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
-<a name="198" href="#198">198</a>             <em class="comment">// should not happen actually</em>
-<a name="199" href="#199">199</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(path.toString());
-<a name="200" href="#200">200</a>         }
-<a name="201" href="#201">201</a>     }
-<a name="202" href="#202">202</a> 
-<a name="203" href="#203">203</a>     <strong>public</strong> <strong>void</strong> save(String absPath)
-<a name="204" href="#204">204</a>             throws ItemExistsException,
-<a name="205" href="#205">205</a>             PathNotFoundException,
-<a name="206" href="#206">206</a>             VersionException,
-<a name="207" href="#207">207</a>             ConstraintViolationException,
-<a name="208" href="#208">208</a>             LockException,
-<a name="209" href="#209">209</a>             UnsupportedRepositoryOperationException,
-<a name="210" href="#210">210</a>             RepositoryException {
-<a name="211" href="#211">211</a>         <strong>try</strong> {
-<a name="212" href="#212">212</a>             <a href="../../../../../../org/apache/jackrabbit/core/NamespaceResolver.html">NamespaceResolver</a> resolver = session.getNamespaceResolver();
-<a name="213" href="#213">213</a>             <a href="../../../../../../org/apache/jackrabbit/core/Path.html">Path</a> p = Path.create(absPath, resolver, <strong>true</strong>);
-<a name="214" href="#214">214</a>             <strong>if</strong> (!p.isAbsolute()) {
-<a name="215" href="#215">215</a>                 <strong>throw</strong> <strong>new</strong> RepositoryException(absPath + <span class="string">" is not absolut"</span>);
-<a name="216" href="#216">216</a>             }
-<a name="217" href="#217">217</a>             <strong>if</strong> (!session.getRootNode().hasNode(p.getAncestor(1).toJCRPath(resolver))) {
-<a name="218" href="#218">218</a>                 <strong>throw</strong> <strong>new</strong> PathNotFoundException(p.getAncestor(1).toJCRPath(resolver));
-<a name="219" href="#219">219</a>             }
-<a name="220" href="#220">220</a>             <strong>if</strong> (session.getRootNode().hasNode(p.toJCRPath(resolver))) {
-<a name="221" href="#221">221</a>                 <strong>throw</strong> <strong>new</strong> ItemExistsException(p.toJCRPath(resolver));
-<a name="222" href="#222">222</a>             }
-<a name="223" href="#223">223</a>             Node queryNode = session.getRootNode().addNode(p.toJCRPath(resolver),
-<a name="224" href="#224">224</a>                     NodeTypeRegistry.NT_QUERY.toJCRName(resolver));
-<a name="225" href="#225">225</a>             <em class="comment">// set properties</em>
-<a name="226" href="#226">226</a>             queryNode.setProperty(PROP_LANGUAGE.toJCRName(resolver), language);
-<a name="227" href="#227">227</a>             queryNode.setProperty(PROP_STATEMENT.toJCRName(resolver), statement);
-<a name="228" href="#228">228</a>             <em class="comment">// add mixin referenceable</em>
-<a name="229" href="#229">229</a>             queryNode.addMixin(NodeTypeRegistry.MIX_REFERENCEABLE.toJCRName(resolver));
-<a name="230" href="#230">230</a>             <em class="comment">// FIXME do anything else?</em>
-<a name="231" href="#231">231</a>             queryNode.save();
-<a name="232" href="#232">232</a> 
-<a name="233" href="#233">233</a>         } <strong>catch</strong> (MalformedPathException e) {
-<a name="234" href="#234">234</a>             <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
-<a name="235" href="#235">235</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
-<a name="236" href="#236">236</a>             <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
-<a name="237" href="#237">237</a>         }
-<a name="238" href="#238">238</a>         session.getRootNode().getNode(absPath);
-<a name="239" href="#239">239</a>     }
-<a name="240" href="#240">240</a> 
-<a name="241" href="#241">241</a> }
+<a name="183" href="#183">183</a>         <em class="comment">// get select properties</em>
+<a name="184" href="#184">184</a>         <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] selectProps = root.getSelectProperties();
+<a name="185" href="#185">185</a>         <strong>if</strong> (selectProps.length == 0) {
+<a name="186" href="#186">186</a>             <em class="comment">// use node type constraint</em>
+<a name="187" href="#187">187</a>             <a href="../../../../../../org/apache/jackrabbit/core/search/LocationStepQueryNode.html">LocationStepQueryNode</a>[] steps = root.getLocationNode().getPathSteps();
+<a name="188" href="#188">188</a>             <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] ntName = <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[1];
+<a name="189" href="#189">189</a>             steps[steps.length - 1].acceptOperands(<strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/DefaultQueryNodeVisitor.html">DefaultQueryNodeVisitor</a>() {
+<a name="190" href="#190">190</a>                 <strong>public</strong> Object visit(<a href="../../../../../../org/apache/jackrabbit/core/search/NodeTypeQueryNode.html">NodeTypeQueryNode</a> node, Object data) {
+<a name="191" href="#191">191</a>                     ntName[0] = node.getValue();
+<a name="192" href="#192">192</a>                     <strong>return</strong> data;
+<a name="193" href="#193">193</a>                 }
+<a name="194" href="#194">194</a>             }, <strong>null</strong>);
+<a name="195" href="#195">195</a>             <strong>if</strong> (ntName[0] == <strong>null</strong>) {
+<a name="196" href="#196">196</a>                 ntName[0] = NodeTypeRegistry.NT_BASE;
+<a name="197" href="#197">197</a>             }
+<a name="198" href="#198">198</a>             <a href="../../../../../../org/apache/jackrabbit/core/nodetype/NodeTypeImpl.html">NodeTypeImpl</a> nt = session.getNodeTypeManager().getNodeType(ntName[0]);
+<a name="199" href="#199">199</a>             PropertyDef[] propDefs = (PropertyDef[]) nt.getPropertyDefs();
+<a name="200" href="#200">200</a>             List tmp = <strong>new</strong> ArrayList();
+<a name="201" href="#201">201</a>             <strong>for</strong> (<strong>int</strong> i = 0; i &lt; propDefs.length; i++) {
+<a name="202" href="#202">202</a>                 <strong>if</strong> (!propDefs[i].isMultiple()) {
+<a name="203" href="#203">203</a>                     tmp.add(((PropertyDefImpl) propDefs[i]).getQName());
+<a name="204" href="#204">204</a>                 }
+<a name="205" href="#205">205</a>             }
+<a name="206" href="#206">206</a>             selectProps = (QName[]) tmp.toArray(<strong>new</strong> QName[tmp.size()]);
+<a name="207" href="#207">207</a>         }
+<a name="208" href="#208">208</a> 
+<a name="209" href="#209">209</a>         <em class="comment">// return QueryResult</em>
+<a name="210" href="#210">210</a>         <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html">QueryResultImpl</a>(itemMgr,
+<a name="211" href="#211">211</a>                 (String[]) uuids.toArray(<strong>new</strong> String[uuids.size()]),
+<a name="212" href="#212">212</a>                 selectProps,
+<a name="213" href="#213">213</a>                 session.getNamespaceResolver());
+<a name="214" href="#214">214</a>     }
+<a name="215" href="#215">215</a> 
+<a name="216" href="#216">216</a>     <strong>public</strong> String getStatement() {
+<a name="217" href="#217">217</a>         <strong>return</strong> statement;
+<a name="218" href="#218">218</a>     }
+<a name="219" href="#219">219</a> 
+<a name="220" href="#220">220</a>     <strong>public</strong> String getLanguage() {
+<a name="221" href="#221">221</a>         <strong>return</strong> language;
+<a name="222" href="#222">222</a>     }
+<a name="223" href="#223">223</a> 
+<a name="224" href="#224">224</a>     <strong>public</strong> String getPersistentQueryPath() throws ItemNotFoundException {
+<a name="225" href="#225">225</a>         <strong>if</strong> (path == <strong>null</strong>) {
+<a name="226" href="#226">226</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(<span class="string">"not a persistent query"</span>);
+<a name="227" href="#227">227</a>         }
+<a name="228" href="#228">228</a>         <strong>try</strong> {
+<a name="229" href="#229">229</a>             <strong>return</strong> path.toJCRPath(session.getNamespaceResolver());
+<a name="230" href="#230">230</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
+<a name="231" href="#231">231</a>             <em class="comment">// should not happen actually</em>
+<a name="232" href="#232">232</a>             <strong>throw</strong> <strong>new</strong> ItemNotFoundException(path.toString());
+<a name="233" href="#233">233</a>         }
+<a name="234" href="#234">234</a>     }
+<a name="235" href="#235">235</a> 
+<a name="236" href="#236">236</a>     <strong>public</strong> <strong>void</strong> save(String absPath)
+<a name="237" href="#237">237</a>             throws ItemExistsException,
+<a name="238" href="#238">238</a>             PathNotFoundException,
+<a name="239" href="#239">239</a>             VersionException,
+<a name="240" href="#240">240</a>             ConstraintViolationException,
+<a name="241" href="#241">241</a>             LockException,
+<a name="242" href="#242">242</a>             UnsupportedRepositoryOperationException,
+<a name="243" href="#243">243</a>             RepositoryException {
+<a name="244" href="#244">244</a>         <strong>try</strong> {
+<a name="245" href="#245">245</a>             <a href="../../../../../../org/apache/jackrabbit/core/NamespaceResolver.html">NamespaceResolver</a> resolver = session.getNamespaceResolver();
+<a name="246" href="#246">246</a>             <a href="../../../../../../org/apache/jackrabbit/core/Path.html">Path</a> p = Path.create(absPath, resolver, <strong>true</strong>);
+<a name="247" href="#247">247</a>             <strong>if</strong> (!p.isAbsolute()) {
+<a name="248" href="#248">248</a>                 <strong>throw</strong> <strong>new</strong> RepositoryException(absPath + <span class="string">" is not absolut"</span>);
+<a name="249" href="#249">249</a>             }
+<a name="250" href="#250">250</a>             <strong>if</strong> (!session.getRootNode().hasNode(p.getAncestor(1).toJCRPath(resolver))) {
+<a name="251" href="#251">251</a>                 <strong>throw</strong> <strong>new</strong> PathNotFoundException(p.getAncestor(1).toJCRPath(resolver));
+<a name="252" href="#252">252</a>             }
+<a name="253" href="#253">253</a>             <strong>if</strong> (session.getRootNode().hasNode(p.toJCRPath(resolver))) {
+<a name="254" href="#254">254</a>                 <strong>throw</strong> <strong>new</strong> ItemExistsException(p.toJCRPath(resolver));
+<a name="255" href="#255">255</a>             }
+<a name="256" href="#256">256</a>             Node queryNode = session.getRootNode().addNode(p.toJCRPath(resolver),
+<a name="257" href="#257">257</a>                     NodeTypeRegistry.NT_QUERY.toJCRName(resolver));
+<a name="258" href="#258">258</a>             <em class="comment">// set properties</em>
+<a name="259" href="#259">259</a>             queryNode.setProperty(PROP_LANGUAGE.toJCRName(resolver), language);
+<a name="260" href="#260">260</a>             queryNode.setProperty(PROP_STATEMENT.toJCRName(resolver), statement);
+<a name="261" href="#261">261</a>             <em class="comment">// add mixin referenceable</em>
+<a name="262" href="#262">262</a>             queryNode.addMixin(NodeTypeRegistry.MIX_REFERENCEABLE.toJCRName(resolver));
+<a name="263" href="#263">263</a>             <em class="comment">// FIXME do anything else?</em>
+<a name="264" href="#264">264</a>             queryNode.save();
+<a name="265" href="#265">265</a> 
+<a name="266" href="#266">266</a>         } <strong>catch</strong> (MalformedPathException e) {
+<a name="267" href="#267">267</a>             <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
+<a name="268" href="#268">268</a>         } <strong>catch</strong> (NoPrefixDeclaredException e) {
+<a name="269" href="#269">269</a>             <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
+<a name="270" href="#270">270</a>         }
+<a name="271" href="#271">271</a>         session.getRootNode().getNode(absPath);
+<a name="272" href="#272">272</a>     }
+<a name="273" href="#273">273</a> 
+<a name="274" href="#274">274</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/org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/QueryResultImpl.html Wed Feb  2 06:04:46 2005
@@ -91,10 +91,9 @@
 <a name="82" href="#82">82</a>  <em>     * @see QueryResult#getRows()</em>
 <a name="83" href="#83">83</a>  <em>     */</em>
 <a name="84" href="#84">84</a>      <strong>public</strong> RowIterator getRows() throws RepositoryException {
-<a name="85" href="#85">85</a>          <em class="comment">// @todo implement QueryResult#getRows()</em>
-<a name="86" href="#86">86</a>          <strong>throw</strong> <strong>new</strong> RepositoryException(<span class="string">"not yet implemented"</span>);
-<a name="87" href="#87">87</a>      }
-<a name="88" href="#88">88</a>  }
+<a name="85" href="#85">85</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html">RowIteratorImpl</a>(<strong>new</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a>(itemMgr, uuids), selectProps, resolver);
+<a name="86" href="#86">86</a>      }
+<a name="87" href="#87">87</a>  }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>

Added: incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html?view=auto&rev=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html (added)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html Wed Feb  2 06:04:46 2005
@@ -0,0 +1,243 @@
+<!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>RowIteratorImpl xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../apidocs/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html">View Javadoc</a></div><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/core/search/lucene/package-summary.html">org.apache.jackrabbit.core.search.lucene</a>;
+<a name="18" href="#18">18</a>  
+<a name="19" href="#19">19</a>  <strong>import</strong> org.apache.jackrabbit.core.QName;
+<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.jackrabbit.core.NamespaceResolver;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.jackrabbit.core.NodeImpl;
+<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.jackrabbit.core.PropertyImpl;
+<a name="23" href="#23">23</a>  <strong>import</strong> org.apache.jackrabbit.core.IllegalNameException;
+<a name="24" href="#24">24</a>  <strong>import</strong> org.apache.jackrabbit.core.UnknownPrefixException;
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  <strong>import</strong> javax.jcr.query.RowIterator;
+<a name="27" href="#27">27</a>  <strong>import</strong> javax.jcr.query.Row;
+<a name="28" href="#28">28</a>  <strong>import</strong> javax.jcr.Value;
+<a name="29" href="#29">29</a>  <strong>import</strong> javax.jcr.RepositoryException;
+<a name="30" href="#30">30</a>  <strong>import</strong> javax.jcr.ItemNotFoundException;
+<a name="31" href="#31">31</a>  <strong>import</strong> java.util.Arrays;
+<a name="32" href="#32">32</a>  <strong>import</strong> java.util.Set;
+<a name="33" href="#33">33</a>  <strong>import</strong> java.util.HashSet;
+<a name="34" href="#34">34</a>  
+<a name="35" href="#35">35</a>  <em>/**<em>*</em></em>
+<a name="36" href="#36">36</a>  <em> * Implements the {@link javax.jcr.query.RowIterator} interface returned by</em>
+<a name="37" href="#37">37</a>  <em> * a {@link javax.jcr.query.QueryResult}.</em>
+<a name="38" href="#38">38</a>  <em> */</em>
+<a name="39" href="#39">39</a>  <strong>class</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html">RowIteratorImpl</a> implements RowIterator {
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>      <em>/**<em>* Iterator over nodes, that constitute the result set. */</em></em>
+<a name="42" href="#42">42</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a> nodes;
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <em>/**<em>* Array of select property names */</em></em>
+<a name="45" href="#45">45</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] properties;
+<a name="46" href="#46">46</a>  
+<a name="47" href="#47">47</a>      <em>/**<em>* The &lt;code>NamespaceResolver&lt;/code> of the user &lt;code>Session&lt;/code>. */</em></em>
+<a name="48" href="#48">48</a>      <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/NamespaceResolver.html">NamespaceResolver</a> resolver;
+<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>     * Creates a new &lt;code>RowIteratorImpl&lt;/code> that iterates over the result</em>
+<a name="52" href="#52">52</a>  <em>     * nodes.</em>
+<a name="53" href="#53">53</a>  <em>     * @param nodes a &lt;code>NodeIteratorImpl&lt;/code> that contains the nodes of</em>
+<a name="54" href="#54">54</a>  <em>     * the query result.</em>
+<a name="55" href="#55">55</a>  <em>     * @param properties &lt;code>QName&lt;/code> of the select properties.</em>
+<a name="56" href="#56">56</a>  <em>     * @param resolver &lt;code>NamespaceResolver&lt;/code> of the user</em>
+<a name="57" href="#57">57</a>  <em>     *   &lt;code>Session&lt;/code>.</em>
+<a name="58" href="#58">58</a>  <em>     */</em>
+<a name="59" href="#59">59</a>      <a href="../../../../../../org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html">RowIteratorImpl</a>(<a href="../../../../../../org/apache/jackrabbit/core/search/lucene/NodeIteratorImpl.html">NodeIteratorImpl</a> nodes, <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a>[] properties, <a href="../../../../../../org/apache/jackrabbit/core/NamespaceResolver.html">NamespaceResolver</a> resolver) {
+<a name="60" href="#60">60</a>          <strong>this</strong>.nodes = nodes;
+<a name="61" href="#61">61</a>          <strong>this</strong>.properties = properties;
+<a name="62" href="#62">62</a>          <strong>this</strong>.resolver = resolver;
+<a name="63" href="#63">63</a>      }
+<a name="64" href="#64">64</a>  
+<a name="65" href="#65">65</a>      <em>/**<em>*</em></em>
+<a name="66" href="#66">66</a>  <em>     * Returns the next &lt;code>Row&lt;/code> in the iteration.</em>
+<a name="67" href="#67">67</a>  <em>     *</em>
+<a name="68" href="#68">68</a>  <em>     * @return the next &lt;code>Row&lt;/code> in the iteration.</em>
+<a name="69" href="#69">69</a>  <em>     * @throws java.util.NoSuchElementException if iteration has no more</em>
+<a name="70" href="#70">70</a>  <em>     *   &lt;code>Row&lt;/code>s.</em>
+<a name="71" href="#71">71</a>  <em>    */</em>
+<a name="72" href="#72">72</a>      <strong>public</strong> Row nextRow() {
+<a name="73" href="#73">73</a>          <strong>return</strong> <strong>new</strong> RowImpl(nodes.nextNodeImpl());
+<a name="74" href="#74">74</a>      }
+<a name="75" href="#75">75</a>  
+<a name="76" href="#76">76</a>      <em>/**<em>*</em></em>
+<a name="77" href="#77">77</a>  <em>     * Skip a number of &lt;code>Row&lt;/code>s in this iterator.</em>
+<a name="78" href="#78">78</a>  <em>     *</em>
+<a name="79" href="#79">79</a>  <em>     * @param skipNum the non-negative number of &lt;code>Row&lt;/code>s to skip</em>
+<a name="80" href="#80">80</a>  <em>     * @throws java.util.NoSuchElementException</em>
+<a name="81" href="#81">81</a>  <em>     *          if skipped past the last &lt;code>Row&lt;/code> in this iterator.</em>
+<a name="82" href="#82">82</a>  <em>     */</em>
+<a name="83" href="#83">83</a>      <strong>public</strong> <strong>void</strong> skip(<strong>long</strong> skipNum) {
+<a name="84" href="#84">84</a>          nodes.skip(skipNum);
+<a name="85" href="#85">85</a>      }
+<a name="86" href="#86">86</a>  
+<a name="87" href="#87">87</a>      <em>/**<em>*</em></em>
+<a name="88" href="#88">88</a>  <em>     * Returns the number of &lt;code>Row&lt;/code>s in this iterator.</em>
+<a name="89" href="#89">89</a>  <em>     * @return the number of &lt;code>Row&lt;/code>s in this iterator.</em>
+<a name="90" href="#90">90</a>  <em>     */</em>
+<a name="91" href="#91">91</a>      <strong>public</strong> <strong>long</strong> getSize() {
+<a name="92" href="#92">92</a>          <strong>return</strong> nodes.getSize();
+<a name="93" href="#93">93</a>      }
+<a name="94" href="#94">94</a>  
+<a name="95" href="#95">95</a>      <em>/**<em>*</em></em>
+<a name="96" href="#96">96</a>  <em>     * Returns the current position within this iterator. The number</em>
+<a name="97" href="#97">97</a>  <em>     * returned is the 0-based index of the next &lt;code>Row&lt;/code> in the iterator,</em>
+<a name="98" href="#98">98</a>  <em>     * i.e. the one that will be returned on the subsequent &lt;code>next&lt;/code> call.</em>
+<a name="99" href="#99">99</a>  <em>     * &lt;p/></em>
+<a name="100" href="#100">100</a> <em>     * Note that this method does not check if there is a next element,</em>
+<a name="101" href="#101">101</a> <em>     * i.e. an empty iterator will always return 0.</em>
+<a name="102" href="#102">102</a> <em>     *</em>
+<a name="103" href="#103">103</a> <em>     * @return the current position withing this iterator.</em>
+<a name="104" href="#104">104</a> <em>     */</em>
+<a name="105" href="#105">105</a>     <strong>public</strong> <strong>long</strong> getPos() {
+<a name="106" href="#106">106</a>         <strong>return</strong> nodes.getPos();
+<a name="107" href="#107">107</a>     }
+<a name="108" href="#108">108</a> 
+<a name="109" href="#109">109</a>     <em>/**<em>*</em></em>
+<a name="110" href="#110">110</a> <em>     * @throws UnsupportedOperationException always.</em>
+<a name="111" href="#111">111</a> <em>     */</em>
+<a name="112" href="#112">112</a>     <strong>public</strong> <strong>void</strong> remove() {
+<a name="113" href="#113">113</a>         <strong>throw</strong> <strong>new</strong> UnsupportedOperationException(<span class="string">"remove"</span>);
+<a name="114" href="#114">114</a>     }
+<a name="115" href="#115">115</a> 
+<a name="116" href="#116">116</a>     <em>/**<em>*</em></em>
+<a name="117" href="#117">117</a> <em>     * Returns &lt;code>true&lt;/code> if the iteration has more &lt;code>Row&lt;/code>s.</em>
+<a name="118" href="#118">118</a> <em>     * (In other words, returns &lt;code>true&lt;/code> if &lt;code>next&lt;/code> would</em>
+<a name="119" href="#119">119</a> <em>     * return an &lt;code>Row&lt;/code> rather than throwing an exception.)</em>
+<a name="120" href="#120">120</a> <em>     *</em>
+<a name="121" href="#121">121</a> <em>     * @return &lt;code>true&lt;/code> if the iterator has more elements.</em>
+<a name="122" href="#122">122</a> <em>     */</em>
+<a name="123" href="#123">123</a>     <strong>public</strong> <strong>boolean</strong> hasNext() {
+<a name="124" href="#124">124</a>         <strong>return</strong> nodes.hasNext();
+<a name="125" href="#125">125</a>     }
+<a name="126" href="#126">126</a> 
+<a name="127" href="#127">127</a>     <em>/**<em>*</em></em>
+<a name="128" href="#128">128</a> <em>     * Returns the next &lt;code>Row&lt;/code> in the iteration.</em>
+<a name="129" href="#129">129</a> <em>     *</em>
+<a name="130" href="#130">130</a> <em>     * @return the next &lt;code>Row&lt;/code> in the iteration.</em>
+<a name="131" href="#131">131</a> <em>     * @throws java.util.NoSuchElementException if iteration has no more</em>
+<a name="132" href="#132">132</a> <em>     *   &lt;code>Row&lt;/code>s.</em>
+<a name="133" href="#133">133</a> <em>    */</em>
+<a name="134" href="#134">134</a>     <strong>public</strong> Object next() {
+<a name="135" href="#135">135</a>         <strong>return</strong> nextRow();
+<a name="136" href="#136">136</a>     }
+<a name="137" href="#137">137</a> 
+<a name="138" href="#138">138</a>     <em class="comment">//---------------------&lt; class RowImpl >------------------------------------</em>
+<a name="139" href="#139">139</a> 
+<a name="140" href="#140">140</a>     <em>/**<em>*</em></em>
+<a name="141" href="#141">141</a> <em>     * Implements the {@link javax.jcr.query.Row} interface, which represents</em>
+<a name="142" href="#142">142</a> <em>     * a row in the query result.</em>
+<a name="143" href="#143">143</a> <em>     */</em>
+<a name="144" href="#144">144</a>     <strong>class</strong> RowImpl implements Row {
+<a name="145" href="#145">145</a> 
+<a name="146" href="#146">146</a>         <em>/**<em>* The underlying &lt;code>Node&lt;/code> of this result row. */</em></em>
+<a name="147" href="#147">147</a>         <strong>private</strong> <strong>final</strong> <a href="../../../../../../org/apache/jackrabbit/core/NodeImpl.html">NodeImpl</a> node;
+<a name="148" href="#148">148</a> 
+<a name="149" href="#149">149</a>         <em>/**<em>* Cached value array for returned by {@link #getValues()}. */</em></em>
+<a name="150" href="#150">150</a>         <strong>private</strong> Value[] values;
+<a name="151" href="#151">151</a> 
+<a name="152" href="#152">152</a>         <em>/**<em>* Set of select property &lt;code>QName&lt;/code>s. */</em></em>
+<a name="153" href="#153">153</a>         <strong>private</strong> Set valueSet;
+<a name="154" href="#154">154</a> 
+<a name="155" href="#155">155</a>         <em>/**<em>*</em></em>
+<a name="156" href="#156">156</a> <em>         * Creates a new &lt;code>RowImpl&lt;/code> instance based on &lt;code>node&lt;/code>.</em>
+<a name="157" href="#157">157</a> <em>         * @param node the underlying &lt;code>Node&lt;/code> for this &lt;code>Row&lt;/code>.</em>
+<a name="158" href="#158">158</a> <em>         */</em>
+<a name="159" href="#159">159</a>         RowImpl(<a href="../../../../../../org/apache/jackrabbit/core/NodeImpl.html">NodeImpl</a> node) {
+<a name="160" href="#160">160</a>             <strong>this</strong>.node = node;
+<a name="161" href="#161">161</a>         }
+<a name="162" href="#162">162</a> 
+<a name="163" href="#163">163</a>         <em>/**<em>*</em></em>
+<a name="164" href="#164">164</a> <em>         * Returns an array of all the values in the same order as the property</em>
+<a name="165" href="#165">165</a> <em>         * names (column names) returned by</em>
+<a name="166" href="#166">166</a> <em>         * {@link javax.jcr.query.QueryResult#getPropertyNames()}.</em>
+<a name="167" href="#167">167</a> <em>         *</em>
+<a name="168" href="#168">168</a> <em>         * @return a &lt;code>Value&lt;/code> array.</em>
+<a name="169" href="#169">169</a> <em>         * @throws RepositoryException if an error occurs while retrieving the</em>
+<a name="170" href="#170">170</a> <em>         *  values from the &lt;code>Node&lt;/code>.</em>
+<a name="171" href="#171">171</a> <em>         */</em>
+<a name="172" href="#172">172</a>         <strong>public</strong> Value[] getValues() throws RepositoryException {
+<a name="173" href="#173">173</a>             <strong>if</strong> (values == <strong>null</strong>) {
+<a name="174" href="#174">174</a>                 Value[] tmp = <strong>new</strong> Value[properties.length];
+<a name="175" href="#175">175</a>                 <strong>for</strong> (<strong>int</strong> i = 0; i &lt; properties.length; i++) {
+<a name="176" href="#176">176</a>                     <strong>if</strong> (node.hasProperty(properties[i])) {
+<a name="177" href="#177">177</a>                         <a href="../../../../../../org/apache/jackrabbit/core/PropertyImpl.html">PropertyImpl</a> prop = node.getProperty(properties[i]);
+<a name="178" href="#178">178</a>                         <strong>if</strong> (!prop.getDefinition().isMultiple()) {
+<a name="179" href="#179">179</a>                             tmp[i] = prop.getValue();
+<a name="180" href="#180">180</a>                         } <strong>else</strong> {
+<a name="181" href="#181">181</a>                             <em class="comment">// mvp values cannot be returned</em>
+<a name="182" href="#182">182</a>                             tmp[i] = <strong>null</strong>;
+<a name="183" href="#183">183</a>                         }
+<a name="184" href="#184">184</a>                     } <strong>else</strong> {
+<a name="185" href="#185">185</a>                         <em class="comment">// property not set</em>
+<a name="186" href="#186">186</a>                         tmp[i] = <strong>null</strong>;
+<a name="187" href="#187">187</a>                     }
+<a name="188" href="#188">188</a>                 }
+<a name="189" href="#189">189</a>                 values = tmp;
+<a name="190" href="#190">190</a>             }
+<a name="191" href="#191">191</a>             <strong>return</strong> values;
+<a name="192" href="#192">192</a>         }
+<a name="193" href="#193">193</a> 
+<a name="194" href="#194">194</a>         <em>/**<em>*</em></em>
+<a name="195" href="#195">195</a> <em>         * Returns the value of the indicated  property in this &lt;code>Row&lt;/code>.</em>
+<a name="196" href="#196">196</a> <em>         * &lt;p/></em>
+<a name="197" href="#197">197</a> <em>         * If &lt;code>propertyName&lt;/code> is not among the column names of the</em>
+<a name="198" href="#198">198</a> <em>         * query result table, an &lt;code>ItemNotFoundException&lt;/code> is thrown.</em>
+<a name="199" href="#199">199</a> <em>         *</em>
+<a name="200" href="#200">200</a> <em>         * @return a &lt;code>Value&lt;/code></em>
+<a name="201" href="#201">201</a> <em>         * @throws ItemNotFoundException if &lt;code>propertyName&lt;/code> is not</em>
+<a name="202" href="#202">202</a> <em>         * among the column names of the query result table.</em>
+<a name="203" href="#203">203</a> <em>         * @throws RepositoryException if &lt;code>propertyName&lt;/code> is not a</em>
+<a name="204" href="#204">204</a> <em>         *  valid property name.</em>
+<a name="205" href="#205">205</a> <em>         */</em>
+<a name="206" href="#206">206</a>         <strong>public</strong> Value getValue(String propertyName) throws ItemNotFoundException, RepositoryException {
+<a name="207" href="#207">207</a>             <strong>if</strong> (valueSet == <strong>null</strong>) {
+<a name="208" href="#208">208</a>                 <em class="comment">// create the set first</em>
+<a name="209" href="#209">209</a>                 Set tmp = <strong>new</strong> HashSet();
+<a name="210" href="#210">210</a>                 tmp.addAll(Arrays.asList(values));
+<a name="211" href="#211">211</a>                 valueSet = tmp;
+<a name="212" href="#212">212</a>             }
+<a name="213" href="#213">213</a>             <strong>try</strong> {
+<a name="214" href="#214">214</a>                 <a href="../../../../../../org/apache/jackrabbit/core/QName.html">QName</a> prop = QName.fromJCRName(propertyName, resolver);
+<a name="215" href="#215">215</a>                 <strong>if</strong> (!valueSet.contains(prop)) {
+<a name="216" href="#216">216</a>                     <strong>throw</strong> <strong>new</strong> ItemNotFoundException(propertyName);
+<a name="217" href="#217">217</a>                 }
+<a name="218" href="#218">218</a>                 <strong>if</strong> (node.hasProperty(prop)) {
+<a name="219" href="#219">219</a>                     <strong>return</strong> node.getProperty(prop).getValue();
+<a name="220" href="#220">220</a>                 } <strong>else</strong> {
+<a name="221" href="#221">221</a>                     <strong>return</strong> <strong>null</strong>;
+<a name="222" href="#222">222</a>                 }
+<a name="223" href="#223">223</a>             } <strong>catch</strong> (IllegalNameException e) {
+<a name="224" href="#224">224</a>                 <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
+<a name="225" href="#225">225</a>             } <strong>catch</strong> (UnknownPrefixException e) {
+<a name="226" href="#226">226</a>                 <strong>throw</strong> <strong>new</strong> RepositoryException(e.getMessage(), e);
+<a name="227" href="#227">227</a>             }
+<a name="228" href="#228">228</a>         }
+<a name="229" href="#229">229</a>     }
+<a name="230" href="#230">230</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/org/apache/jackrabbit/core/search/lucene/RowIteratorImpl.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-frame.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-frame.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-frame.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-frame.html Wed Feb  2 06:04:46 2005
@@ -98,6 +98,10 @@
           </li>
         
           <li>
+            <a href="RowIteratorImpl.html" target="classFrame">RowIteratorImpl</a>
+          </li>
+        
+          <li>
             <a href="SearchIndex.html" target="classFrame">SearchIndex</a>
           </li>
         

Modified: incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-summary.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-summary.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-summary.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/lucene/package-summary.html Wed Feb  2 06:04:46 2005
@@ -179,6 +179,12 @@
           
             <tr>
               <td>
+                <a href="RowIteratorImpl.html" target="classFrame">RowIteratorImpl</a>
+              </td>
+            </tr>
+          
+            <tr>
+              <td>
                 <a href="SearchIndex.html" target="classFrame">SearchIndex</a>
               </td>
             </tr>

Modified: incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/package-frame.html
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/package-frame.html?view=diff&r1=149513&r2=149514
==============================================================================
--- incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/package-frame.html (original)
+++ incubator/jackrabbit/site/xref/org/apache/jackrabbit/core/search/package-frame.html Wed Feb  2 06:04:46 2005
@@ -30,6 +30,10 @@
           </li>
         
           <li>
+            <a href="DefaultQueryNodeVisitor.html" target="classFrame">DefaultQueryNodeVisitor</a>
+          </li>
+        
+          <li>
             <a href="ExactQueryNode.html" target="classFrame">ExactQueryNode</a>
           </li>
         



Mime
View raw message