Re: Re: Re: SPARQL QUERY STRING VARIABLES

2014-02-25 Thread Chris Dollin
On Monday, February 24, 2014 05:57:17 PM Nagore Salaberria wrote: I've tried what you mention me ... and does not work me. Be specific. What did you do and what happened? Was there a compiler error? Did it compile but throw an exception when you ran it? Or did it successfully produce the wrong

Re: Re: Re: SPARQL QUERY STRING VARIABLES

2014-02-25 Thread Nagore Salaberria
What occurs to me is that the query does not give me any results because the String does not appear in quotes and then not interpreted. This is the query that generates me with* System.err.println(querys)*command : PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# PREFIX gr:

Re: Re: Re: SPARQL QUERY STRING VARIABLES

2014-02-25 Thread Nagore Salaberria
Rob, I might give an example to see how to insert the class ParameterizedSparqlString, I've been looking at examples but none puts you where in the place it method. Thank you, Nagore. 2014-02-25 10:29 GMT+01:00 Nagore Salaberria nagore...@gmail.com: What occurs to me is that the query does

Re: SPARQL query string variables

2014-02-25 Thread Chris Dollin
On Tuesday, February 25, 2014 10:29:32 AM Nagore Salaberria wrote: and the parameters are: *FILTER (regex(str(?g),+a+)) .* as you could add to that variable quotes? As I said earlier, write a quote() method and then call it in the appropriate places: \nFILTER (regex(str(?g), +

Re: SPARQL query string variables

2014-02-25 Thread Nagore Salaberria
and what is the quoate() method? 2014-02-25 11:49 GMT+01:00 Chris Dollin chris.dol...@epimorphics.com: On Tuesday, February 25, 2014 10:29:32 AM Nagore Salaberria wrote: and the parameters are: *FILTER (regex(str(?g),+a+)) .* as you could add to that variable quotes? As I said

Re: Re: SPARQL query string variables

2014-02-25 Thread Chris Dollin
On Tuesday, February 25, 2014 11:55:00 AM Nagore Salaberria wrote: and what is the quoate() method? I told you how to write it in a previous post. Chris -- People are part of the design. It's dangerous to forget that. /Star Cops/ Epimorphics Ltd, http://www.epimorphics.com Registered

Re: SPARQL QUERY STRING VARIABLES

2014-02-25 Thread Rob Vesse
See the staged documentation at http://jena.staging.apache.org/documentation/query/parameterized-sparql-str ings.html Rob On 25/02/2014 09:45, Nagore Salaberria nagore...@gmail.com wrote: Rob, I might give an example to see how to insert the class ParameterizedSparqlString, I've been looking at

Re: SPARQL query string variables

2014-02-25 Thread Rob Vesse
We are not going to do your project for you! Btw Chris actually gave you an example implementation of this method further back in the email thread if you'd actually been paying attention Rob On 25/02/2014 10:55, Nagore Salaberria nagore...@gmail.com wrote: and what is the quoate() method?

Re: SPARQL QUERY STRING VARIABLES

2014-02-25 Thread Nagore Salaberria
Excuse me why Chris had misunderstood your explanation on quote () method, it works well indeed, thank you! Regards, Nagore. 2014-02-25 12:23 GMT+01:00 Rob Vesse rve...@dotnetrdf.org: See the staged documentation at http://jena.staging.apache.org/documentation/query/parameterized-sparql-str

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Andy Seaborne
On 24/02/14 15:39, Nagore Salaberria wrote: hello, I am running my input SPARQL query and you want to insert two and two intenger and String. The problem I have with the introduction of variables the type String, once I run it gives me the following error: *Exception in thread main

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Chris Dollin
On Monday, February 24, 2014 04:39:14 PM Nagore Salaberria wrote: This is my code: *public class rodillos {* *public static void main(String args[])* * {* * try {* * sparqlTest3( Elite AL13 Roller ,Rodillo,200,300 );* * } catch (UnsupportedEncodingException e) {* * // TODO

SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Nagore Salaberria
hello, I am running my input SPARQL query and you want to insert two and two intenger and String. The problem I have with the introduction of variables the type String, once I run it gives me the following error: *Exception in thread main com.hp.hpl.jena.query.QueryParseException: Lexical error

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Nagore Salaberria
forgive me if the message is not well understood, here are the file so you can better see the code. 2014-02-24 16:46 GMT+01:00 Andy Seaborne a...@apache.org: On 24/02/14 15:39, Nagore Salaberria wrote: hello, I am running my input SPARQL query and you want to insert two and two intenger

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Nagore Salaberria
I donĀ“t understand Chris, you can put me an example so you can see better. Thank You, Nagore. 2014-02-24 16:52 GMT+01:00 Nagore Salaberria nagore...@gmail.com: forgive me if the message is not well understood, here are the file so you can better see the code. 2014-02-24 16:46 GMT+01:00

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Rob Vesse
FYI attachments are not permitted on this list What Chris and Andy are suggesting is that you print out your string after constructing it e.g. System.out.println(querys); Secondly if you follow their suggestions and add new lines to your query the error message will point you more directly to

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Nagore Salaberria
The problem is that when the variables of type String get well, they need some quotes and to insert them into the query as + b + does not know how to attach the quotes. \n FILTER (regex(str(?g),*+g+*)) . + is \n FILTER (regex(str(?g),Rodillo)) . + and shourd be: \n FILTER

Re: SPARQL QUERY STRING VARIABLES

2014-02-24 Thread Rob Vesse
Or even better use ParameterizedSparqlString to build your queries and insert parameters - http://jena.apache.org/documentation/query/parameterized-sparql-strings.htm l Rob On 24/02/2014 16:55, Chris Dollin chris.dol...@epimorphics.com wrote: On Monday, February 24, 2014 05:37:10 PM Nagore