Elsevier

Journal of Web Semantics

Volume 6, Issue 3, September 2008, Pages 191-202
Journal of Web Semantics

ActiveRDF: Embedding Semantic Web data into object-oriented languages

https://doi.org/10.1016/j.websem.2008.04.003Get rights and content

Abstract

Semantic Web applications share a large portion of development effort with database-driven Web applications. Existing approaches for development of these database-driven applications cannot be directly applied to Semantic Web data due to differences in the underlying data model. We develop a mapping approach that embeds Semantic Web data into object-oriented languages and thereby enables reuse of existing Web application frameworks.

We analyse the relation between the Semantic Web and the Web, and survey the typical data access patterns in Semantic Web applications. We discuss the mismatch between object-oriented programming languages and Semantic Web data, for example in the semantics of class membership, inheritance relations, and object conformance to schemas.

We present ActiveRDF, an object-oriented API for managing RDF data that offers full manipulation and querying of RDF data, does not rely on a schema and fully conforms to RDF(S) semantics. ActiveRDF can be used with different RDF data stores: adapters have been implemented to generic SPARQL endpoints, Sesame, Jena, Redland and YARS and new adapters can be added easily. We demonstrate the usage of ActiveRDF and its integration with the popular Ruby on Rails framework which enables rapid development of Semantic Web applications.

Introduction

The Semantic Web simplifies knowledge discovery, reuse, and management [18], [47], [50] by explicitly and formally representing information about online data sources: it enriches the publishing infrastructure of the Web with ontologies, formal and explicit machine-understandable descriptions of data [29] and introduces self-describing formats for interpreting and reusing the data itself. Through ontologies, the Semantic Web simplifies and improves knowledge-intensive applications, by addressing weaknesses in information retrieval, information extraction, and data integration on the current Web [1], [17], [23].

As the Semantic Web standards such as RDF(S), OWL, and SPARQL, have been agreed upon and as infrastructure is maturing, applications can be developed that exploit the benefits of the Semantic Web. Such applications need to access data sources to retrieve, manipulate, and display data to its users [54].

In traditional relational-database applications, various solutions have been developed that offer programmatic access to relational data sources. These solutions, such as Hibernate [4] or ADO.Net [13], are embedded in the programming language and map the data elements into programmatic objects, which allows developers to access and manipulate data using their familiar programming concepts and constructs.

But these existing mapping approaches do not suffice for Semantic Web applications since the access and manipulation patterns differ from the relational setting. Secondly, the conceptual model of Semantic Web data and the semantics of RDF Schema differ substantially from both the object-oriented paradigm and the relational paradigm on which the existing mappings rely. To support application developers, new mappings need to be developed that provide programmatic access to Semantic Web data and offer the access patterns required by typical applications.

Another important benefit of such mappings lies in their usage in Web application frameworks such as Struts,1 Ruby on Rails2 or Django.3 As will be explained, these frameworks are based on the model–view–controller paradigm, and rely on these object–relational solutions to automatically map relational data into object-oriented models in the MVC paradigm. Such automatic mappings alleviate application developers to focus on developing the “controllers”, containing the application logic, and the “views”, containing the user interface.

Since Semantic Web applications share large portions of functionality with traditional Web applications, such as authentication management, session management, caching, user interface widgets, reusing these Web application frameworks is desirable. But since these frameworks rely on an object–relational mapping, a similar mapping from graph-based Semantic Web data to programmatic objects would be required.

In this article, we develop a mapping approach that embeds Semantic Web data into object-oriented languages. We first analyse the relation between the Semantic Web and the Web, and investigate how Semantic Web applications are developed. We then analyse the data access patterns in these applications and discuss the mismatch between object-oriented programming languages and Semantic Web data. We present ActiveRDF, a mapping approach that addresses these mismatches, evaluate its impact on the development process and demonstrate an example Web application based on ActiveRDF.

Section snippets

Related work

Our mapping approach is related to work in object–relational mappings, in accessing Semantic Web data, and in Web application development.

Developing Semantic Web applications

The relation between the Web and the Semantic Web has changed, as the understanding and interpretation of the Semantic Web has evolved over time [31]: on the one hand, the vision of the Semantic Web has been interpreted as an enrichment of the current Web, employing for example named-entity recognition or document classification, resulting in semantically annotated Web documents [30], [38]— on the other hand, the Semantic Web has been interpreted as an interlinked “Web of data” [6], [64], [67]

Requirements for Semantic Web application development

To analyse the requirements for Semantic Web application development, we have performed a survey of Semantic Web applications. The survey is described in detail in [33], we summarise some relevant results here.

The survey investigated 50 existing applications, characterised them on a wide range of properties based on available publications and demonstration prototypes, and cross-validated this information with the original application developers and authors. The surveyed applications were

Typical data access and manipulation patterns

