diff --git a/.gitignore b/.gitignore index 7ea0d31b..1d4dd127 100644 --- a/.gitignore +++ b/.gitignore @@ -314,8 +314,7 @@ TSWLatexianTemp* glossary test/test-multi-xmi/combined workspace.code-workspace -frameworks.zip -lib.zip -frameworks -lib .ant-targets-build.xml +xspec +transform/*.jar +transform/doc \ No newline at end of file diff --git a/Makefile b/Makefile index 7d3826e7..4ce75e22 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,50 @@ #curBranch := $(shell git branch --show-current) curBranch := $(shell git rev-parse --abbrev-ref HEAD) -export curBranch +# Number of file under .git repo (to test if the git repo was already cloned) +gitRepoFiles := $(shell ls -l transform/model2owl/.git >/dev/null 2>&1 | wc -l ) +secrets.GITHUB_TOKEN := ******* +# One of the xmi input file +FIRST_INPUT_XMI_FILE := "transform/model2owl/test/test-multi-xmi/ePO_CM.xml" +# Output directory containing combined file from multiple xmi / xml UML models +OUTPUT_COMBINED_XMI_PATH := "transform/output/combined-xmi/" +# Glossary output directory +OUTPUT_GLOSSARY_PATH := "transform/output/glossary/" +# download saxon library +get-saxon: + mkdir -p transform + cd transform && curl -L -o saxon.zip "https://kumisystems.dl.sourceforge.net/project/saxon/Saxon-HE/10/Java/SaxonHE10-6J.zip" && unzip saxon.zip && rm -rf saxon.zip + +# Clone model2owl if the directory model2owl does not exist +get-model2owl-repo: + @mkdir -p transform + @cd transform && git clone https://github.com/OP-TED/model2owl.git + +# download xspec framework to run unit tests +get-xspec: + cd transform && rm -rf xspec && curl -L -o xspec.zip https://github.com/xspec/xspec/archive/refs/tags/v2.2.4.zip && unzip xspec.zip -d model2owl && rm -rf xspec.zip && cd model2owl && ln -s xspec-* xspec -list: - ls -l -install: - echo Your current branch is: ${curBranch} - git checkout utilities -- frameworks.zip lib.zip - cp frameworks.zip /tmp/ - cp lib.zip /tmp/ - git checkout ${curBranch} +# Initialize the project, download model2owl repo, install saxon and dependencies +init: get-saxon get-model2owl-repo get-xspec + +# Run unit_tests +unit-tests: + @cd transform/model2owl && ant -lib ../saxon-he-10.6.jar unit_tests - # Unzip - unzip /tmp/frameworks.zip -d . - unzip /tmp/lib.zip -d . +# Combine xmi UML files +merge-xmi: + @mkdir -p transform/output/combined-xmi/ + @java -jar transform/saxon-he-10.6.jar -s:${FIRST_INPUT_XMI_FILE} -xsl:transform/model2owl/src/xml/merge-multi-xmi.xsl -o:${OUTPUT_COMBINED_XMI_PATH}/ePO-combined.xml + @echo The combined document is located at "${OUTPUT_COMBINED_XMI_PATH}/ePO-combined.xml" + @ls -lh ${OUTPUT_COMBINED_XMI_PATH}/ePO-combined.xml - # Clean up - rm -rf /tmp/frameworks.zip - rm -rf /tmp/lib.zip - git rm -rf frameworks.zip - git rm -rf lib.zip -tests: - ant -lib lib/saxon*.jar unit_tests \ No newline at end of file +# Generate the glossary +generate-glossary: + @mkdir -p "${OUTPUT_GLOSSARY_PATH}" + @java -jar transform/saxon-he-10.6.jar -s:${OUTPUT_COMBINED_XMI_PATH}/ePO-combined.xml -xsl:transform/model2owl/src/html-model-glossary.xsl -o:${OUTPUT_GLOSSARY_PATH}/glossary.html + @echo The combined glossary is located at ${OUTPUT_GLOSSARY_PATH}/glossary.html + @echo + @ls -lh ${OUTPUT_GLOSSARY_PATH}/glossary.html + @echo + @head ${OUTPUT_GLOSSARY_PATH}/glossary.html + @echo ... + @tail ${OUTPUT_GLOSSARY_PATH}/glossary.html \ No newline at end of file diff --git a/README.md b/README.md index c359d10d..017e599e 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,16 @@ The input eProcurement conceptual model is available in the [eProcurement Ontolo We assume that the users of this project are familiar with XML, UML and XSLT technologies and know how to perform an XSLT transformation. +## Combine multiple XMI / XML UML documents +make merge-xmi + +This will merge multiple input XMI / XML UML documents into a single one. The output is located under ./output/combined-xmi/ and will be used to generate a single glossary. + +## Generate the glossary from the merged document +make generate-glossary + +The glossary will generated and located in the ./output/glossary/ + ## Repository Structure * /src - source code of the XSLT scripts generating the HTML conventions report. diff --git a/build.xml b/build.xml index 9c314fc8..b06ebc7a 100644 --- a/build.xml +++ b/build.xml @@ -4,10 +4,10 @@ Run unit tests - + - + diff --git a/config/ePO-default/config-parameters.xsl b/config/ePO-default/config-parameters.xsl index 49912307..ea41b76b 100644 --- a/config/ePO-default/config-parameters.xsl +++ b/config/ePO-default/config-parameters.xsl @@ -2,16 +2,20 @@ + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:dct="http://purl.org/dc/terms/" + xmlns:skos="http://www.w3.org/2004/02/skos/core#" + version="3.0"> @@ -21,6 +25,9 @@ + + + @@ -81,35 +88,13 @@ - - eProcurement datashapes - This module provides the datashape definitions for the eProcurement ontology. - - eProcurement core ontology - - This module provides the definitions for the core eProcurement ontology. - - Procurement data has been identified as data with a - high-reuse potential. Given the increasing importance of data standards for - eProcurement, a number of initiatives driven by the public sector, the industry and - academia have been kick-started in recent years. Some have grown organically, while - others are the result of standardisation work. The vocabularies and the semantics that - they are introducing, the phases of public procurement that they are covering, 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. - - eProcurement extended ontology - This module provides the inference-related definitions for - the eProcurement ontology. + - - - + + + diff --git a/config/ePO-default/namespaces.xml b/config/ePO-default/namespaces.xml index 09e8118c..ebed0036 100644 --- a/config/ePO-default/namespaces.xml +++ b/config/ePO-default/namespaces.xml @@ -14,8 +14,11 @@ - + + + + @@ -29,8 +32,7 @@ - - + \ No newline at end of file diff --git a/config/metadata.xml b/config/metadata.xml new file mode 100644 index 00000000..df2efdd4 --- /dev/null +++ b/config/metadata.xml @@ -0,0 +1,21 @@ + + + eProcurement core ontology + + 3.0.1 + + + This module provides the definitions for the core eProcurement ontology. + Procurement data has been identified as data with a high-reuse potential. + Given the increasing importance of data standards for eProcurement, a number of initiatives + driven by the public sector, the industry and academia have been kick-started in recent years. + Some have grown organically, while others are the result of standardisation work. + The vocabularies and the semantics that they are introducing, the phases of public procurement that they are covering, + 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. + + + + + \ No newline at end of file diff --git a/src/reasoning-layer-lib/connectors-reasoning-layer.xsl b/src/reasoning-layer-lib/connectors-reasoning-layer.xsl index 5b329ba1..7d04bd12 100644 --- a/src/reasoning-layer-lib/connectors-reasoning-layer.xsl +++ b/src/reasoning-layer-lib/connectors-reasoning-layer.xsl @@ -99,7 +99,7 @@ - Rule 12 (Association source in reasnoning layer) .Specify object property domain + Rule 12 (Association source in reasnoning layer). Specify object property domain for the target end of the association. @@ -114,8 +114,12 @@ - --> + + diff --git a/src/xml/merge-multi-xmi.xsl b/src/xml/merge-multi-xmi.xsl index a6e8ca21..53cb0363 100644 --- a/src/xml/merge-multi-xmi.xsl +++ b/src/xml/merge-multi-xmi.xsl @@ -2,22 +2,28 @@ + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:dct="http://purl.org/dc/terms/" + xmlns:skos="http://www.w3.org/2004/02/skos/core#" + version="3.0"> - - + + + + @@ -27,7 +33,7 @@ - + @@ -36,7 +42,7 @@ - + @@ -46,7 +52,7 @@ - + diff --git a/test/metadata.xml b/test/metadata.xml new file mode 100644 index 00000000..df2efdd4 --- /dev/null +++ b/test/metadata.xml @@ -0,0 +1,21 @@ + + + eProcurement core ontology + + 3.0.1 + + + This module provides the definitions for the core eProcurement ontology. + Procurement data has been identified as data with a high-reuse potential. + Given the increasing importance of data standards for eProcurement, a number of initiatives + driven by the public sector, the industry and academia have been kick-started in recent years. + Some have grown organically, while others are the result of standardisation work. + The vocabularies and the semantics that they are introducing, the phases of public procurement that they are covering, + 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. + + + + + \ No newline at end of file diff --git a/test/test-multi-xmi/tmp/ePO-CM_v2.0.1-3.03.2020.xmi b/test/test-multi-xmi/tmp/ePO-CM_v2.0.1-3.03.2020.xmi deleted file mode 100644 index 7e9cb9cf..00000000 --- a/test/test-multi-xmi/tmp/ePO-CM_v2.0.1-3.03.2020.xmi +++ /dev/null @@ -1,23247 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -