Unmerging Instant messaging contacts
authorAleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
Thu, 16 Dec 2010 09:12:24 +0000 (11:12 +0200)
committerAleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
Thu, 16 Dec 2010 09:12:24 +0000 (11:12 +0200)
commit220d4b2715722bd380e3b8c9807f7dfa541505cf
treee979500ca417078de54cb64c7e123e8e80a5c925
parentc5e68f8d29a1268c75533759898f7e9e611d5eea
Unmerging Instant messaging contacts

Unfortunatelly,m not able to write generic move from one graph to another query.
asked tracker guys about the problem with query:
tracker-sparql -qu "INSERT { <affiliation:123> a nco:Affiliation. <contact:123> a nco:PersonContact;  nco:contactLocalUID '123';  nco:nameGiven 'name123';  nco:nameFamily 'familyname123'; nco:hasAffiliation <affiliation:123>.}"
Done
tracker-sparql -q "select ?p ?v { <contact:123> ?p ?v . FILTER (EXISTS {?v a ?r}) }"
Results:
  http://www.semanticdesktop.org/ontologies/2007/03/22/nco#contactLocalUID, 123

Full query that doesnt work would go something like this:
         tracker-sparql -u -q
         'INSERT INTO </org/freedesktop/fake/account/555!555@ovi.com> {
         <contact:1234> a nco:PersonContact;
            ?p ?v }
         WHERE { <contact:555> ?p ?v.{ GRAPH </org/freedesktop/fake/account/555!555@ovi.com> { ?v a ?v1 } }.
         }'
generic query ?v a ?v1 doesnt work (whether it is in graph or not), so forced to hardcode unmerging, only to support IM address copying.
12 files changed:
src/engine/contactsaverequest.h
src/engine/contactunmergerequest.cpp [new file with mode: 0644]
src/engine/contactunmergerequest.h [new file with mode: 0644]
src/engine/engine.cpp
src/engine/engine.pro
src/lib/lib.pro
src/lib/metatypedcontactdetail_p.h [new file with mode: 0644]
src/lib/unmergeimcontactsrequest.cpp [new file with mode: 0644]
src/lib/unmergeimcontactsrequest.h [new file with mode: 0644]
tests/ut_qtcontacts_trackerplugin/data/insertTpContact.sparql
tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.cpp
tests/ut_qtcontacts_trackerplugin/ut_qtcontacts_trackerplugin.h