Accessing the Talis platform from Java

6 views
Skip to first unread message

mduke

unread,
Jun 10, 2010, 6:39:03 AM6/10/10
to n2-dev
I need to access the Talis Platform from Java - mainly just submitting
rdf for now, not really looking to do querying so far.

It looks like I should be able to write my own code using for example
using org.apache.comons.httpclient for my simple needs but I expected
someone else might have done this already so I wanted to find out what
I could re-use.

A couple of Talis sites list penry and/or yeti. Penry [1] looks like
it would give me what I need, but it uses some other Talis libraries
e.g. com.talis.http.Response
and I can't work out how to get hold of them. Are they part of Talis'
larger offering and are they easy to get hold of? (I haven't yet found
a simple link to download them from). Yeti does not seem to have had
much use.

A 2007 message on this list mentions Mulgara but that seems to have
developed into a complete separate RDF store product.

I've already spent quite some time trying to locate this information
and have not found it easy to gather even the above, so I am mainly
concerned about whether I am missing something or is that pretty much
it? I'm getting quite frustrated with these seemingly dead-ends and
not sure if this is a failure of my information-finding strategy or
there just isn't much out there (or it is really badly organised/
documented?). Should I cut my losses and write my own stuff (it is
starting to feel like I should have done that from the start)?.

Are there any others using Java out there and what choices have you
made?

Thanks very much for any pointers or experience-sharing.

Monica

[1] http://code.google.com/p/penry/

richard...@3kbo.com

unread,
Jun 10, 2010, 12:36:43 PM6/10/10
to n2-...@googlegroups.com
Hi Monica,

I'm currently using a mix of Groovy and Scala to work with the Talis
platform.

For simple SPARQL queries I find Groovy and Scala less verbose than using
java directly.

"Using Groovy to Upload RDF files to the Talis Platform" (
http://blog.3kbo.com/2010/03/13/groovy-talis-rdf-upload/ ) gives a bit of
background on using the Groovy RESTClient ( which in turn uses the commons
HttpClient) for submitting RDF.

For querying I URLEncode the SPARQL query then parse the SPARQL XML
results, using either the Groovy and the XmlSlurper class or the Scala XML
library (my current favorite).

Hope the above helps,

Cheers,

Richard.


On Thu, 10 Jun 2010 03:39:03 -0700 (PDT), mduke <m.d...@ukoln.ac.uk>
wrote:

Paul Gearon

unread,
Jun 12, 2010, 11:11:27 PM6/12/10
to n2-...@googlegroups.com
On Thu, Jun 10, 2010 at 6:39 AM, mduke <m.d...@ukoln.ac.uk> wrote:
> I need to access the Talis Platform from Java - mainly just submitting
> rdf for now, not really looking to do querying so far.

Jave is one of the most verbose languages around for doing this kind
of thing. As Richard points out, Groovy and Scala have a lot more
going for them when doing this kind of work. Python is particularly
good with this kind of thing, though that's not in the JVM (unless
you're doing Jython).

In the past I've written Java code for uploading data and changesets
to the Talis platform, but it's all been specific to my task at hand.
What I *can* say is that it's more work than I'd have expected (this
is not Talis's fault, but rather it's an issue with Java libraries).

Querying (which you mention that you're not doing yet, and Richard
points out is easy in other languages) is just as hard. A number of
people have talked to me about wanting an API like JDBC for talking to
an RDF store, and despite this being the wrong approach I finally
decided to do one. The main issue here is not the API, but rather the
huge amount of boilerplate code that Java needs to work with this
stuff. Anyway, if you're interested in it for querying you can find it
at:
http://code.google.com/p/jsparqlc/
It's still new and doesn't do any kind of data uploading yet, but it
might prove useful for queries.

> It looks like I should be able to write my own code using for example
> using org.apache.comons.httpclient for my simple needs but I expected
> someone else might have done this already so I wanted to find out what
> I could re-use.
>
> A couple of Talis sites list penry and/or yeti.  Penry [1] looks like
> it would give me what I need, but it uses some other Talis libraries
> e.g. com.talis.http.Response
> and I can't work out how to get hold of them.  Are they part of Talis'
> larger offering and are they easy to get hold of? (I haven't yet found
> a simple link to download them from).  Yeti does not seem to have had
> much use.
>
> A 2007 message on this list mentions Mulgara but that seems to have
> developed into a complete separate RDF store product.

This is my other reason for responding. I work on Mulgara, and it is
completely unrelated to the Talis platform. It's been around under
various names since 2001.

> I've already spent quite some time trying to locate this information
> and have not found it easy to gather even the above, so I am mainly
> concerned about whether I am missing something or is that pretty much
> it?  I'm getting quite frustrated with these seemingly dead-ends and
> not sure if this is a failure of my information-finding strategy or
> there just isn't much out there (or it is really badly organised/
> documented?).  Should I cut my losses and write my own stuff (it is
> starting to feel like I should have done that from the start)?.

