Hey Sebastian<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 1:03 PM, Sebastian Trüg <span dir="ltr"><<a href="mailto:trueg@kde.org">trueg@kde.org</a>></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>
> 1. If I call Resource( QString("file:/whatever") ) and whatever is<br>
> actually a filex:/ url. It won't get identified, cause the filex:/<br>
> 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>
> 2. Code like this is perfectly legal, and works (no modifications required)<br>
><br>
> Resource r1( KUrl("nepomuk:/res/blah-blah") );<br>
> r1.setRating( 5 );<br>
> qDebug() << r1.rating();<br>
><br>
> This is because determineUri() accepts uris whose scheme is "nepomuk",<br>
> but don'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'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>
> 3. When checking if the the m_kickoffUri is a nie:url for a resource.<br>
> The nieUrl is assigned to be equal to the uri. This however gets fixed<br>
> in the load(). And nieUrl isn't used anywhere, so it doesn't matter that<br>
> much.<br>
<br>
</div>I suppose you mean this part:<br>
<br>
if( it.next() ) {<br>
QUrl uri = it["r"].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 "select distinct ?r ?o where { { ?r nie:url <uri> . } UNION { <uri> ?p ?o . } } LIMIT 1". The case where ?r isn't empty is when the <uri> contains the nie:url and therefore ?r will contain the resource uri.<br>
<br>Please have a look at -> <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>