Just to add I tried to use: jena-arq-2.11.0.jar as it supports SPARQL
1.1 (http://mvnrepository.com/artifact/org.apache.jena/jena-arq/2.11.0).
However as I am new to Java therefore I am not getting how can I load
data into Jena using this jar file, also how can I query this jar file
just like with jena-tdb-0.9.0-incubating I use ./bin/tdbquery --time
--loc=/home/jenaTestDatabase/ "./bin/tdbquery
--time --loc=/home/jenaTestDatabase/ "select ?a?c?c1 (log(?c1)+(2^?c)
as ?score) where{ graph ?j1{?a <http://dbpedia.org/b> ?c. ?a
<http://dbpedia.org/b> ?c1} }"

Can someone please help me with this too. Possibly an example can be a
great starting point for new users like me. I'll be very grateful to
you for the same.

On Tue, Mar 10, 2015 at 3:00 AM, Rose Beck <[email protected]> wrote:
> Dear all,
>
> I have data of the following form (File name: test.nq):
> <http://dbpedia.org/a> <http://dbpedia.org/b>
> "200"^^<http://www.w3.org/2001/XMLSchema#integer>
> <http://dbpedia.org/id_1> .
> <http://dbpedia.org/a> <http://dbpedia.org/b1>
> "200"^^<http://www.w3.org/2001/XMLSchema#integer>
> <http://dbpedia.org/id_3> .
> <http://dbpedia.org/a> <http://dbpedia.org/b2>
> <http://dbpedia.org/data/Plasmodium_hegneri.xml>
> <http://dbpedia.org/id_5> .
>
> I loaded the data using:
> ~/jena-tdb-0.9.0-incubating/bin/tdbloader
> --loc=/home/jenaTestDatabase/ -v /home/test.nq
>
> And am querying it using:
> ./bin/tdbquery --time --loc=/home/jenaTestDatabase/ "./bin/tdbquery
> --time --loc=/home/jenaTestDatabase/ "select ?a?c?c1 (log(?c1)+(2^?c)
> as ?score) where{ graph ?j1{?a <http://dbpedia.org/b> ?c. ?a
> <http://dbpedia.org/b> ?c1} }"
>
> That is I want to take the logarithm to base 10 of bindings of ?c1 and
> raise the bindings of ?c to power of 2. Is it possible to achieve the
> same using Jena? Probably I am missing the syntax of SPARQL 1.1. Can
> someone please help me with -- as to how can I write the above query?
>
> --
> With Warm Regards,
> Rose
> Researcher



-- 
With Warm Regards,
Rose

Reply via email to