On 20/05/11 22:54, Yogi Aryadinata wrote:

Thanks for your rapid response...

For the example,
I have do this query in my endpoint server "OpenRDF Workbench 2.3.1"..

This is the jena users list - this is a Sesame question as it's the server that is not supporting COUNT. They have their own mailing lists.

But the answer is that Sesame 2.3.1 does not have support for SPARQL 1.1. Only the very recent release of 2..4.0 has any SPARQL 1.1 support.

2.3.1 is quite old anyway (2010-02).

Jena parses the query locally before sendning to check for error but it is the SPARQL 1.1 parser so it lets through the query then the server rejects it.

        Andy


String queryStrAtt =
"SELECT (COUNT(?p) AS ?nbRows)
WHERE
{
?s<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://purl.org/ontology/mo/Record>.
?s ?p ?o
}"

Query queryAtt =
QueryFactory.create(queryStrAtt,Syntax.defaultQuerySyntax);
QueryExecution qeAtt =
QueryExecutionFactory.sparqlService("http://xxxx/openrdf-sesame/repositories/xxxx";,
  queryAtt);

ResultSet nbRows = qe.execSelect();

All i want to do is to count the total of rows of my datasets RDF, which
is in the resource "Record"...

And the problem is, the server doesnt know the function "COUNT"...
How is the solution for this?

Regards,
YougyZ



________________________________
De : Andy Seaborne<[email protected]>
À : yougyz_19<[email protected]>
Envoyé le : Ven 20 mai 2011, 23h 21min 19s
Objet : Re: [Newbie] How to use function "COUNT" in ARQ 2.8.7 ?

Please send questions to the user list.

Also note:

----------
The Jena user list is moving to Apache.
The list name is 'jena-users' and the mail server is 'incubator.apache.org'.
----------

     Andy

On 20/05/11 20:53, yougyz_19 wrote:
Thanks for the info.. I will try to use 2.8.8 later... :)

For example,

I have do this query in my endpoint server "OpenRDF Workbench 2.3.1"..

SELECT (COUNT(?p) AS ?sum)
WHERE
{
?s<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://purl.org/ontology/mo/Record>.
?s ?p ?o
}

All i want to do is to count the total of rows of my datasets RDF, which is in
the resource "Record"...

And the problem is, the server doesnt know the function "COUNT"...
How is the solution for this??

Regards,
YougyZ

Reply via email to