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:
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
> 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