AutoRDF - Using OWL as an Object Graph Mapping (OGM) specification language

Similar documents
Extracting Ontologies from Standards: Experiences and Issues

12th ICCRTS. On the Automated Generation of an OWL Ontology based on the Joint C3 Information Exchange Data Model (JC3IEDM)

Ontological Modeling: Part 15

GraphOnto: OWL-Based Ontology Management and Multimedia Annotation in the DS-MIRF Framework

Automatic Transformation of Relational Database Schema into OWL Ontologies

Model Driven Ontology: A New Methodology for Ontology Development

Simplified Approach for Representing Part-Whole Relations in OWL-DL Ontologies

Smart Open Services for European Patients. Work Package 3.5 Semantic Services Definition Appendix E - Ontology Specifications

The OWL API: An Introduction

Ontological Modeling: Part 14

Deriving OWL Ontologies from UML Models: an Enterprise Modelling Approach.

INF3580/4580 Semantic Technologies Spring 2017

INF3580 Semantic Technologies Spring 2012

Unlocking the full potential of location-based services: Linked Data driven Web APIs

Semantic Web Technologies: Web Ontology Language

Short notes about OWL 1

Easing the Definition of N Ary Relations for Supporting Spatio Temporal Models in OWL

Collaborative Ontology Construction using Template-based Wiki for Semantic Web Applications

RDF /RDF-S Providing Framework Support to OWL Ontologies

An Alternative CIM Modeling Approach using JSON-LD

Semantic Annotations for BPMN models: Extending SeMFIS for supporting ontology reasoning and query functionalities. Dimitraki Katerina

Metamodels for RDF Schema and OWL

Ontological Modeling: Part 11

Chapter 3 Research Method

Semantic Web Engineering

Knowledge Representation RDF Turtle Namespace

Main topics: Presenter: Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary TDT OWL

bibliotek-o : a BIBFRAME Implementation

An Annotation Tool for Semantic Documents

OWLET: An Object-Oriented Environment for OWL Ontology Management

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

Building Blocks of Linked Data

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Today: RDF syntax. + conjunctive queries for OWL. KR4SW Winter 2010 Pascal Hitzler 3

Ylvi - Multimedia-izing the Semantic Wiki

Semantic Technologies

Event Stores (I) [Source: DB-Engines.com, accessed on August 28, 2016]

Extracting knowledge from Ontology using Jena for Semantic Web

The P2 Registry

JENA: A Java API for Ontology Management

Towards Semantic Interoperability of

Interoperability of Protégé 2.0 beta and OilEd 3.5 in the Domain Knowledge of Osteoporosis

Sewelis: Exploring and Editing an RDF Base in an Expressive and Interactive Way

LECTURE 09 RDF: SCHEMA - AN INTRODUCTION

D WSMO Data Grounding Component

RDF Schema. Mario Arrigoni Neri

Semantic Technologies and CDISC Standards. Frederik Malfait, Information Architect, IMOS Consulting Scott Bahlavooni, Independent

CSc 8711 Report: OWL API

SeMFIS: A Tool for Managing Semantic Conceptual Models

Deep Integration of Scripting Languages and Semantic Web Technologies

Open Geospatial Consortium Inc.

SADI Semantic Web Services

Table of Contents. iii

Introduction to Protégé. Federico Chesani, 18 Febbraio 2010

Approach for Mapping Ontologies to Relational Databases

Documenting Java Database Access with Type Annotations

Semantic Web. Ontology Pattern. Gerd Gröner, Matthias Thimm. Institute for Web Science and Technologies (WeST) University of Koblenz-Landau

New Approach to Graph Databases

Protégé-2000: A Flexible and Extensible Ontology-Editing Environment

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements

APPLYING KNOWLEDGE BASED AI TO MODERN DATA MANAGEMENT. Mani Keeran, CFA Gi Kim, CFA Preeti Sharma

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Mustafa Jarrar: Lecture Notes on RDF Schema Birzeit University, Version 3. RDFS RDF Schema. Mustafa Jarrar. Birzeit University

