You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by ch...@gmx.de on 2011/05/18 14:34:28 UTC

Bug/Problem with QueryFactory.parse

Hi,
I am currently finishing the work of someone else which also includes a QueryEngine and a Rewrite of queries (basicly adding a FILTER-statement). The adding-part works fine and does exactly as expected. When I rewrite the query SELECT ?x ?y ?z WHERE {?x ?y ?z} I get SELECT ?x ?y ?z WHERE {?x ?y ?z . FILTER restOfFilter}
However, when I take this query and send the same request for rewriting I get
an alteration of the FILTER that is in the original Query send. Here is the beginning of the original Filter (first one) and the correct FILTER, that has been added :

FILTER ( ( ( isLiteral(?x) || ( ( ( ! isBlank(?x) ) && isIRI(?x) )

FILTER ( ( ( isLiteral(?x) || ( ( ! isBlank(?x) ) && ( isIRI(?x)

But it should really be the same FILTER statement twice. If tracked down the problem to the line:

_query = QueryFactory.parse(_query, _queryQurrent, null, null);

This is, where the alteration occurs. Another weird thing is, that it does not occur with other queries, that went through the same process.

I have no clue, why this happens, so I hope someone can help me with this.
Thanks in advance.
Sincerely
Christian Pechhold

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
Jetzt informieren: http://www.gmx.net/de/go/freephone

Re: Bug/Problem with QueryFactory.parse

Posted by Andy Seaborne <an...@epimorphics.com>.

On 18/05/11 13:34, christian.pechhold@gmx.de wrote:
> Hi, I am currently finishing the work of someone else which also
> includes a QueryEngine and a Rewrite of queries (basicly adding a
> FILTER-statement). The adding-part works fine and does exactly as
> expected. When I rewrite the query SELECT ?x ?y ?z WHERE {?x ?y ?z} I
> get SELECT ?x ?y ?z WHERE {?x ?y ?z . FILTER restOfFilter} However,
> when I take this query and send the same request for rewriting I get
> an alteration of the FILTER that is in the original Query send. Here
> is the beginning of the original Filter (first one) and the correct
> FILTER, that has been added :
>
> FILTER ( ( ( isLiteral(?x) || ( ( ( ! isBlank(?x) )&&  isIRI(?x) )
>
> FILTER ( ( ( isLiteral(?x) || ( ( ! isBlank(?x) )&&  ( isIRI(?x)
>
> But it should really be the same FILTER statement twice. If tracked
> down the problem to the line:
>
> _query = QueryFactory.parse(_query, _queryQurrent, null, null);
>
> This is, where the alteration occurs. Another weird thing is, that it
> does not occur with other queries, that went through the same
> process.
>
> I have no clue, why this happens, so I hope someone can help me with
> this. Thanks in advance. Sincerely Christian Pechhold
>


Without seeing the rest of the query, I can only guess but is the code 
reading and updating the same Query object at the same time in some way? 
  It might be that parsing/printing has a bug but without a complete, 
minimal example, I can't investigate.

What's the version number of ARQ?

	Andy