<br><br><div class="gmail_quote">On Mon, May 31, 2010 at 5:47 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/31/2010 01:44 PM, Vishesh Handa wrote:<br>
&gt; Resources are identified by one of these 3 ways -<br>
&gt; 1. nao:identifier<br>
&gt; 2. nie:url (includes the whole filex:/ part)<br>
&gt; 3. nepomuk:/res/<br>
&gt;<br>
&gt; m_kickOffId uses 1, 2 (minus the filex:/) &amp; 3. And m_kickOffUri uses 2 &amp;<br>
&gt; 3. I say, we scrap the m_kickOffId, and store the nao:identifier in the<br>
&gt; m_kickOffUri ( perhaps name it to something else? )<br>
&gt;<br>
&gt; The determineUri code would become a lot simpler -<br>
&gt;<br>
&gt; if( m_kickOffUri.isValid() ) {<br>
&gt;    // Either 2 or 3<br>
&gt; }<br>
&gt; else {<br>
&gt;    // nao:identifier<br>
&gt; }<br>
&gt;<br>
&gt; The would even clear one of the odd cases where someone tries to<br>
&gt; initialize a Resource by providing its nepomuk:/res/ uri as a QString<br>
&gt; instead a QUrl.<br>
<br>
</div>So you want to store a string in a KUrl then? Well, that could work indeed.<br></blockquote><div><br>Yup. Or if you really want we could do the opposite and store everything as strings.<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>
<br>
&gt;     &gt; 2. Convert the ResourceData m_kickOffUri into a list AND make sure<br>
&gt;     that<br>
&gt;     &gt; while determining one URI it adds all other cases to the lists as<br>
&gt;     well.<br>
&gt;     &gt;<br>
&gt;     &gt; Number 1 is more of a convenience, but *2* is really important. You&#39;ve<br>
&gt;     &gt; done half the job ( I thought we&#39;ll take care of it in another patch )<br>
&gt;     &gt;<br>
&gt;     &gt; Now, about the comments in determineFinalResourceData(). The flaw with<br>
&gt;     &gt; our, not so little, proxy removal plan was that if -<br>
&gt;     &gt; Resource r1(&quot;foo&quot;);<br>
&gt;     &gt; r1.determineUri()<br>
&gt;     &gt;<br>
&gt;     &gt; Resource r2( foo&#39;s nie:url );<br>
&gt;     &gt; r2.determineUri() // The proxy thing would be activated ( could be<br>
&gt;     &gt; avoided via 2 )<br>
&gt;     &gt;<br>
&gt;     &gt; Resource r3( foo&#39;s nie:url );<br>
&gt;     &gt; r3.determineUri() // The proxy thing is AGAIN activated as the nie:url<br>
&gt;     &gt; wasn&#39;t added to the list.<br>
&gt;     &gt;<br>
&gt;     &gt; With your patch you seem to have fixed the problem. But I would have<br>
&gt;     &gt; preferred the more concrete solution via 2.<br>
&gt;<br>
&gt;     Agreed.<br>
&gt;<br>
&gt; How about converting them into hash tables instead of lists? That way we<br>
&gt; could easily check if addProperty() or removeProperty() updates any of<br>
&gt; the identifying properties in m_kickOddUri. We could then even<br>
&gt; potentially stop clearing up the cache after ever metadata move<br>
&gt; operation.<br>
<br>
</div>What would the hash contain?<br>
<br></blockquote><div><br>Uhh. What I meant was that we store them in a set instead of a list. It&#39;s a rather trivial thing.<br><br>I guess I&#39;ll start modifying the patch.<br><br>- Vishesh Handa <br></div><div><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>