Using ontologies function management

Semantic Web Domain Knowledge Representation Using Software Engineering Modeling Technique

Logic and Reasoning in the Semantic Web (part I RDF/RDFS)

Model driven Engineering & Model driven Architecture

Efficient Querying of Web Services Using Ontologies

Overview of lectures today and Wednesday

Unit Testing of Model to Text Transformations

Semantic Web Fundamentals

3.4 Data-Centric workflow

Use of the CIM Ontology. Scott Neumann, UISOL Arnold DeVos, Langdale Steve Widergren, PNNL Jay Britton, Areva

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages

Solving problem of semantic terminology in digital library

Study and guidelines on Geospatial Linked Data as part of ISA Action 1.17 Resource Description Framework

Defining Several Ontologies to Enhance the Expressive Power of Queries

The MEG Metadata Schemas Registry Schemas and Ontologies: building a Semantic Infrastructure for GRIDs and digital libraries Edinburgh, 16 May 2003

Web Science & Technologies University of Koblenz Landau, Germany. RDF Schema. Steffen Staab. Semantic Web

Semantic MediaWiki A Tool for Collaborative Vocabulary Development Harold Solbrig Division of Biomedical Informatics Mayo Clinic

PROJECT PERIODIC REPORT

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG

Protégé Plug-in Library: A Task-Oriented Tour

TMCL and OWL. Lars Marius Garshol. Bouvet, Oslo, Norway

A UML SIMULATOR BASED ON A GENERIC MODEL EXECUTION ENGINE

Brain, a library for the OWL2 EL profile

Machine Learning for Annotating Semantic Web Services

9 The Ontology UML Profile

A Community-Driven Approach to Development of an Ontology-Based Application Management Framework

OMG Specifications for Enterprise Interoperability

Soumya Kanti Datta Research Engineer

OWL Rules, OK? Ian Horrocks Network Inference Carlsbad, CA, USA

Lesson 10 BPEL Introduction

SEMANTIC WEB DATA MANAGEMENT. from Web 1.0 to Web 3.0

Knowledge Representations. How else can we represent knowledge in addition to formal logic?

Web Ontology Language: OWL

An RDF-based Distributed Expert System

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

BUILDING THE SEMANTIC WEB

USING DECISION MODELS METAMODEL FOR INFORMATION RETRIEVAL SABINA CRISTIANA MIHALACHE *

Transcription:

AutoRDF - Using OWL as an Object Graph Mapping (OGM) specification language Fabien Chevalier AriadNEXT 80 avenue des Buttes de Coëmes 35700 RENNES - FRANCE Email: fabien.chevalier@ariadnext.com Abstract. AutoRDF is an original open source framework that facilitates handling RDF data from a software engineering point of view. Built on top of the Redland software package, it bridges the gap between semantic web ontology and legacy object oriented languages, by providing transparent access to RDF resources from within standard C++ objects. Its use of widespread C++11, Boost and Redland makes it suitable not only for the desktop and server, but also for low computing power embedded devices. This framework is a result of the IDFRAud research project, where it is used to handle complex domain specific knowledge and make it available on smartphone-class devices. 1 Introduction IDFRAud [4] project is an industrial research project led by French ID document verification leader company AriadNEXT. One of the objectives of IDFRAud is to propose an automatic solution for ID verification that can handle documents issued from a large set of countries. The solution will be able to execute specific controls according to the ID model (type, country, generation, etc) thanks to a knowledge base. The core idea of IDFRAud project is to provide an automatic verification system for identity documents in order to replace existing manual verification processes. The different components of ID analysis and verification in IDFRAud are driven by a set of control rules. In order to guarantee an interpretable and adaptive behavior at each ID analysis step, the identity document descriptions are organized by a knowledge management module. One of the requirements of our knowledge management module is its interoperability and portability. It is preferred to store the data in a standard way in order to be able to use other tools such as Sewelis [8] to navigate our data. Another strong requirements are that we must be able to easily extract a subset of the knowledge base to run on mobile platforms, where C/C++ language rules. After a thorough analysis of existing technologies, we decided to use RDF for its versatility/flexibility of knowledge modelling using graphs, coupled with its capability to bring formal structure to the knowledge using Web Ontology Language (OWL).

