[Nepomuk] Segfault on QueryParser

Alessandro Sivieri alessandro.sivieri at gmail.com
Sun Dec 13 20:43:17 CET 2009


2009/12/13 Sebastian Trueg <trueg at kde.org>

> this is completely unrelated to the crash but why don't you create
> ComparisonTerms directly here? After all you can just do:
>
>  ComparisonTerm( NAO::hasTag(), LiteralTerm( list[i] ) );
>
> And it will result in a query like
>
>  ?r nao:hasTag ?t . ?t rdfs:label ?l . ?l bif:contains "foobar" .
>
>
Yes, I have modified the code just after sending you the original email, and
the app worked, so I will continue to use it...
And about the query for getting all the tags:

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

-- 
Sivieri Alessandro
alessandro.sivieri at gmail.com
http://www.chimera-bellerofonte.eu/
http://www.poul.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20091213/3867d6a5/attachment.htm 


More information about the Nepomuk mailing list