Based on this survey, we have analysed the data access patterns in existing approaches for programmatic access to relational data [26] and in several APIs for accessing and manipulating RDF data such as Sesame [10], Jena [75] and RDF2Go.10 In general, these APIs contain helper and configuration methods for handling datatypes, language tags, reasoning, parsing, serialisation, persistence, and error handling. Secondly, the APIs contain methods to execute arbitrary

Programming languages for embedding RDF data

After analysing the typical patterns for data access and manipulation, a mapping solution should be designed that supports exactly these patterns from within the application programming language. Since a large portion of current software is developed in the object-oriented paradigm,11 an appropriate mapping solution should be embedded inside an object-oriented language.

However, directly designing a mapping solution in a statically typed object-oriented language

A layered architecture for programmatic access to data

Having analysed the typical access patterns for a mapping library and explained the suitability of implementing such mappings in a dynamically typed programming language, we now present ActiveRDF, an object-oriented API for Semantic Web data. ActiveRDF maps RDF Schema classes to programming classes, RDF resources to programming objects and RDF predicates to methods on those objects, thus lifting data elements into first-class citizens (objects of the language itself). ActiveRDF is implemented

Evaluation

We evaluate ActiveRDF both in qualitative and in quantitative sense. First, we can indicate the elegance of the mapping approach through some typical examples. We have already shown some example object manipulations for reading and writing triples in the previous section. Fig. 4, Fig. 5 compare some typical queries in the standard SPARQL query language with their ActiveRDF counterparts; the same queries will be used for the quantitative evaluation next.

The first query retrieves the homepage of

Example application: exploring online communities

This section describes the SIOC explorer, an example implementation of a Semantic Web portal. The application shows the feasibility of assembling an application according to the pattern architecture [33] and the development support provided by ActiveRDF in combination with Ruby on Rails.

The SIOC explorer crawls, fetches and integrates information from several online community sites, such as forums, weblogs and bulletin boards. These community sites enable data integration by exporting their

Conclusion

As any application needs to manipulate data, typical access patterns should be abstracted into higher-level libraries and embedded into the application programming environment. We have analysed which access patterns should be supported in a programmatic manner, formally expressed these as a subset of PathLog and explained why the techniques used in traditional object–relational mapping approaches are not sufficient for Semantic Web data. We have showed why dynamically typed object-oriented

References (75)

  • U. Bojars et al.

    A prototype to explore content and context on social community sites

  • J.G. Breslin et al.

    Towards semantically-interlinked online communities

  • J. Broekstra et al.

    Sesame: a generic architecture for storing and querying RDF and RDF Schema

  • S. Burbeck, Applications Programming in Smalltalk-80: How to use Model–View–Controller,...
  • J.J. Carroll et al.

    Named graphs, provenance and trust

  • P. Castro et al.

    ADO.NET entity framework: raising the level of abstraction in data programming

  • S. Ceri et al.

    Designing Data-Intensive Web Applications

    (2002)
  • O. Corcho et al.

    A platform for the development of Semantic Web portals

  • S. Decker, Semantic web methods for knowledge management. Ph.D. Thesis, Universität Karlsruhe,...
  • S. Decker et al.

    Ontobroker: Ontology based access to distributed and semi-structured unformation

  • A. van Deursen et al.

    Domain-specific languages: an annotated bibliography

    ACM SIGPLAN Notices

    (2000)
  • X. Dong et al.

    Reference reconciliation in complex information spaces

  • F.M. Facca et al.

    Extending WebML towards Semantic Web

  • D. Fensel et al.

    OIL: An ontology infrastructure for the semantic web

    IEEE Intelligent Systems

    (2001)
  • M.F. Fernández et al.

    Declarative specification of web sites with strudel

    The VLDB Journal

    (2000)
  • D. Florescu et al.

    Database techniques for the World-Wide Web: a survey

    SIGMOD Record

    (1998)
  • M. Fowler

    Patterns of Enterprise Application Architecture

    (2002)
  • J. Frohn et al.

    Access to objects by path expressions and rules

  • D. Garlan et al.

    An introduction to software architecture

  • S. Handschuh, Creating ontology-based metadata by annotation for the Semantic Web. Ph.D. Thesis, Universität Karlsruhe,...
  • F. van Harmelen

    Semantic Web research anno 2006: main streams, popular fallacies, current status and future challenges

  • A. Harth et al.

    Optimized index structures for querying RDF from the web

  • B. Heitmann, Transitioning web application frameworks towards the semantic web. Master’s Thesis, Universität Karlsruhe,...
  • B. Heitmann et al.

    Leveraging existing web frameworks for a SIOC explorer to browse online social communities

  • G.-J. Houben et al.

    Hera: Development of Semantic Web information systems

  • A. Jhingran

    Enterprise information mashups: Integrating information, simply

  • Cited by (0)

    This article is an extended version of Oren et al. (2007). This material is based upon works supported by the Science Foundation Ireland under Grant No. SFI/02/CE1/I131.

    View full text