[Nepomuk] Segfault on QueryParser

Sebastian Trueg trueg at kde.org
Mon Dec 14 08:56:05 CET 2009


Alessandro Sivieri wrote:
> select distinct ?label count (?tag) where { ?r nao:hasTag ?tag . ?r
> nie:url ?url . ?tag nao:prefLabel ?label . FILTER(REGEX(STR(?url),
> '^file:///some/path')) }
> 
> about which we discussed some days ago: in this form is perfect, but
> when some tags are selected by the user, I have to add those to it, so
> the new query will select only those tags belonging to all the resources
> which are already tagged with the selected ones... and I think it will
> become a mess :)
> So maybe I really have to find out a way to use the Query API for it,
> too, because the resulting code would be more polished (in fact, it
> would only need to add more ComparisonTerm objects)...

Hm, maybe we can come up with some solution. After all you select tags,
thus, the label could be set as a requestProperty. Then we only have the
count. And like I said: I would be willing to add a method for that. The
only question is: a new method or a flag?

So do we want:

query.toSparqlQuery( CountQuery );

or

query.toSparqlCountQuery();

?

Cheers,
Sebastian


More information about the Nepomuk mailing list