-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated content from
feature/EPO-721
branch of the OPT-TED/model2ow…
…l repository
- Loading branch information
Showing
46 changed files
with
2,530 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doc/* linguist-documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ feature/* , main, hotfix/*, release/* ] | ||
# pull_request: | ||
# branches: [ main, release/* ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and Run Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Build and Run Tests | ||
run: mvn install | ||
- name: current dir | ||
run: pwd | ||
- name: current dir | ||
run: ls -la ./target/surefire-reports | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: success() || failure() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/target/surefire-reports/test-*.xml' | ||
detailed_summary: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ Special thanks for all the people who had helped this project so far. | |
* [Eugeniu Costetchi]([email protected]) | ||
* [Dragos Paun]([email protected]) | ||
|
||
|
||
## Contributors | ||
|
||
* [Csongor Nyulas]([email protected]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Contributors | ||
|
||
Special thanks for all the people who had helped this project so far. | ||
|
||
## Developers | ||
* | ||
* [Eugeniu Costetchi]([email protected]) | ||
* [Dragos Paun]([email protected]) | ||
|
||
## Contributors | ||
|
||
* [Csongor Nyulas]([email protected]) | ||
* [Andreea-Nicoleta Pasare]([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,90 @@ | ||
# model2owl-docs | ||
# model2owl | ||
|
||
[Read online](https://meaningfy-ws.github.io/model2owl-docs/0.0.1/index.html) | ||
This project comprises a set of tools for transforming an UML (v2.5) model from its XMI (v2.5.1) serialisation into a formal ontology. This transformation is performed using XSLT stylesheets under the assumption that the UML model conforms to the set of conventions outlined in the documentation. | ||
|
||
This repository covers the documentation for [model2owl project](https://github.com/OP-TED/model2owl). | ||
* UML -> OWL 2 (light / complete) | ||
* UML -> SHACL | ||
|
||
model2owl if a set of tools for transforming UML (v2.5) model from its XMI (v2.5.1) serialisation into an OWL formal ontology, SHACl data shapes ad glossary. This transformation is performed using XSLT stylesheets under the assumption that the UML model conforms to the set of conventions outlined in the documentation. | ||
This work is developed in the context of [eProcurement ontology project](https://github.com/eprocurementontology/eprocurementontology) financed by the Digital Europe Programme and led by the [Publications Office of the European Union](https://op.europa.eu/en/). | ||
|
||
# Contributing | ||
### Documents | ||
* The **architectural design** and the formal specifications are provided in the [Ontology architecture document](docs/ontology-architecture/ontology-architecture.pdf). | ||
* The technical **conventions** for the UML representation of the conceptual model are provided in [UML conventions document](docs/uml-conventions/uml-conventions.pdf) | ||
* An **inventory** of conformance tests derived from the UML conventions document are provided in the [Inventory Worksheet document](docs/checkers-inventory/eProcurement conceptual model checkers inventory.xlsx) | ||
* The **transformation rules** from UML into OWL and SHACL are provided in the [uml2owl transformation document](docs/uml2owl-transformation/uml2owl-transformation.pdf) | ||
|
||
### Scripts | ||
* [html-conventions-report.xsl](src/html-conventions-report.xsl) is the script checking the conformance to the technical conventions of the conceptual model. | ||
* [owl-core.xsl](src/owl-core.xsl) is the transformation script for the core OWL ontology. | ||
* [shacl-shapes.xsl](src/shacl-shapes.xsl) is the transformation script for the SHACL data shape constraints | ||
* [owl-restrictions.xsl](src/owl-restrictions.xsl) is the transformation script for the restrictions of OWL ontology (on classes and properties). | ||
|
||
### Script unit tests | ||
|
||
* [test/unitTest/test-html-conventions-lib]( | ||
https://github.com/meaningfy-ws/model2owl/tree/master/test/unitTests/test-html-conventions-lib) is the location of the unit tests for the script checking the conformance to the technical conventions of the conceptual model are | ||
* [test/unitTest/test-owl-core-lib](https://github.com/meaningfy-ws/model2owl/tree/master/test/unitTests/test-owl-core-lib) is the location of the unit tests for the transformation script for the core OWL ontology. | ||
|
||
* [test/unitTest/test-shacl-shape-lib](https://github.com/meaningfy-ws/model2owl/tree/master/test/unitTests/test-shacl-shape-lib) is the location of the unit tests for the transformation script for the SHACL data shape constraints. | ||
* [test/unitTest/reasoning-layer-lib](https://github.com/meaningfy-ws/model2owl/tree/master/test/unitTests/reasoning-layer-lib) is the location of the unit tests for the transformation script for the restrictions of OWL ontology (on classes and properties). | ||
|
||
## Running the transformation | ||
|
||
The scripts developed in this project conform to XSLT 3.0 and can be executed with a corresponding XSLT engine of choice. A recommendation is to use [Saxon-HE](http://saxon.sourceforge.net/), but it is not the only one. | ||
|
||
The input eProcurement conceptual model is available in the [eProcurement Ontology project on GitHub](https://github.com/eprocurementontology/eprocurementontology). Note that the XMI (v.2.5.1) output is generated with [Enterprise Architect](https://sparxsystems.com/products/ea/index.html) and was not tested with outputs from other software (although, XMI is an OMG standard). But, this does not restrict the current scripts to this project alone and any UML model that conforms to the specified UML conventions can be transformed into a formal ontology. | ||
|
||
We assume that the users of this project are familiar with XML, UML and XSLT technologies and know how to perform an XSLT transformation. | ||
|
||
## Automation with Makefile | ||
|
||
## Create an virtual environment | ||
pip install virtualenv | ||
virtualenv venv | ||
## Activate your venv | ||
source venv/bin/activate | ||
|
||
## Install rdflib inside your virtual environment | ||
pip install rdflib | ||
|
||
## 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. | ||
* /common , /html-conventions-lib, /reasoning-layer-lib and /shacl-shape-lib contain modules loaded by the main files. | ||
* /static contains JS and CSS styles refereed by HTML reports. It should be copied to wherever the report is saved in order to ensure proper display. | ||
* config-parameters.xsl - the configurations file that may be adjusted as necessary. | ||
* html-conventions-report.xsl - source code of the XSLT scripts generating the HTML conventions report. | ||
* owl-core.xsl - Transformation script for the core ontology | ||
* shacl-shapes.xsl - Transformation script for the SHACL shapes | ||
* owl-restrictions.xsl - Transformation script for the ontology intensional definitions based on the class and property restrictions | ||
|
||
* /test - contains unit tests for each XSL module ensuring the correct implementation. | ||
* /test/unitTests - contain XSpec unit tests | ||
* /test/testData - test data used in the unit tests | ||
|
||
# Contributing | ||
You are more than welcome to help expand and mature this project. | ||
|
||
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. | ||
|
||
Please note we adhere to [Apache code of conduct](https://www.apache.org/foundation/policies/conduct), please follow it in all your interactions with the project. | ||
Please note we adhere to [Apache code of conduct](https://www.apache.org/foundation/policies/conduct), please follow it in all your interactions with the project. | ||
|
||
## Licence | ||
|
||
The documents, such as reports and specifications, available in the /doc folder, are licenced under a [CC BY 4.0 licence](https://creativecommons.org/licenses/by/4.0/deed.en). | ||
|
||
The XSLT (stylesheets) and other scripts are licenced under [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) licence. | ||
|
||
|
||
|
||
# Licence | ||
|
||
The documents, such as reports and specifications are licenced under a [CC BY 4.0 licence](https://creativecommons.org/licenses/by/4.0/deed.en). | ||
|
||
The source code and other scripts are licenced under [EUPL v1.2](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12) licence. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:math="http://www.w3.org/2005/xpath-functions/math" | ||
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" | ||
xmlns:fn="http://www.w3.org/2005/xpath-functions" | ||
exclude-result-prefixes="xs math xd xsl uml xmi umldi dc fn" | ||
xmlns:uml="http://www.omg.org/spec/UML/20131001" | ||
xmlns:xmi="http://www.omg.org/spec/XMI/20131001" | ||
xmlns:umldi="http://www.omg.org/spec/UML/20131001/UMLDI" | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:functx="http://www.functx.com" | ||
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"> | ||
|
||
<!-- Change below the location of your config parameters file--> | ||
|
||
<xsl:import href="test/ePO-default-config/config-parameters.xsl"/> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
name: ROOT | ||
version: 0.0.1 | ||
title: model2owl documentation | ||
version: public-review | ||
title: model2owl Documentation | ||
start_page: ROOT:index.adoc | ||
asciidoc: | ||
attributes: | ||
imagesdir: images | ||
xrefstyle: short@ | ||
example-caption: Rule@ | ||
example-refsig: Rulota | ||
listing-caption: Listing@ | ||
listing-refsig: Listing | ||
table-refsig: Tabella | ||
counter: rule-cnt@ | ||
nav: | ||
- modules/ROOT/nav.adoc | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.