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.
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.
Following the link to Irene displays her FOAF file (from 3kbo ) within the same html page that is displaying the CDMS DOAP file.
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.
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.
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:
- Using standardized representations of people (FOAF) and (software) projects (DOAP) .
- Interlinking between sites using RDF data links allows data from different sources to be easily combined.
- 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:
- Demonstrating the ability to query the constructed RDF data files using the SPARQL Query Lanaguage.
- 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.
- Develop a prototype semantic web application using an RDF Triple Store that supports the SPARQL Update specification.
- 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.
- 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.