[Kde-pim] Akonadi collections

Tobias König tokoe at kde.org
Mon Sep 13 10:14:34 BST 2010


On Saturday 11 September 2010 22:43:25 Robin Atwood wrote:
Hej Robin,

> > Thanks again Kevin, you are a mine of information! I have already found
> > unnerving references to something called SPARQL! Onwards and upwards...
> 
> I will change the subject since I can now find all the apidocs. My app is
> launched when someone clicks on a phone number in the right-hand pane of the
> address book. I now want to match the number to an addressee to get their
> name, etc.
So just use the Akonadi::ItemSearchJob as Kevin already suggested.
The needed SparQL query is:

SELECT ?person WHERE {
  ?person 	
<http://www.semanticdesktop.org/ontologies/2007/03/22/nco#hasPhoneNumber> 
?number .
  ?number 
<http://www.semanticdesktop.org/ontologies/2007/03/22/nco#phoneNumber> 
"%1"^^<http://www.w3.org/2001/XMLSchema#string> .
 }

where %1 must be replaced with the phone number you are looking for.

Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100913/5c419947/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list