Date post: | 28-Mar-2015 |
Category: |
Documents |
Upload: | sara-lawson |
View: | 218 times |
Download: | 0 times |
Bridging EMF applications andBridging EMF applications andRDF Data SourcesRDF Data Sources
Guillaume Hillairet, Frédéric Bertrand, Jean Yves Lafaye{guillaume.hillairet01, fbertran, jylafaye}@univ-lr.frLaboratoire L3I, Université de La Rochelle, France.
SWESE’08: Semantic Web Enabled Software Engineering @ ISWC’08. SWESE’08: Semantic Web Enabled Software Engineering @ ISWC’08. 26 October 2008
SWESE'08 2
AgendaAgenda
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 ApplicationsSemantic Web Applications
RDF Store
RDF Store
RDF Store
Ontology(OWL)
Ontology(OWL)
described bydescribed by
described by
described by
SPARQL endpoint
onlinelocal
access rdf data
access rdf data
provides
OOM
SWESE'08 4
Semantic Web ApplicationsSemantic 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
---- Table structure for table `a`--CREATE TABLE `a` ( `e_id` bigint(20) NOT NULL auto_increment, `dtype` varchar(255) NOT NULL, `e_version` int(11) NOT NULL, `a` varchar(255) NOT NULL, `b` varchar(255) default NULL, PRIMARY KEY (`e_id`))
---- Table structure for table `b_tocs`--CREATE TABLE `b_tocs` ( `b_e_id` bigint(20) NOT NULL, `c_e_id` bigint(20) NOT NULL, `b_tocs_idx` int(11) NOT NULL, PRIMARY KEY (`b_e_id`,`b_tocs_idx`), KEY `FKACAC0DE8ACA50134` (`b_e_id`), KEY `b_tocs` (`c_e_id`), CONSTRAINT `b_tocs` FOREIGN KEY (`c_e_id`) REFERENCES `c` (`e_id`), CONSTRAINT `FKACAC0DE8ACA50134` FOREIGN KEY (`b_e_id`) REFERENCES `a` (`e_id`))
<?xml version = '1.0' encoding = 'ISO-8859-1' ?><rdf:RDF> <rdf:Description rdf:about = 'http://www.example.org/library/MySci-FictionLibrary'> <library:name>My Sci-Fiction Library</library:name> <library:writers rdf:resource = 'http://www.example.org/library/authors/IsaacAzimov'/> <library:books rdf:resource = 'http://www.example.org/library/books/Robots'/> <rdf:type rdf:resource = 'http://www.example.org/library#Library'/> </rdf:Description> <rdf:Description rdf:about = 'http://www.example.org/library/books/Robots'> <library:title>Robots</library:title> <library:pages>305</library:pages> <library:author rdf:resource = 'http://www.example.org/library/authors/IsaacAzimov'/> <rdf:type rdf:resource = 'http://www.example.org/library#Book'/> </rdf:Description> <rdf:Description rdf:about = 'http://www.example.org/library/authors/IsaacAzimov'> <library:name>Isaac Azimov</library:name> <library:books rdf:resource = 'http://www.example.org/library/books/Robots'/> <rdf:type rdf:resource = 'http://www.example.org/library#Writer'/> </rdf:Description></rdf:RDF>
Modeling Semantic Web ApplicationsModeling Semantic Web Applications
JSF/HTML JSF/HTML GenerationGeneration
SQL SQL GenerationGeneration
OWL/RDF(S) OWL/RDF(S) GenerationGeneration
User InterfaceRelational Persistence
Semantic Web Data
SWESE'08 6
emf4swemf4sw
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 componentsemf4sw: 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: initializationemf4sw 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 mappingObject/Ontology mapping
Need to explicitly define links between EMF Model and OWL Ontology
Proposition Mapping language for Ecore/OWL
Map Ecore & OWL (MEO)
Ecore
EMF Model
OWL
OWL ModelMapping
MEO
SWESE'08 10
A AA2A
Ontology OaEPackage A
A’’
Ontology Ob
A2A’’
Object/Ontology MappingObject/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.
A’A2A’
SWESE'08 11
Object/Ontology MappingObject/Ontology Mapping
Mapping EStructuralFeatures to OWLProperties Map EAttribute to DataProperty Map EReference to ObjectProperty
SWESE'08 12
Object/Ontology MappingObject/Ontology Mapping
SWESE'08 13
OOM: Model TransformationsOOM: Model Transformations
SWESE'08 14
emf4sw: Loading and Saving objectsemf4sw: Loading and Saving objects
Loading an EObject:
Saving an EObject:
Loading/Saving EMF Resources:
SWESE'08 15
emf4sw: Querying RDF Data Sourceemf4sw: Querying RDF Data Source
Query RDF Data Source in HQL:
Or directly in SPARQL:
SWESE'08 16
ConclusionConclusion
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 ?Thank you, Questions ?