diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b25de3..9c590c39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [CURRENT 1.3.2 SNAPSHOT] 2022-01-12 +## [CURRENT 1.3.2] 2023-08-23 + +Add Docker deplyment. + +## [1.3.2 SNAPSHOT] 2022-01-12 - fix bug in sha1() mixed path - document the sha1() mixed path - (partially) fix bug in pushDown: for any field that is an ObjectID with $oid field (such as "_id"), the value of the $oid is pushed instead of the serialization f the field itself diff --git a/codemeta.json b/codemeta.json index 96e96ade..0a2d4b17 100644 --- a/codemeta.json +++ b/codemeta.json @@ -4,14 +4,14 @@ "license": "https://spdx.org/licenses/Apache-2.0", "codeRepository": "https://github.com/frmichel/morph-xr2rml", "datePublished": "2015-04-02", - "dateModified": "2021-07-30", + "dateModified": "2023-08-23", "downloadUrl": "https://www.dropbox.com/sh/djnztipsclvcskw/AABT1JagzD4K4aCALDNVj-yra?dl=0", "issueTracker": "https://github.com/frmichel/morph-xr2rml/issues", - "name": "Morph-xR2RML", - "version": "1.3.1", + "name": "Morph-xR2RML: MongoDB-to-RDF translation", + "version": "1.3.2", "identifier": "10.5281/zenodo.5148233", - "description": "Morph-xR2RML is an implementation of the xR2RML mapping language that enables the description of mappings from relational or non relational databases to RDF. It comes with connectors for relational databases (MySQL, PostgreSQL, MonetDB) and the MongoDB NoSQL database.", - "developmentStatus": "active", + "description": "Morph-xR2RML is an implementation of the xR2RML mapping language (https://www.i3s.unice.fr/~fmichel/xr2rml_specification_v5.1.html) that enables the description of mappings from relational or non relational databases to RDF. It comes with connectors for relational databases (MySQL, PostgreSQL, MonetDB) and the MongoDB NoSQL database.", + "developmentStatus": "inactive", "referencePublication": [ "https://hal.science/hal-01207828", "https://hal.science/hal-01280951", diff --git a/docker/README.md b/docker/README.md index f28cada2..fd81e4f5 100644 --- a/docker/README.md +++ b/docker/README.md @@ -30,32 +30,31 @@ docker-compose up -d Now, both containers are started and ready to process data. -Script `run.sh` provides an example of how to (1) import data located in `mongo_import` into MongoDB, and (2) run Morph-xR2RML to translate the data to RDF and store the result in `xr2rml_output`. +Script `run.sh` provides an example of how to run the different steps manually: (1) import data located in `mongo_import` into MongoDB, and (2) run Morph-xR2RML to translate the data to RDF and store the result in `xr2rml_output`. ### Description of each folder -- `mongo_db`: will contain the actual Mongo database, so that you don't need to re-import files everytime you rerun it. +- `mongo_db`: will contain the actual Mongo database, so that you don't need to re-import files everytime you rerun Morph-xR2RML. - `mongo_tools`: set of handy bash scripts to import json/csv/tsv data into MongoDB. -- `mongo_import`: copy your files to import in this folder, it is mouned in the MongoDB container. -- `xr2rml_config`: mapping files, morph.properties, log configuration file, and bash scripts to run Morph-xR2RML. This folder is mouned in the Morph-xR2RML container. +- `mongo_import`: copy your files to import in this folder, it is moutned in the MongoDB container. +- `xr2rml_config`: mapping files (morph.properties, log configuration file) and bash scripts to run Morph-xR2RML. This folder is mounted in the Morph-xR2RML container. - `xr2rml_config`: where the RDF files will be written. -- `run.sh`: example script showing how to import data into MongoDB and run Morph-xR2RML to translate the data to RDF. +- `run.sh`: example script showing how to use evrything from your machine, i.e. to import data into MongoDB and run Morph-xR2RML to translate the data to RDF. ### Accessing Logs The `docker-compose.yml` mounts the Morph-xR2RML log directory to the Docker host in directory `log`. - Check it if an error occurs or if your mapping does not generate the expected triples. ### Changing Morph-xR2RML configuration and mappings -Put your mapping files in folder `xr2rml_config`. Script `run_xr2rml.sh` will be used to run the transltation from within the container. +Put your mapping files in folder `xr2rml_config`. Script `xr2rml_config/run_xr2rml.sh` will be used to run the transltation from within the container. -Mapping files can also be templates, with 2 predefined placeholders: `{{collection}}` and `{{dataset}}`. Script `run_xr2rml_template.sh` wil replace them before running the translation. Check the example mapping `xr2rml_config/mapping_movies.ttl` and how it is used by script `run.sh`. +Mapping files can also be templates, with 2 predefined placeholders: `{{collection}}` and `{{dataset}}`. Script `xr2rml_config/run_xr2rml_template.sh` will replace them before running the translation. Check the example mapping `xr2rml_config/mapping_movies.ttl` and how it is used by script `run.sh`. The main Morph-xR2RML configuration file is editable at ```xr2rml_config/morph.properties```. In particular that's where you would change the name of the MongoDB database. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4def05e5..ba887c97 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.2' services: morph-xr2rml: - image: frmichel/morph-xr2rml + image: frmichel/morph-xr2rml:1.3.2 container_name: morph-xr2rml networks: - xr2rml-net diff --git a/docker/mongo_tools/import-file.sh b/docker/mongo_tools/import-file.sh index f72865fb..74205ade 100644 --- a/docker/mongo_tools/import-file.sh +++ b/docker/mongo_tools/import-file.sh @@ -38,7 +38,7 @@ index_col=$5 if [[ -z "$index_col" ]] ; then help; fi # Optional -extra_script=$5 +extra_script=$6 # Functions definitions diff --git a/docker/mongo_tools/import-tools.sh b/docker/mongo_tools/import-tools.sh index e98f54b8..4a666455 100644 --- a/docker/mongo_tools/import-tools.sh +++ b/docker/mongo_tools/import-tools.sh @@ -187,7 +187,7 @@ mongo_drop_import_file_index() { _collection_c=$4 _index_col_c=$5 - mongoimport --drop --type=_type --headerline --ignoreBlanks -d $_database_c -c $_collection_c $_file_c + mongoimport --drop --type=$_type --headerline --ignoreBlanks -d $_database_c -c $_collection_c $_file_c mongo --eval "db.${_collection_c}.createIndex({${_index_col_c}: 1})" localhost/$_database_c --quiet mongo --eval "db.${_collection_c}.count()" localhost/$_database_c --quiet } diff --git a/docker/run.sh b/docker/run.sh index f9c89b5c..b73d2351 100644 --- a/docker/run.sh +++ b/docker/run.sh @@ -16,9 +16,6 @@ docker exec -w /mongo_tools $MONGO_CONTAINER \ /bin/bash import-json-files.sh $DB $COLLECTION id # --- Run the translation to RDF -# Note that at start-up Morph-xR2RML shows these warning messages, just ignore them: -# SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". -# SLF4J: Defaulting to no-operation (NOP) logger implementation -# SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. +# Note that at start-up Morph-xR2RML shows 3 SLF4J warning messages, just ignore them. docker exec -w /xr2rml_config $XR2RML_CONTAINER \ /bin/bash run_xr2rml_template.sh mapping_movies.ttl movies.ttl dataset1.0 $COLLECTION diff --git a/docker/xr2rml_config/run_xr2rml.sh b/docker/xr2rml_config/run_xr2rml.sh index b313f271..a9453b25 100644 --- a/docker/xr2rml_config/run_xr2rml.sh +++ b/docker/xr2rml_config/run_xr2rml.sh @@ -48,7 +48,7 @@ java -Xmx4g \ -jar "$JAR" \ --configDir $CONFIG_DIR \ --configFile xr2rml.properties \ - --mappingFile $CONFIG/$mappingFile \ + --mappingFile $CONFIG_DIR/$mappingFile \ --output $OUTPUT_DIR/$output \ >> $log date >> $log diff --git a/docker/xr2rml_docker.zip b/docker/xr2rml_docker.zip index e5dcb208..2fdda4b9 100644 Binary files a/docker/xr2rml_docker.zip and b/docker/xr2rml_docker.zip differ