maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [SFOS+M6] Tracker-Sparql: get contacts and avatar (https://talk.maemo.org/showthread.php?t=96112)

chrm 2015-10-29 11:17

Tracker-Sparql: get contacts and avatar
 
Hi!

I need little help with sparql.
The goal is to find all contacts with picture which has also an xmpp address.

This works fine:

Code:

$ tracker-sparql -q "SELECT ?contact  ?xmpp  ?name ?family ?foto WHERE {
?contact  a nco:PersonContact . ?contact nco:nameGiven ?name . ?contact nco
:nameFamily ?family . ?contact nco:photo ?foto . ?contact  nco:hasAffiliation [ 
nco:hasIMAddress ?xmpp ] . }"

But it returns the foto as UUID.
I can then find the URI using a second select:

Code:

$ tracker-sparql -q "SELECT ?url { <urn:uuid:fe0c906f-7d4d-82fe-56d1-
cc3eb1357531> nie:url ?url }"

Results:
  file:///home/user/.local/share//data/libqtcontacts-
tracker/photos/a81a95e4e932cfd9e7a564144f849d48f7f8c423.png

Is there a way to get the picture URI with only one select?

Thanks!


All times are GMT. The time now is 10:28.

vBulletin® Version 3.8.8