After an earlier blog post presenting a couple of short examples in queries about publicly sourced media ownership information, using SPARQL with DBpedia, I’ve been taking a closer look at options available for using SPARQL with the Ruby programming language.
Not many of the options for RDF and SPARQL support in Ruby have been actively maintained. For a rudimentary approach, I took at look at using the roqet command line tool from the librdf Rasqal project. In a preliminary study, using SPARQL queries illustrated with links from that earlier blog post, the roqet tool was not returning any results from DBpedia. The same queries seemed to work out, with the online SPARQL inteface at DBpedia on the Web. While it would be possible to debug that further, perhaps there may be another approach possible.
Perhaps it’s been a few years since the Semantic Web was occurring as a common rhetorical trope in Web technology circles. When it was trending, back in the first decades of this millennium, I’d read up about a few of the technologies available, such as the Protégé platform and Jena from ASF – both of which are implemented in the Java programming language. Theoretically, it may be possible to use these Java components in Ruby, with the JRuby platform.
At Safari Books Online, there is a chapter of the JRuby Cookbook, providing examples about using the Raven, Ant, and Maven build tools with JRuby. There’s also a chapter with examples about programming for the combined Ruby/Java environment.
In a sense, perhaps Ruby could provide the ideal scripting language for any single Java software program.
For applications in analysis of linked open data, the ActiveRDF Jena adapter might provide some insights about how to model the Jena project’s Java API within a Ruby program. There’s still an archived version of the ActiveRDF Getting Started Guide, so there’s even some documentation available today, for using ActiveRDF. Of course, the project has been unmaintained for some time, so there might be limited support available.
If focusing on using the Jena project’s API, the prospective application project may not need an adapters API per se. A prospective library project – as a component for that application project – it could at least provide a Ruby interface for accessing some core API features in the Java side of the implementation, e.g for RDF support, SPARQL, and any of the Jena project’s graph/model API. The Ruby interface might provide for some form of an immediate testing model, e.g for running SPARQL queries with DBpedia under JRuby.
If there could be any number of visualization tools developed for a project using linked open data with Java and Ruby, there is the Eclipse IDE. As I recall, they have a lot of support available for applications in visual modeling within a Java programming environment, with the Eclipse platform. They’re an independent project, furthermore, so perhaps any components depending on this platform would not be subject to the commercial whims of any single corporation with an investment in Java programming, e.g Oracle – who acquired the Sun Microsystems company and thus Java(r), a few years ago.
The Sun Microsystems name has virtually disappeared from the Web, but they were the company that really designed Java(r). Thus, since Oracle’s appropriation, rebranding, and virtual ghosting of Sun Microsystems, I’ve not been looking a lot at Java programming, since then.
Maybe Ruby could be a breath of fresh air, in kind, for software projects using linked open data in Java. Presumably, we’re all not going to design anything like PRISM, this time.