From bc346ba946fa502a87d2f049311ca29684f074c1 Mon Sep 17 00:00:00 2001 From: Dragos0000 Date: Thu, 14 Sep 2023 16:11:49 +0100 Subject: [PATCH] changes to metadata and makefile --- Makefile | 39 ++++++++++++++----- src/owl-core.xsl | 9 +++-- src/owl-restrictions.xsl | 10 +++-- src/shacl-shapes.xsl | 12 +++--- test/ePO-default-config/config-parameters.xsl | 15 ++----- 5 files changed, 52 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 9087d84..1b5a05c 100644 --- a/Makefile +++ b/Makefile @@ -92,17 +92,17 @@ generate-convention-report: #Example how to run transformation commands : # make owl-core XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/eNotice_CM.xml OUTPUT_FOLDER_PATH=./my-folder owl-core: - @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-core.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.rdf + @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-core.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.owl.rdf @echo Output owl core file: - @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.rdf + @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.owl.rdf owl-restrictions: - @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-restrictions.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.rdf + @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-restrictions.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.owl.rdf @echo Output owl restrictions file: - @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.rdf + @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.owl.rdf shacl: - @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/shacl-shapes.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shacl.rdf + @java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/shacl-shapes.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shapes.shacl.rdf @echo Output shacl file location: - @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shacl.rdf + @ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shapes.shacl.rdf # Combine xmi UML files @@ -121,8 +121,8 @@ merge-xmi: #Example how to run converting commands : # make convert-to-turtle ONTOLOGY_FOLDER_PATH=./my-folder -# OUTPUT_FOLDER_PATH is the the path to the folder containing .rdf files for converting to turtle or .ttl files to convert to rdf -convert-to-turtle: +# ONTOLOGY_FOLDER_PATH is the the path to the folder containing .rdf files for converting to turtle or .ttl files to convert to rdf +convert-rdf-to-turtle: @for FILE_PATH in ${RDF_FILELIST}; do \ echo Converting $${FILE_PATH} into Turtle; \ source model2owl-venv/bin/activate; \ @@ -132,7 +132,7 @@ convert-to-turtle: echo " ==> Output in Turtle format"; \ ls -lh $${FILE_PATH%.*}.ttl; \ done -convert-to-rdf: +convert-turtle-to-rdf: @for FILE_PATH in ${TURTLE_FILELIST}; do \ echo Converting $${FILE_PATH} into RDF/XML; \ source model2owl-venv/bin/activate; \ @@ -143,6 +143,27 @@ convert-to-rdf: ls -lh $${FILE_PATH%.*}.rdf; \ done +convert-rdf-to-jsonld: + @for FILE_PATH in ${RDF_FILELIST}; do \ + echo Converting $${FILE_PATH} into JSON-LD; \ + source model2owl-venv/bin/activate; \ + rdfpipe -i application/rdf+xml -o json-ld $${FILE_PATH} > $${FILE_PATH%.*}.json; \ + echo Input in RDF/XML format; \ + echo $${FILE_PATH}; \ + echo " ==> Output in JSON-LD format"; \ + ls -lh $${FILE_PATH%.*}.json; \ + done +convert-rdf-to-rdf: + @for FILE_PATH in ${RDF_FILELIST}; do \ + echo Converting $${FILE_PATH} into RDF/XML; \ + source model2owl-venv/bin/activate; \ + rdfpipe -i application/rdf+xml -o application/rdf+xml $${FILE_PATH} > $${FILE_PATH%.*}.rdf2; \ + mv -v $${FILE_PATH%.*}.rdf2 $${FILE_PATH%.*}.rdf; \ + echo Input in RDF/XML format; \ + ls -lh $${FILE_PATH}; \ + echo " ==> Output in RDF/XML format"; \ + ls -lh $${FILE_PATH%.*}.rdf; \ + done #make generate-html-docs-from-rdf WIDOCO_RDF_INPUT_FILE_PATH=../Documents/model2owl-2023/owl-core.rdf WIDOCO_OUTPUT_FOLDER_PATH=core-html generate-html-docs-from-rdf: get-widoco @echo ${WIDOCO_RDF_INPUT_FILE_PATH} diff --git a/src/owl-core.xsl b/src/owl-core.xsl index 4e53a89..1143dc5 100644 --- a/src/owl-core.xsl +++ b/src/owl-core.xsl @@ -73,13 +73,14 @@ - - This version is automatically generated from on - + + + + This version is automatically generated from on + - diff --git a/src/owl-restrictions.xsl b/src/owl-restrictions.xsl index 30c13bb..ac11340 100644 --- a/src/owl-restrictions.xsl +++ b/src/owl-restrictions.xsl @@ -65,17 +65,19 @@ + + + - - This version is automatically generated from on + This version is automatically generated from on - + - + diff --git a/src/shacl-shapes.xsl b/src/shacl-shapes.xsl index acf93c8..e9631f5 100644 --- a/src/shacl-shapes.xsl +++ b/src/shacl-shapes.xsl @@ -73,17 +73,19 @@ + + + - - This version is automatically generated from on - - + This version is automatically generated from on + - diff --git a/test/ePO-default-config/config-parameters.xsl b/test/ePO-default-config/config-parameters.xsl index b3526ce..628b5d5 100644 --- a/test/ePO-default-config/config-parameters.xsl +++ b/test/ePO-default-config/config-parameters.xsl @@ -109,21 +109,13 @@ and the technologies that they are using all differ. These differences hamper data interoperability and thus its reuse by them or by the wider public. This creates the need for a common data standard for publishing procurement data, hence allowing data from different sources to be easily accessed and linked, and consequently reused.'"/> - - - - + - - @@ -139,6 +131,7 @@ + - - + +