Bridging EMF applications and

snufflevoicelessInternet και Εφαρμογές Web

22 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

88 εμφανίσεις

Bridging EMF applications and

RDF Data Sources

Guillaume Hillairet
, Frédéric Bertrand, Jean Yves Lafaye

{guillaume.hillairet01, fbertran, jylafaye}@univ
-
lr.fr

Laboratoire L3I,

Université de La Rochelle, France.

SWESE’08: Semantic Web Enabled Software Engineering @ ISWC’08.

26 October 2008

SWESE'08

2

Agenda



Semantic Web Applications



Modeling Support for Semantic Web Apps



emf4sw: Eclipse Modeling Framework for
Semantic Web



Conclusion



SWESE'08

3

refers to

refers to

Semantic Web Applications

described by

described by

described by

described by

access rdf data

access rdf data

provides

SWESE'08

4

Semantic Web Applications


Web Applications:


Centralized, fixed schema, single data source …



Semantic Web:


Decentralized, arbitrary schema, many data sources …



From Web to Semantic Web Applications:


Using Semantic Web data in existing Web Applications.


Embedding Semantic Web data in common web development
processes.



Our contribution:


Modeling support for Semantic Web Applications.


Use of RDF Data as EMF Objects



Similar approaches:


ActiveRDF, Topaz platform, …

SWESE'08

5

Modeling Semantic Web Applications

JSF/HTML

Generation

SQL

Generation

OWL/RDF(S)

Generation

User Interface

Relational

Persistence

Semantic Web

Data

SWESE'08

6

emf4sw


Uses Eclipse Modeling Framework (EMF).


Links EMF applications with RDF Data Sources:


Mapping between OWL Ontology and EMF Model.


Load RDF data into M1 model.


Save M1 Model into RDF.


Manipulate RDF Data as EMF Objects.


Acts as an ORM but for RDF data.

SWESE'08

7

emf4sw: main components


Resource Provider


Object/Ontology Mapping.


Loads/Saves objects.


Model Manager


Manages EMF Resources


Provides Model Transformations


Query Engine


Builds queries.


Provides query rewriting:


HQL to SPARQL,


SPARQL to HQL.


Data Source Manager


Accesses online data sources (SPARQL endpoints, …).


Supports access to multiple data sources.


Distributes/Federates query results.


SWESE'08

8

emf4sw usage: initialization


First generate Java Classes from EMF Model.


Then, init a resource provider:


Add EPackages corresponding to the EMF Model


Add corresponding mapping file






Adding an RDF Data Source (RDF File, RDF DB, SPARQL
endpoint):



SWESE'08

9

Object/Ontology mapping


Need to explicitly define links between EMF Model
and OWL Ontology



Proposition


Mapping language for Ecore/OWL


Map Ecore & OWL (MEO)

SWESE'08

10

Object/Ontology Mapping


Mapping EMF Classes to OWL Classes


Map one EClass to one OWLClass


Map one EClass to many OWLClass


Have different views on same EClass,


Use of OCL constraints to define views.

SWESE'08

11

Object/Ontology Mapping


Mapping EStructuralFeatures to OWLProperties


Map EAttribute to DataProperty


Map EReference to ObjectProperty

SWESE'08

12

Object/Ontology Mapping

SWESE'08

13

OOM: Model Transformations

SWESE'08

14

emf4sw: Loading and Saving objects


Loading an EObject:





Saving an EObject:




Loading/Saving EMF Resources:




SWESE'08

15

emf4sw: Querying RDF Data Source


Query RDF Data Source in HQL:





Or directly in SPARQL:


SWESE'08

16

Conclusion



The goal of our approach is to ease import/export
of Semantic Web data within current applications.


Object/Ontology mapping is necessary for
embedding Semantic Web data in current
applications (not only Web App.).


Model Driven Engineering simplifies and
automates implementation and use of such
complex process.


Well defined OWL ontologies are needed for
describing RDF data sources.

SWESE'08

17

Thank you, Questions ?