Archive for the ‘RDF’ Category

WWW2008 Linked Data Articles

Friday, April 25th, 2008

The WWW2008 Conference has published some great material, in particular the papers from the Linked Data on the Web (LDOW2008) Workshop.

The Workshop Introduction is an easy to read summary of the development of Linked Data and the Linking Open Data Project over the past year. It includes the Linking Open Data “cloud” diagram which shows the relationships between the main currently available datasets. A good way to get a feel for the amount and scope of available Linked Data is to open each of dataset in its own tab in Firefox and look across the spectrum of data presented.

The home page of the Linking Open Data Project also lists recent developments such as new datasets, tools, publications and conferences becoming available. Conferences in the near future include the Linked Data Planet Conference in New York in June, and the I-Semantics 2008 in Austria in September. I-Semantics 2008 includes the LOD Triplification Challenge for show casing applications which demonstrate the benefits of linked data to end users.

DBpedia Mobile: A Location-Enabled Linked Data Browser provides an overview of DBpedia Mobile, a location-centric DBpedia client application for mobile devices. “The DBpedia project extracts structured information from Wikipedia and publishes this information as Linked Data on the Web. The DBpedia datasets contain information for about 2.18 million things, including almost 300,000 geographic locations. DBpedia is interlinked with various other location-related datasets. Based on the current GPS position of a mobile device, DBpedia Mobile renders a map indicating nearby locations from the DBpedia dataset. Starting from this map, users can explore background information about locations and can navigate into interlinked datasets. DBpedia Mobile demonstrates that the DBpedia dataset can serve as a useful starting point to explore the Geospatial SemanticWeb using a mobile device.”

There are a couple of options for trying out DBpedia Mobile from your browser including Viewing based on IP Address.

For getting up to speed with RDF, OWL and SPARQL, the technologies that form the basis of Linked Data, a good tutorial just published is Understanding SPARQL.

A Semantic Web Architecture for a Rails Hosted Environment

Saturday, October 20th, 2007

Last week-end I installed ActiveRDF on my Mac OS X Powerbook, together with the Sparql, RDFLite and Redland adapters. Ideally I am working towards setting up an environment that allows me to build RESTful Semantic Web Applications that support reasoning over RDF data and implement a SPARQL query end point. Support for OpenID authentication, integrated with FOAF, is also at the top of the list.

On the Powerbook I could also install the ActiverRDF adapters for Sesame and Jena to give me the functionality that I am after but that only works in my development environment. Sesame and Jena are Java based. When it comes to deploying an application onto the web my options are currently more limited. 3kbo is deployed into hosted environment which supports PHP, Python, Ruby and Ruby On Rails and PERL, but no Java. (There is C/C++, limited to my local user account.)

Currently there are two PHP SPARQL implementations, ARC and RAP. RAP also provides a reasoning engine InfModel, with support for owl:sameAs and owl:inverseOf.

So at this stage the architecture that is emerging is an ActiveRDF RESTful Ruby On Rails application that uses RAP as the triple store, SPARQL query engine and reasoning engine. To integrate Rails with PHP I am planning to implement a RESTful PHP interface that acts as a facade to RAP.

Description of a Project

Wednesday, September 12th, 2007

In an earlier article Migrating an existing application to the iPhone and the Semantic Web I discussed some of the areas where Semantic Web concepts could be beneficially applied to the “Compliance Data Management Service” (CDMS) .To show the benefits of using RDF and OWL vocabularies I need to build up a number of practical examples.

In this article I present the first example, based on the Friend of a Friend (FOAF) and Description of a Project (DOAP) vocabularies.

There is a similarity between the concepts and descriptions used in the DOAP vocabulary, which describes open source software projects and the descriptions and concepts which relate to the building and construction projects the “Compliance Data Management Service” is used on. Both types of projects bring together people from different locations and organisations to work together. On both types of projects people may assume one or more roles as they work on different tasks. The DOAP vocabulary imports the Friend of a Friend (FOAF) vocabulary which is widely used on the Semantic Web to describe people and the people they know. It is used by the DOAP vocabulary and is the logical choice for describing the people working on CDMS projects.

