Hey Sebastian<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 1:03 PM, Sebastian Trüg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 05/25/2010 08:40 PM, Vishesh Handa wrote:<br>
&gt; 1. If I call Resource( QString(&quot;file:/whatever&quot;) ) and whatever is<br>
&gt; actually a filex:/ url. It won&#39;t get identified, cause the filex:/<br>
&gt; searching is only applicable to QUrls.<br>
<br>
</div>You are right. While this is misuse of the API it should still be fixed.<br>
<div class="im"><br>
&gt; 2. Code like this is perfectly legal, and works (no modifications required)<br>
&gt;<br>
&gt; Resource r1( KUrl(&quot;nepomuk:/res/blah-blah&quot;) );<br>
&gt; r1.setRating( 5 );<br>
&gt; qDebug() &lt;&lt; r1.rating();<br>
&gt;<br>
&gt; This is because determineUri() accepts uris whose scheme is &quot;nepomuk&quot;,<br>
&gt; but don&#39;t really exist in the database. Should this be allowed?<br>
<br>
</div>That was my intention, yes.<br></blockquote><div><br>Oh. I didn&#39;t think it was intentional. <br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
&gt; 3. When checking if the the m_kickoffUri is a nie:url for a resource.<br>
&gt; The nieUrl is assigned to be equal to the uri. This however gets fixed<br>
&gt; in the load(). And nieUrl isn&#39;t used anywhere, so it doesn&#39;t matter that<br>
&gt; much.<br>
<br>
</div>I suppose you mean this part:<br>
<br>
if( it.next() ) {<br>
      QUrl uri = it[&quot;r&quot;].uri();<br>
      if( uri.isEmpty() ) {<br>
         m_uri = m_kickoffUri;<br>
      }<br>
      else {<br>
         m_uri = uri;<br>
         m_nieUrl = uri;<br>
      }<br>
<br>
The last two lines. AFAICT this is perfectly fine since in the latter<br>
case both nie:url and resource URI are equal.<br>
<br></blockquote><div><br>I respectfully disagree. :) <br><br>The query used is this &quot;select distinct ?r ?o where { { ?r nie:url &lt;uri&gt; . } UNION { &lt;uri&gt; ?p ?o . }  } LIMIT 1&quot;. The case where ?r isn&#39;t empty is when the &lt;uri&gt; contains the nie:url and therefore ?r will contain the resource uri.<br>
<br>Please have a look at -&gt; <a href="http://pastebin.com/v536fMvv">http://pastebin.com/v536fMvv</a><br><br>- Vishesh Handa<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Cheers,<br>
<font color="#888888">Sebastian<br>
</font></blockquote></div><br>