<div class="gmail_quote">2009/12/13 Sebastian Trueg <span dir="ltr">&lt;<a href="mailto:trueg@kde.org" target="_blank">trueg@kde.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


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

<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">select distinct ?label count (?tag) where { ?r nao:hasTag ?tag . ?r nie:url ?url . ?tag nao:prefLabel ?label . FILTER(REGEX(STR(?url), &#39;^file:///some/path&#39;)) }</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">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 :)</span></div>

<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">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)...</span></div>

</div>
<br>-- <br>Sivieri Alessandro<br><a href="mailto:alessandro.sivieri@gmail.com" target="_blank">alessandro.sivieri@gmail.com</a><br><a href="http://www.chimera-bellerofonte.eu/" target="_blank">http://www.chimera-bellerofonte.eu/</a><br>

<a href="http://www.poul.org/" target="_blank">http://www.poul.org/</a><br>