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