Easy Jena startup with Eclipse and Maven

April 10th, 2009 § 6

Recently on the Jena news group there was a question regarding classpath and how frustrating it can be to properly configure that aspect of a new project. I began to answer the question and realized I haven’t touched a classpath for years simply because the tools I use make that unnecessary. Eclipse is free and has very good maven integration. At the same time, the Jena team is providing jena as a Maven asset indexed on the main maven repo. The consequences are that you can have eclipse create a new project for you, and add your library dependencies for you by simply declaring that your project “uses” jena.  Here is a quick screentoaster demo to get you going…

Record your screencast online
Reblog this post [with Zemanta]

Writing out SIOC triples using Jena + Jenabean

March 10th, 2009 § 1

(this post deals with features provided jenabean 1.0.1, available from the project site.  You’ll also need Jena, HP’s semenatic web framework.)

In my last post we looked at reading SIOC directly off the web. The other side of the coin is producing syntactically valid SIOC statements from java. You may want to create RDF for another consumer or perhaps you want to persist the SIOC statements directly into a Jena model. Either way, if you use the direct approach of coding to Jena’s RDF api, you’ll be writing quite a few lines of code. This task can be made simpler using Jenabean’s “Thing” utility along with a specialized interface to the Sioc vocabulary.  We’ll be looking at this simple example, which duplicates the primary RDF example givin in the SIOC specification document. » Read the rest of this entry «

Processing SIOC feeds with Jenabean

February 26th, 2009 § 1

This is a simple example of using jenabean’s “Thing” class to process SIOC data. The full example is available here.
SIOC is an OWL ontology for integrating and exchanging online community information.  It’s one of the few but growing public ontologies that have some adoption where you can find examples in the wild.  Jenabean makes it very easy to extract information using the SIOC vocabulary.   Assuming your Jena project is setup, all that’s required is for you to download the jenabean jar file to get started.  The latest snapshot build (0.9) contains a ready made interface for working with SIOC feeds or data.  First create a simple class with a static main… » Read the rest of this entry «

Using ARQ and regexp to refine data ranges

January 24th, 2008 Comments Off

ARQ is able to update RDF graphs, and I’m just beginning to realize how powerful that can be.  I’ve been playing with geonames and found that the ontology defined population as:

(Geonames.org has a fantastic set of data and public api’s by the way, if anything points the way to a semantic web it’s them.)

I was using their ontology to experiment with binding and it shows one of the problems in trying to do this, vague data ranges (and cardinalities, but that’s another discussion).  We know about the property, and its domain, but no range.  As humans we can infer the type by looking at the data, but just going off the RDF as given, we know nothing about the range.  Assuming this is frequent with public data sources, we’d need to find ways to clean things up a bit in an automated way. » Read the rest of this entry «

Jena Ruby bindings: accessing Jena’s feature rich RDF api from Ruby

January 5th, 2008 § 1

While working on jenabean I began to wonder if dynamic languages had features that would make editing ontology instance data easier.  The traditional method for bindind a schemas to objects normally involves creating some kind of binding descriptor file in XML.  The tedium of that process is well known and so painfull that it may not even continue to be a viable pattern.  What I discovered is that it’s rather easy to manipulate RDF files from Ruby (JRuby to be exact) using Jena.  The technique I decided upon was to dynamically create classes that map to RDF types in the ontology.  This is a type of “metaprogramming” that is familiar to rails developers, and to be fair, I spent a few hours reading ActiveRecord code to glean some ideas on how this type of binding works.  So let’s get started.  Here’s what you’ll need to follow along in a hands on manner: » Read the rest of this entry «

I do not think it means what you think it means

August 29th, 2007 Comments Off

I’ve recently been working with Jena and Pellet. At the outset I was enthusiastic about all the interesting implications a reasoner had for my ontology. Being familiar with the “classify ontology” buttons in Protege, as well as the “inferred types” tabs, I had in mind that Pellet would be able to take instance information and classify my instances. I imagined interesting tid bits about anonymous Instances coming in, and conclusions coming out in the form of pellet asserting class membership when Instances meet sufficient conditions. For example, an Instance with a name, a job, and a wife is probably a….that’s right…a man! I’ve since been somewhat disappointed. » Read the rest of this entry «

Where Am I?

You are currently browsing the jena category at The Web Semantic.