[Nepomuk] Queries not working as expected

Sebastian Trüg trueg at kde.org
Mon Jun 7 14:04:08 CEST 2010


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. ;)

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


More information about the Nepomuk mailing list