Providing an efficient, consistent, and descriptive enough model for ID documents proves to be a very challenging task. The biggest issues encountered is the very high diversity of how ID documents look like, which makes it really difficult to design a data model that fits all cases. As such it is anticipated that the model will see serious evolutions with the number of supported documents. The second biggest issue is the fast evolving fraud patterns, which makes it necessary to add document characteristic attributes very easily in the system. As such we needed something that could make code base maintenance easy by being able to follow a constantly evolving ontology. AutoRDF can be of some use to any kind of project that needs to manipulate RDF data where an ontology exists. The use of modern C++ make it portable to a wide variety of platforms, including all mobile phone platforms, as well as most of the embedded world systems. 2 Related work Code generators that are used in conjunction with UML design softwares such as BOUML [1] or IBM Rational Rose [3], are principally based on data modelling. Some other well known open source frameworks such as Hibernate OGM [2], or Neo4j OGM [5] provide easy read/write for Java objects to or from graph databases. They use a more code-centric approach, where annotations store the information the framework uses to know how object must be serialized. As such they are not model-centric, but more code-centric. AutoRDF tries to promote a software design approach where data modelling is treated as a first class citizen. It shares also some ideas with Protégé code generator plugin [6], as it uses a similar code generating approach. However it goes further than all those tools, as it does not only build interface classes that would need to be implemented by the developer, but provides a ready to use object class hierarchy to read and write data to disk. Compared to Redland [7], AutoRDF raises the abstraction level by understanding web ontologies, as well as providing a C++ object oriented design to RDF graphs API whereas Redland is a pure C library. It has some similarities with owlcpp [10], however this library has no C++ proxy code generation capability, and AutoRDF tries to keep the bar as low as possible for occasional users, by providing an easy to use C++11 API. It is quite similar in goal to the Automatic Mapping of OWL Ontologies described in [9], however transferred to C++/embedded world as an open source project. 3 Introducing AutoRDF AutoRDF is an open source semantic web code generator for C/C++. It parses a Web Ontology Language file (OWL), builds an internal representation of the ontology, and generates a set of C++ classes that make it easy to read/write RDF data from within C++. It uses the well established Redland [7] library to perform all its input/output operations. AutoRDF uses a proxy approach,

no data is copied into the C++ objects. C++ objects edit the underlying RDF graph in real time when the C++ object methods are called. AutoRDF supports a subset of RDFS and OWL. Resources of type rdfs:resource or owl:class are identified as candidates for class generation, owl:subclassof is used to generate inheritance relationship between generated C++ classes. owl:oneof allows smart mapping to C++ enums. owl:haskey generates a static object loading method, taking the key as parameter. Resources of type owl:datatypeproperty and owl:objectproperty are used to generate appropriate getter/setter methods. rdfs:domain is used to target gettter/setter generation to the right C++ class, rdfs:range allows more specific C++ datatype selection. owl:functionalproperty, owl cardinality and qualified cardinality are used to choose if setters/getters should handle only single items, or if list of items should be supported. owl:restriction with owl:ondatarange or owl:onclass allow to further specialize datatype of a property once applied to a given C++ object. Annotations of type rdfs:comment, rdfs:label, rdfs:seealso, rdfs:isdefinedby are also used to generate documented C++ classes/methods. This subset is enough to generate C++ code that is most of the time as good as what a developer would have written by hand. Figure 1 shows a simple UML diagram based on a simple geometry Ontology, and an corresponding OWL/RDF fragment is reproduced below. @ prefix geom : <http :// example. org / geometry #>. geom : topleft a owl : ObjectProperty ; rdfs : domain geom : Rectangle. geom : Point a owl : Class ;... rdfs : subclassof [ a owl : Restriction ; owl : onproperty geom : x ; owl : qualifiedcardinality " 1" ^^ xsd : nonnegativeinteger ; owl : ondatarange xsd : double ] ;.... geom : Rectangle a owl : Class ; rdfs : subclassof geom : Shape ; rdfs : subclassof [ a owl : Restriction ; owl : onproperty geom : topleft ; owl : qualifiedcardinality " 1" ^^ xsd : nonnegativeinteger ; owl : onclass geom : Point ]. AutoRDF provides a simple way to manipulate an RDF dataset from C++ code, as seen below: geo : : Rectangle r ( http : / / example. org / myfancyrectangle ) ; // Set one o f my r e c t a n g l e c o o r d i n a t e s the long way geo : : Point t l ; t l. setx ( 1. 0 ) ; t l. sety ( 2. 0 ) ;

