Discussion:
[d2rq-dev] bundling d2rq and SDB data sources as a sparql service. [SEC=UNCLASSIFIED]
Paul Murray
2015-03-02 04:07:29 UTC
Permalink
OMG! OMG! It works! It works!
I spoke too soon. But - I believe that I have success, finally, even if I am a bit more cautions now about declaring it

Of course, it's version problem. TDB 0.8.10 works against ARQ 2.8.8, d2rq uses arq 2.9

Happily, TDB 0.9.0-incubating works against ARQ 2.9.

To run Joseki as a stand-alone sparql service and bundle together TDB, D2R, and static files, hack up the classpath. The classpath should include

* All of the d2rq jars
* jetty-6.1.25.jar and jetty-util-6.1.25.jar from the Joseki lib directory
* jena-tdb-0.9.0-incubating.jar

Launch

java -server -Xmx2G -cp "$CP" -Dlog4j.configuration=etc/log4j.properties joseki.rdfserver --port 8081 config.ttl

Or something like it.
Paul Murray
2015-03-03 02:18:49 UTC
Permalink
Success!

As I have been pestering this list about my work, I thought it might be nice to tell you how it has turned out.

Our SPARQL service lives at http://biodiversity.org.au/sparql
There is a basic HTML page backed by it at http://biodiversity.org.au/dataexport/html/NSL_SPARQL.html

I haven't updated this page yet, so it does not have examples relating to the new dataset, but it does have plenty of @prefix declarations whic we will want :) .

In any case, lets take this query:

select *
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> ?p ?o
}
}
ORDER BY ?p
limit 50

Now, the URI above is an old-style URI (the weird format is to make it compatible with LSIDs). Most of the triples in the results come from a TDB dataset named JAN2015_APNI . However, there's one triple - http://biodiversity.org.au/voc/boa/BOA#mapsTo - which is pulled from the database. It indicates the new URI for the name, now that we have moved over to the new system.

Consequently, one can write

select *
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> <http://biodiversity.org.au/voc/boa/BOA#mapsTo> ?newId .
?newId ?p ?o .
}
}
ORDER BY ?p
limit 50

To get the new content live from the database (well, from our test database, but whatever) using the old id. And we can union the data together:

select ?p ?o
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> <http://biodiversity.org.au/voc/boa/BOA#mapsTo> ?newId .
{
{<http://biodiversity.org.au/apni.name/2242> ?p ?o }
union
{ ?newId ?p ?o . }
}
}
}
ORDER BY ?p ?o
limit 50

So, it's all pretty good.
Richard Cyganiak
2015-03-03 10:02:55 UTC
Permalink
Congrats! Glad you got it to work! Hope that performance is acceptable with this setup.

Richard
Post by Paul Murray
Success!
As I have been pestering this list about my work, I thought it might be nice to tell you how it has turned out.
Our SPARQL service lives at http://biodiversity.org.au/sparql
There is a basic HTML page backed by it at http://biodiversity.org.au/dataexport/html/NSL_SPARQL.html
select *
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> ?p ?o
}
}
ORDER BY ?p
limit 50
Now, the URI above is an old-style URI (the weird format is to make it compatible with LSIDs). Most of the triples in the results come from a TDB dataset named JAN2015_APNI . However, there's one triple - http://biodiversity.org.au/voc/boa/BOA#mapsTo - which is pulled from the database. It indicates the new URI for the name, now that we have moved over to the new system.
Consequently, one can write
select *
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> <http://biodiversity.org.au/voc/boa/BOA#mapsTo> ?newId .
?newId ?p ?o .
}
}
ORDER BY ?p
limit 50
select ?p ?o
where {
graph g:all {
<http://biodiversity.org.au/apni.name/2242> <http://biodiversity.org.au/voc/boa/BOA#mapsTo> ?newId .
{
{<http://biodiversity.org.au/apni.name/2242> ?p ?o }
union
{ ?newId ?p ?o . }
}
}
}
ORDER BY ?p ?o
limit 50
So, it's all pretty good.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
d2rq-map-devel mailing list
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
Loading...