If you do, then perhaps you'd consider sharing it as open source code?
That's the point of projects like jSPARQLc. The project itself doesn't
do anything interesting except to save people a lot of work when
talking to a SPARQL endpoint in Java.

> Are there any others using Java out there and what choices have you
> made?

Look for projects that do what you want. If you find one that is
nearly (but not quite) there, then tweak it until it works, and
contribute back. Otherwise, write your own and put it out there for
others to tweak as necessary.

Regards,
Paul Gearon

Monica Duke

unread,
Jun 15, 2010, 9:26:02 AM6/15/10
to n2-...@googlegroups.com
Thanks to both Paul and Richard for responding and for the pointers
which I will follow up. Apologies that I did not give much background
about what I am trying to do and where I am coming from; I assumed the
TALIS folks are familiar enough with our project but I should have kept
the wider community in mind.

> Jave is one of the most verbose languages around for doing this kind
> of thing. As Richard points out, Groovy and Scala have a lot more
> going for them when doing this kind of work. Python is particularly
> good with this kind of thing, though that's not in the JVM (unless
> you're doing Jython).

My work is somewhat specific because the bulk of the application
(written in Java within Spring) is dealing with managing the aggregation
of data from distributed repositories; exposing the date through the
TALIS platform to make them available to the linked data world is only
one aspect of the project, that I am currently working on and which
needs to fit in with the remainder of the project. In one sense we
don't need the querying because part of the motivation to use the TALIS
platform is so that third parties who want access to the data in RDF
form can do that through the TALIS API.

>
> In the past I've written Java code for uploading data and changesets
> to the Talis platform, but it's all been specific to my task at hand.

Hmm, I did end up thinking that it all felt harder than it should, hence
wondering if I was missing something obvious. Thanks for sharing your
experience.

> stuff. Anyway, if you're interested in it for querying you can find it
> at:
> http://code.google.com/p/jsparqlc/
> It's still new and doesn't do any kind of data uploading yet, but it
> might prove useful for queries.

Thanks.


>> A 2007 message on this list mentions Mulgara but that seems to have
>> developed into a complete separate RDF store product.
>
> This is my other reason for responding. I work on Mulgara, and it is
> completely unrelated to the Talis platform. It's been around under
> various names since 2001.

Ok thank for clarifying that.


>
>> I've already spent quite some time trying to locate this information
>> and have not found it easy to gather even the above, so I am mainly
>> concerned about whether I am missing something or is that pretty much
>> it? I'm getting quite frustrated with these seemingly dead-ends and
>> not sure if this is a failure of my information-finding strategy or
>> there just isn't much out there (or it is really badly organised/
>> documented?). Should I cut my losses and write my own stuff (it is
>> starting to feel like I should have done that from the start)?.
>
> If you do, then perhaps you'd consider sharing it as open source code?

The project is funded by JISC so we are committed to sharing code. If I
come up with anything that is not too specific and is robust enough I
will share. At a minimum I should try to write up a blog entry
describing my journey because one of the frustrations for me seemed to
be that there wasn't much information out there or it was hard to find.

Thanks again to both you and Richard for your help,
Monica

Reply all
Reply to author
Forward
0 new messages