Coder Social home page Coder Social logo

frmichel / morph-xr2rml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oeg-upm/morph-rdb

22.0 8.0 4.0 117.12 MB

Implementation of the xR2RML mapping language and SPARQL-to-MongoDB prototype

License: Apache License 2.0

Scala 98.79% Batchfile 0.01% Shell 1.15% Dockerfile 0.04%

morph-xr2rml's Introduction

Morph-xR2RML: MongoDB-to-RDF translation

Morph-xR2RML is an implementation of the xR2RML mapping language that enables the description of mappings from relational or non relational databases to RDF. xR2RML is an extension of R2RML and RML.

Morph-xR2RML comes with connectors for relational databases (MySQL, PostgreSQL, MonetDB) and the MongoDB NoSQL document store. Two running modes are available:

  • the graph materialization mode creates all possible RDF triples at once, it is a production class
  • the query rewriting mode translates a SPARQL 1.0 query into a target database query and returns a SPARQL answer. It can run as a SPARQL 1.0 endpoint or as a stand-alone application.
    • The SPARQL-to-SQL rewriting is an adaptation of the former Morph-RDB implementation, it supports SPARQL SELECT and DESCRIBE queries.
    • The SPARQL-to-MongoDB rewriting is a new component, it supports the SELECT, ASK, CONSTRUCT and DESCRIBE query forms.

Morph-xR2RML was developed by the I3S laboratory as an extension of the Morph-RDB project which is an implementation of R2RML. It is made available under the Apache 2.0 License.

Maturity

The graph materialization mode is mature and has been used in several projects to generate large amounts of RDF triples (-1.3M triples in Covid-on-the-Web).

The query rewriting mode is a prototype implementation. It was meant to demonstrate the effectiveness of a rewirting method but is not meant for production environment.

Quick start guide

The easiest to start using Morph-xR2RML to materialize a graph from a MongoDB database is by using Docker. Follow these instructions.

Documentation

Publications

F. Michel, L. Djimenou, C. Faron-Zucker, and J. Montagnat. Translation of Relational and Non-Relational Databases into RDF with xR2RML. In Proceedings of the 11th International Confenrence on Web Information Systems and Technologies (WEBIST 2015), Lisbon, Portugal, 2015. HAL

F. Michel, C. Faron-Zucker, and J. Montagnat. A Generic Mapping-Based Query Translation from SPARQL to Various Target Database Query Languages. In Proceedings of the 12th International Confenrence on Web Information Systems and Technologies (WEBIST 2016), Roma, Italy, 2016. HAL

F. Michel, C. Faron-Zucker, and J. Montagnat. A Mapping-Based Method to Query MongoDB Documents with SPARQL. In 27th International Conference on Database and Expert Systems Applications (DEXA 2016), 2016. HAL

Cite this work:

Either cite one of the papers above or cite the software itself as this with its SWHID:

Full text:

Franck Michel. Morph-xR2RML: MongoDB-to-RDF translation. 2015, ⟨swh:1:dir:8ea716c0d9e69527a5f50378bf135c5952b1a229⟩. ⟨hal-04128090⟩

Bibtex:

@softwareversion{michel:hal-04128090v1,
  TITLE = {{Morph-xR2RML: MongoDB-to-RDF translation}},
  AUTHOR = {Michel, Franck},
  URL = {https://hal.science/hal-04128090},
  NOTE = {},
  INSTITUTION = {{University C{\^o}te d'Azur ; CNRS ; Inria}},
  YEAR = {2023},
  MONTH = Apr,
  SWHID = {swh:1:dir:c21cc27758cd0ae3f6456b68ff188c2f54e9884a},
  VERSION = {1.3.2},
  REPOSITORY = {https://github.com/frmichel/morph-xr2rml},
  LICENSE = {Apache License 2.0},
  KEYWORDS = {knowledge graph ; RDF ; mapping ; SPARQL ; MongoDB},
  HAL_ID = {hal-04128090},
  HAL_VERSION = {v1},
}

morph-xr2rml's People

Contributors

fpriyatna avatar frmichel avatar ocorcho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

morph-xr2rml's Issues

can't run from eclipse

To override log4j configuration add JVM option: -Dlog4j.configuration=file:/home/.../your_log4j.properties
Loading log4j configuration: file:/E:/sherif%20sources/sherif%20thesis/dr%20fatma/morph-xr2rml-master/morph-xr2rml-master/morph-xr2rml-dist/target/classes/xr2rml-log4j.properties
2021-01-08 13:33:51 INFO [main] (MorphRunner.scala:46) - Current directory = E:\sherif sources\sherif thesis\dr fatma\morph-xr2rml-master\morph-xr2rml-master\morph-xr2rml-dist
2021-01-08 13:33:51 FATAL [main] (MorphRunner.scala:118) - An unexpected error occured: Missing argument for option: d
org.apache.commons.cli.MissingArgumentException: Missing argument for option: d
at org.apache.commons.cli.DefaultParser.checkRequiredArgs(DefaultParser.java:211)
at org.apache.commons.cli.DefaultParser.handleOption(DefaultParser.java:612)
at org.apache.commons.cli.DefaultParser.handleLongOptionWithoutEqual(DefaultParser.java:415)
at org.apache.commons.cli.DefaultParser.handleLongOption(DefaultParser.java:384)
at org.apache.commons.cli.DefaultParser.handleToken(DefaultParser.java:239)
at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:120)
at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:76)
at org.apache.commons.cli.DefaultParser.parse(DefaultParser.java:60)
at fr.unice.i3s.morph.xr2rml.engine.MorphRunner$.main(MorphRunner.scala:62)
at fr.unice.i3s.morph.xr2rml.engine.MorphRunner.main(MorphRunner.scala)

Constant term map with implicit type IRI

A constant object map with an IRI object still generates an literal.
Example:

rr:predicateObjectMap [
  rr:predicate schema:url;
  rr:object <http://example.org>;
]

will generate:
schema:url "http://example.org" whereas it should be schema:url <http://example.org>.

To be checked wether this is the expected behavior in the xR2RML rec.

Null pointer exception in query translation mode

Hi,

The virtualization mode in Morph-xR2RML using the latest jar file results in the following null pointer exception:

java.lang.NullPointerException
    at org.apache.jena.query.ARQ.isTrue(ARQ.java:650)
    at org.apache.jena.sparql.lang.ParserBase.<init>(ParserBase.java:292)
    at org.apache.jena.sparql.lang.SPARQLParserBase.<init>(SPARQLParserBase.java:43)
    at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11Base.<init>(SPARQLParser11Base.java:22)
    at org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.<init>(SPARQLParser11.java:4974)
    at org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:91)
    at org.apache.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:52)
    at org.apache.jena.sparql.lang.SPARQLParser.parse(SPARQLParser.java:34)
    at org.apache.jena.query.QueryFactory.parse(QueryFactory.java:147)
    at org.apache.jena.query.QueryFactory.create(QueryFactory.java:79)
    at org.apache.jena.query.QueryFactory.read(QueryFactory.java:220)
    at org.apache.jena.query.QueryFactory.read(QueryFactory.java:165)
    at es.upm.fi.dia.oeg.morph.base.engine.MorphBaseRunner.run(MorphBaseRunner.scala:28)
    at fr.unice.i3s.morph.xr2rml.engine.MorphRunner$.main(MorphRunner.scala:97)
    at fr.unice.i3s.morph.xr2rml.engine.MorphRunner.main(MorphRunner.scala)

Materialization mode is working fine :)

Multiple pushDown annotations

When two xrr:pushDown annotations are declared in the logical source, only one of them seem to be taken into account. The other is simply ignored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.