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 <[email protected]>:

> 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" <[email protected]> wrote:
>
> >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 <[email protected]>:
> >
> >> 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: <
> >> http://purl.org/goodrelations/v1#>  PREFIX xsd: <
> >> http://www.w3.org/2001/XMLSchema#>
> >> SELECT * WHERE {
> >>  ?x a gr:Offering  .
> >>  ?x gr:includes ?m .
> >>  ?m gr:name ?z .
> >>  ?m gr:quantitativeProductOrServiceProperty  ?s .
> >>  ?s gr:hasValue  ?g .
> >>  FILTER (regex(str(?g),Elite AL13 Roller)) .
> >>  ?m gr:quantitativeProductOrServiceProperty  ?ñ.
> >>  ?ñ gr:hasValue ?h .
> >>  FILTER (regex(str(?h),Rodillo)) .
> >>  ?x gr:hasPriceSpecification ?ps .
> >>  ?ps gr:hasCurrencyValue ?p .
> >>  FILTER(?p >= 200 && ?p <= 300 ) . }
> >>
> >>
> >> and should be :
> >>
> >> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  PREFIX gr: <
> >> http://purl.org/goodrelations/v1#>  PREFIX xsd: <
> >> http://www.w3.org/2001/XMLSchema#>
> >> SELECT * WHERE {
> >>  ?x a gr:Offering  .
> >>  ?x gr:includes ?m .
> >>  ?m gr:name ?z .
> >>  ?m gr:quantitativeProductOrServiceProperty  ?s .
> >>  ?s gr:hasValue  ?g .
> >>  *FILTER (regex(str(?g),"Elite AL13 Roller")) .*
> >>  ?m gr:quantitativeProductOrServiceProperty  ?ñ.
> >>  ?ñ gr:hasValue ?h .
> >> * FILTER (regex(str(?h),"Rodillo")) .*
> >>  ?x gr:hasPriceSpecification ?ps .
> >>  ?ps gr:hasCurrencyValue ?p .
> >>  FILTER(?p >= 200 && ?p <= 300 ) . }
> >>
> >> and the parameters are:
> >>
> >> *FILTER (regex(str(?g),"+a+")) .*
> >>
> >> as you could add to that variable quotes?
> >>
> >>
> >> Thank you,
> >> Nagore.
> >>
> >>
> >>
> >>
> >> 2014-02-25 9:46 GMT+01:00 Chris Dollin <[email protected]>:
> >>
> >> 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 answer?
> >>>
> >>> "Does not work" doesn't give us much to go on.
> >>>
> >>> Chris
> >>>
> >>> --
> >>> "We are on the brink of a new era, if only --"          /The Beiderbeck
> >>> Affair/
> >>>
> >>> Epimorphics Ltd, http://www.epimorphics.com
> >>> Registered address: Court Lodge, 105 High Street, Portishead, Bristol
> >>> BS20 6PT
> >>> Epimorphics Ltd. is a limited company registered in England (number
> >>> 7016688)
> >>>
> >>>
> >>
> >>
> >> --
> >> Nagore Salaberria<[email protected]>
> >>
> >
> >
> >
> >--
> >Nagore Salaberria<[email protected]>
>
>
>
>
>


-- 
Nagore Salaberria<[email protected]>

Reply via email to