Since CDMS itself is a software project (but not open source) the easiest example to create is a static DOAP (Description of a Project) file describing the CDMS software project, combined with a number of static FOAF files describing the various people working on it. The example follows the recipe for serving static RDF files outlined in the tutorial “How to Publish Linked Data on the Web“. It creates the CDMS DOAP file and related FOAF files, demonstrating basic linking between people and the project they work on.

The CDMS software project is being developed at ABE Services by four people, John Anderson, Mike Evans, Rob Beasley and myself. To represent this I created the following five static RDF files at www.abeservices.com.au.

Also Irene Bell-Hancock has created some icons and images for us and has been added to the CDMS project description as a documenter. Irene already has FOAF file at 3kbo so the CDMS DOAP file references Irene using the URI http://www.3kbo.com/people/irene.bell-hancock/foaf.rdf#me.

The basic structure of the CDMS DOAP file is outlined in the image below.

CDMS Developers

But a better way to understand the RDF files and how they link together is to use a good RDF browser such as one of the following:

Each of these browser have an input field which accepts a URI. Once the URI has been entered the RDF browser follows the RDF links and displays them as HTML. For example Disco “renders all information, that it can find on the Semantic Web about a specific resource, as an HTML page”. “While you move from resource to resource, the browser (Disco) dynamically retrieves information by dereferencing HTTP URIs and by following rdfs:seeAlso links.” The other RDF browser work in a similar way. Tabulator requires some configuration as described on the Tabulator home page.

