[Nepomuk] Queries not working as expected

Vishesh Handa handa.vish at gmail.com
Mon Jun 7 16:01:18 CEST 2010


Hey Sebastian

On Mon, Jun 7, 2010 at 5:34 PM, Sebastian Trüg <trueg at kde.org> wrote:

> This is totally normal since we have no proper inference support yet. So
> please please just do as I say and use the query api. ;)
>
>
You have finally given me a reason to use the query API. :) Isn't inference
something the backend should provide?

- Vishesh Handa

This is what you do:
>
> Query::Query query(
>    Query::ResourceTypeTerm( Vocabulary::NFO::Image() ) );
>
> and then query.toSparqlString()
>
> or simply use the QueryServiceClient. Or even simpler in case you are
> using KIO: query.toQueryUrl() and list that via KDirModel or a KDirLister.
>
> Cheers,
> Sebastian
>
> On 06/07/2010 12:40 PM, Alessandro Diaferia wrote:
> > Hello list,
> > as already discussed with Vishesh some minutes ago there seems to be a
> > problem with the following SPARQL query:
> >
> > "select ?url where { ?resource nie:url ?url . ?resource a nfo:Image . }"
> >
> > This query returns less results than it should, skipping for example png
> > files.
> > In particular, as noticed by Vishesh, replacing nfo:Image with
> > nfo:RasterImage or nexif:Photo works fine.
> > Shouldn't nfo:Image cover all types of pictures?
> >
> > My particular code is here: http://pastebin.com/TVj6HJGx
> >
> > Also, is there a way to perform the same query using the API rather than
> > plain SPARQL?
> >
> > Regards
> >
> > --
> > Alessandro Diaferia
> > KDE Developer
> > KDE e.V. member
> >
> >
> >
> > _______________________________________________
> > Nepomuk mailing list
> > Nepomuk at kde.org
> > https://mail.kde.org/mailman/listinfo/nepomuk
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20100607/73d218e2/attachment.htm 


More information about the Nepomuk mailing list