I have had some problems with a very old ARQ library version I am stuck
with.
The parser was not understanding some SPARQL1.1 statements.

Andy proposed to upgrade ARQ to the latest version.
Or to send the query directy via HTTP without using the Jena helpful
functions.
I took the second option.
My code went from this:
Query query = QueryFactory.create(queryString);
QueryExecution qexec = QueryExecutionFactory.sparqlService(service, query);
ResultSet resultSet = qexec.execSelect();

to this:
QueryExecution qexec = new QueryEngineHTTP(service, queryString);
ResultSet resultSet = qexec.execSelect();


Hope it helps...



On Thu, Apr 10, 2014 at 10:31 AM, Damian Steer <d.st...@bris.ac.uk> wrote:

> On 10/04/14 06:15, Anila Sahar Butt wrote:
> > PREFIX csiro:<http://au.csiro.browser#>
> > PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
> > PREFIX owl:<http://www.w3.org/2002/07/owl#>
> > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> >
> > SELECT ?property ?propLabel ?range ?rangeLabel
> > WHERE {{{<http://xmlns.com/foaf/0.1/Agent> rdfs:subClassOf+ ?res. ?res
> > owl:onProperty ?property.} UNION {{<http://xmlns.com/foaf/0.1/Agent>
> > rdfs:subClassOf+ ?class. ?property rdfs:domain ?class.} UNION {?property
> > rdfs:domain <http://xmlns.com/foaf/0.1/Agent>}} } {{?res ?resProp
> > ?range.FILTER ((?resProp = owl:allValuesFrom) || (?resProp =
> > owl:someValuesFrom) )} UNION {?property rdfs:range ?range.}} OPTIONAL
> > {?property rdfs:label ?propLabel.} Optional {?range rdfs:label
> > ?rangeLabel.}}
>
> I just tried this using the sparql.org validator (which uses jena) and
> it's fine.
>
> What error are you getting?
>
> Damian
>

Reply via email to