ActiveRDF: Embedding Semantic Web data into object-oriented languages☆
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)
The design and implementation of the Redland RDF application framework
Computer Networks
(2002)- et al.
Web modeling language (WebML): A modeling language for designing web sites
Toward principles for the design of ontologies used for knowledge sharing?
International Journal of Human–Computer Studies
(1995)- et al.
Semantic annotation, indexing, and retrieval
Journal of Web Semantics
(2004) - et al.
Ontologies for knowledge management
- et al.
Anatomy of the ADO.NET entity framework
- et al.
The two cultures: mashing up Web 2.0 and the Semantic Web
- et al.
Hibernate in Action
(2004) Linked Data
(2006)- et al.
D2R server: Publishing relational databases on the Semantic Web
A prototype to explore content and context on social community sites
Towards semantically-interlinked online communities
Sesame: a generic architecture for storing and querying RDF and RDF Schema
Named graphs, provenance and trust
ADO.NET entity framework: raising the level of abstraction in data programming
Designing Data-Intensive Web Applications
A platform for the development of Semantic Web portals
Ontobroker: Ontology based access to distributed and semi-structured unformation
Domain-specific languages: an annotated bibliography
ACM SIGPLAN Notices
Reference reconciliation in complex information spaces
Extending WebML towards Semantic Web
OIL: An ontology infrastructure for the semantic web
IEEE Intelligent Systems
Declarative specification of web sites with strudel
The VLDB Journal
Database techniques for the World-Wide Web: a survey
SIGMOD Record
Patterns of Enterprise Application Architecture
Access to objects by path expressions and rules
An introduction to software architecture
Semantic Web research anno 2006: main streams, popular fallacies, current status and future challenges
Optimized index structures for querying RDF from the web
Leveraging existing web frameworks for a SIOC explorer to browse online social communities
Hera: Development of Semantic Web information systems
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.