I would agree with Sebastian. Passing list of identification properties as parameter will increase flexibility. To take best from the both worlds we can provide a default argument for this parameter,  that will be expanded to the pre-defined list of identifying properties ( stored e.g. in some other ontology or somewhere else ).<br>

 This also have an advantage that when we face issuses like &quot;Which of  identifying properties is more identifying then the others ?&quot; we can easily add more parameters to solve it to function signatures instead of constantly hacking  ontology( which is, by the way, a standard and must not be changed very often).<br>

<br><div class="gmail_quote">On Wed, Jul 27, 2011 at 11:16 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

How about another parameter instead which specifies these kind of<br>
properties in a list. Then a client can define what makes sense.<br>
<br>
Just an idea...<br>
<br>
Cheers,<br>
<font color="#888888">Sebastian<br>
</font><div class="im"><br>
On 07/27/2011 04:53 PM, Vishesh Handa wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Jul 27, 2011 at 8:13 PM, Sebastian Trüg &lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a><br>
</div><div><div></div><div class="h5">&gt; &lt;mailto:<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     could you please elaborate on the need of a primary key type of<br>
&gt;     property. Give an example maybe...<br>
&gt;<br>
&gt;<br>
&gt; Of course<br>
&gt;<br>
&gt; Imagine I already have a contact in my repo -<br>
&gt;<br>
&gt; &lt;nepomuk:/res/somecontact&gt;<br>
&gt;     a nco:PersonContact ;<br>
&gt;     nco:fullName &quot;Some name&quot; ;<br>
&gt;     nco:hasEmailAddress &lt;someEmailRes&gt; .<br>
&gt;<br>
&gt; Now I decide to push some data using storeResources<br>
&gt;<br>
&gt; SimpleResource res;<br>
&gt; res.addType( NCO::PersonContact() );<br>
&gt; res.addProperty( NCO::hasEmailAddress(), QUrl(&quot;someEmailRes&quot;) );<br>
&gt; res.addProperty( NCO::fullName(), QLatin1String(&quot;Some other name&quot;) );<br>
&gt;<br>
&gt; This contact would normally not get identified as<br>
&gt; &lt;nepomuk:/res/somecontact&gt; as it has a different first name. However,<br>
&gt; two people can never have the same email address, so in this case it<br>
&gt; *should* get identified as &lt;nepomuk:/res/somecontact&gt;. ( Merging would<br>
&gt; obviously fail, but that is another issue, we could be using<br>
&gt; OverwriteProperties )<br>
&gt;<br>
&gt; If we marked nco:hasEmailAddress as Globally Unique, then the SimpleRes<br>
&gt; would get mapped to &lt;nepomuk:/res/somecontact&gt; as the email matches.<br>
&gt;<br>
&gt; Same is the case for nfo:hashValue<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     On 07/27/2011 04:26 PM, Vishesh Handa wrote:<br>
&gt;     &gt; Hey Everyone<br>
&gt;     &gt;<br>
&gt;     &gt; Martin and I were discussing storeResources yesterday, and we stumbled<br>
&gt;     &gt; on the need to have certain properties act as Primary Keys for<br>
&gt;     &gt; Resources. Currently, storeResources treats the nie:url as a Primary<br>
&gt;     &gt; Key, only if the nie:url is not present does it use the literal<br>
&gt;     &gt; identification scheme ( read datamanagement.h for more info )<br>
&gt;     &gt;<br>
&gt;     &gt; With Martin working on pimo:Person and nco:PersonContact<br>
&gt;     aggregation, he<br>
&gt;     &gt; requires the nco:hasEmailAddress to act as a Primary Key.<br>
&gt;     Additionally I<br>
&gt;     &gt; would like nfo:hashValue to act as one. So now that we have 3<br>
&gt;     &gt; contenders, it makes sense to mark these properties in the<br>
&gt;     ontologies as<br>
&gt;     &gt; globally identifying or something.<br>
&gt;     &gt;<br>
&gt;     &gt; What do you guys think? If you approve, can you suggest a way to mark<br>
&gt;     &gt; these properties?<br>
&gt;     &gt;<br>
&gt;     &gt; One option is that we have a nxx:globalIdentifyingProperty, and make<br>
&gt;     &gt; nie:url, nco:hasEmailAddress, and nfo:hashValue subclasses of it.<br>
&gt;     &gt;<br>
&gt;     &gt; --<br>
&gt;     &gt; Vishesh Handa<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Vishesh Handa<br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sincerely yours,<br>Artem Serebriyskiy<br>