Also available from the Tabulator home page is the Tabulator Firefox extension which makes browsing RDF data with Firefox extremely easy. Below is what is seen with Tabulator Firefox extension when the CDMS DOAP URI ( http://www.abeservices.com.au/projects/cdms/cdms-doap.rdf#CDMS )is first opened.

CDMS DOAP RDF File

Following the link to Irene displays her FOAF file (from 3kbo ) within the same html page that is displaying the CDMS DOAP file.

Irenes FOAF file within CDMS DOAP

On 3kbo there are two foaf.rdf files, http://www.3kbo.com/people/richard.hancock/foaf.rdf and http://www.3kbo.com/people/irene.bell-hancock/foaf.rdf. In both files the foaf:knows property is used to show that Richard knows Irene and Irene knows Richard. Using Tabulator it is easy to navigate from Irene’s foaf file to Richard’s.

Navigation via RDF data across web servers is illustrated by starting at the CDMS Description of a Project (DOAP) at www.abeservices.com.au and following the CDMS “Documenter” link to Irene then Irenes “Knows” link to Richard.

Richard’s 3kbo foaf file uses the built-in OWL property owl:sameAs to indicate that Richard at 3kbo is the same individual as Richard at abeservices. Setting owl:sameAs to the following <owl:sameAs rdf:resource=”http://www.abeservices.com.au/people/rhancock/foaf.rdf#rhancock“/> in the definition of Richard at http://www.3kbo.com/people/richard.hancock/foaf.rdf#i allows Tabulator to recognize the equivalence of the two definitions and merges the information from the two sources. This is shown in the image below.

Richards 3kbo FOAF Profile

A visual indication of the merging is that the two images reside on different servers, within different FOAF definitions of Richard, i.e. http://www.abeservices.com.au/people/rhancock/richard-hancock.jpg resides on www.abeservices.com.au and http://www.3kbo.com/people/richard.hancock/richard-hancock.jpg resides on www.3kbo.com.

Tabulator follows the principles of Web Architecture outlined in the tutorial How to Publish Linked Data on the Web. When it finds that an RDF data link leads to a standard html web document or image these are displayed within the page showing the RDF data. In addition to showing embedded images (like those shown above) Tabulator can also displays web sites embedded in the same page. A good example is Irene’s home page http://picasaweb.google.com/goannagraphics. In the image below the picasaweb slide show of the embedded home page has been activated and is fully functional.

Irene’s Homepage

Examples of FOAF properties which lead to web documents include foaf:homepage, foaf:weblog and foaf:workplaceHomepage. foaf:homepage and foaf:weblog are defined to be properties of OWL Type: InverseFunctionalProperty. As such they uniquely identify the person whose homepage or weblog it is and within Tabulator can lead to the merging of information in a way similar to that seen when the owl:sameAs property is applied.

In summary, the example above shows a number of the benefits of using RDF data and reusing RDF and OWL vocabularies. These include:

  1. Using standardized representations of people (FOAF) and (software) projects (DOAP) .
  2. Interlinking between sites using RDF data links allows data from different sources to be easily combined.
  3. Reasoning over data, e.g. the basic inferencing using owl:sameAs. Other examples include the foaf:homepage and foaf:weblog properties which are defined as owl:InverseFunctionalProperty. Taking selective advantage of the features of the Web Ontology Language (OWL) has the potential to reduce the amount of application specific code (e.g. java code) that needs to be written.

Future articles based on the examples created above and the existing CDMS application will include:

  1. Demonstrating the ability to query the constructed RDF data files using the SPARQL Query Lanaguage.
  2. Accessing existing data stored in a relational database as RDF using the D2R Server . The D2R Server enables RDF and HTML browsers to navigate the content of the database, and allows applications to query the database using the SPARQL Query Lanaguage.
  3. Develop a prototype semantic web application using an RDF Triple Store that supports the SPARQL Update specification.
  4. Create a SKOS glossary based on the blog entry Glossary of Common CDMS Term. The glossary would support the development of a building industry related ontologies.
  5. Define an ontology which provides a “Description of a Building Project” and link it to a suitable ontology which describes the tasks undertaken as part of a building project.

Installing Ruby On Rails on Mac OS X

Saturday, August 25th, 2007

The two main sites I am working with are www.3kbo.com and www.abeservices.com.au. 3kbo is hosted at www.railsplayground.com and is centered around Ruby On Rails apps while www.abeservices.com.au has its own server and is java focused.

The plan is to develop semantic web based applications using the Ruby based RDF framework ActiveRDF and deploy them at 3kbo. The 3kbo applications will also be leveraging the Ruby On Rails web framework.

The first step in getting started is to install Ruby On Rails on my new(ish) Mac PowerBook. Initially I will be using just two of the available ActiveRDF adaptors, “SPARQL” and “RDFLite”. RDFLite needs SQLite3, meaning that the default version that comes with Mac OS X needs to be updated. Since RDFLite can also utilize ferret , the Ruby search engine library, this was installed as well.

To install Ruby on Rails I followed the basic instructions outlined in Installing Ruby on Rails and PostgreSQL on OS X.

This approach uses MacPorts and overall worked well, apart from getting the following error at the very beginning:

“Error: search for portname ruby failed: No index(es) found! Have you synced your source indexes?”

The fix was to run the port selfupdate command:

$ sudo port selfupdate

After that ruby and ruby gems were successfully installed with the port command:

$ sudo port install ruby rb-rubygems

Well almost. The first attempt to install rails using gem ended with the error:

Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository

Problem solved by following the instructions at http://armyofevilrobots.com/node/418, i.e delete the gem source_cache and update gems.

$ sudo gem update

With gem updated rails installed fine.

$ sudo gem install -y rails

SQLite3 installed without problem

$ sudo port install sqlite3

So did ferret

$ gem install ferret

To test that all was fine I created a basic Rails app following the steps outlined in Rolling with Ruby on Rails Revisited

$ rails example
$ cd example
$ ruby script/server

And view at http://localhost:3000/

Or to check when running with Mongrel

$ mongrel_rails start

And view at http://localhost:3000/

With the basic Rails app working it was time to get started with ActiveRDF.