Fig. 1. Geometry ontology. This model is used as example to showcase AutoRDF code generation capabilities. t r. settopleft ( t l ) ; // Set one o f my r e c t a n g l e c o o r d i n a t e s the s h o r t way t r. setbottomright ( geo : : Point ( ). setx ( 1 1 ). sety ( 1 2 ) ) ; Those lines of code makes it very natural for a C++ developer to manipulate RDF data without even knowing its RDF. @ prefix rdf : <http :// www.w3.org /1999/02/22 - rdf - syntax -ns#>. @ prefix geo : <http :// example. org / geometry #>. <http :// example. org / myfancyrectangle > geo : bottomright [ geo :x "11" ; geo :y "12" ; a geo : Point ] ; geo : topleft [ geo :x "1" ; geo :y "2" ; a geo : Point ] ; a geo : Rectangle. 4 Demonstration content The demonstration will run on a laptop and will feature Protege for ontology visualization, the geometry ontology and AutoRDF as code generator, and a simple load/save example. The demonstration will also be available with a more complex scenario, a draft of the IDFRAud project ontology. This demonstration using demo geometry ontology is available as a screencast on the AutoRDF github page at https://github.com/ariadnext/autordf.

5 Future Work AutoRDF is still very young. It will be used in the coming years by the IDFRAud project, and as such we will add some more features, towards making working with RDF datasets easier: A data quality assessment API - Checking consistency of a given RDF dataset towards a reference ontology is of crucial importance to ensure correct applicative behaviour and avoid faults that are due to poor data quality. Some kind of C++ OWL API, in order to make creation of other tools on top of AutoRDF easier. For instance we plan to create a graphical document model editor for IDFRAud projet, with user interface components generated automatically from the underlying ontology. References 1. Bouml. http://www.bouml.fr/ 2. Hibernate OGM - The power and simplicity of JPA for NoSQL datastores. http://hibernate.org/ogm/ 3. IBM Rational Rose. http://www.ibm.com/software/products/fr/enterprise/ 4. IDFRAud: An Operational Automatic Framework for Identity Document Fraud Detection and Profiling - Joint research project with AriadNEXT, IRISA, ENSP and IRCGN funded by ANR grant ANR-14-CE28-0012. http://idfraud.fr/ 5. Neo4j OGM - An Object Graph Mapping Library for Neo4j. http://neo4j.com/docs/ogm/java/stable/ 6. Protégé code generator. http://protegewiki.stanford.edu/wiki/protege-owl Code Generator 7. Redland rdf libraries. http://librdf.org/ 8. Ferré, S., Hermann, A.: Reconciling faceted search and query languages for the Semantic Web. Int. J. Metadata, Semantics and Ontologies 7(1), 37 54 (2012) 9. Kalyanpur, A., Pastor, D.J., Battle, S., Padget, J.A.: Automatic mapping of owl ontologies into java. In: SEKE. vol. 4, pp. 98 103. Citeseer (2004) 10. Levin, M.K., Cowell, L.G.: owlcpp: a c++ library for working with owl ontologies. Journal of biomedical semantics 6(1), 1 (2015)