Skip to content

Commit c04bd0c

Browse files
committed
Extend README with description of the RDF diffing feature
1 parent a781852 commit c04bd0c

1 file changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The following capabilities are addressed:
3131
* UML -> JSON-LD context (an accompanying context file for the ontology, suitable for use in JSON-LD applications)
3232
* UML -> SVRL (Compliance report in SVRL format)
3333
* UML -> ReSpec documentation (comprehensive documentation of the ontology project)
34+
* Generation of diff reports in both machine-readable (JSON) and human-readable (AsciiDoc) formats
3435

3536
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/).
3637

@@ -84,9 +85,12 @@ make owl-core XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/file1.xml OUTPUT_FOL
8485
* **get-saxon** - this will install saxon in a folder inside the project
8586
* **get-rdflib** - this will install rdflib library
8687
* **get-widoco** - this will install saxon in a folder inside the project
87-
* **get-jinja** – this will install Jinja2 inside the project folder.
88-
* **get-jq** – this will install jq inside the project folder.
88+
* **get-jinja** – this will install Jinja2 inside the project folder
89+
* **get-jq** – this will install jq inside the project folder
8990
* **install** - this will automatically execute all the commands above
91+
* **get-rdf-differ** – installs RDF Differ in a local directory
92+
* **start-rdf-differ-services** – starts Traefik and the Docker-based RDF Differ services
93+
* **stop-rdf-differ-services** – stops RDF Differ Docker and Traefik services
9094
* **create-virtual-env** - this creates a virtual environment for the project
9195
#### Functional commands
9296
* **generate-glossary** - this generates a glossary from the UML export (xml/xmi)
@@ -152,6 +156,18 @@ make owl-core XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/file1.xml OUTPUT_FOL
152156
* NAMESPACES_USER_XML_FILE_PATH - path to the *.xml file containing namespaces
153157
* IMPORTS_XML_FILE_PATH - path to the *.xml file containing ontology URIs to be imported
154158
* RESPEC_JSON_INDENTATION - (optional) number of spaces for indentation in the generated JSON file. Default is 2
159+
* **merge-owl-shacl** – merges an OWL ontology file with a SHACL shapes file into a combined output TTL file.
160+
* parameters:
161+
* MERGE_ONTOLOGY_FILE - path to the OWL ontology file (default: `test/diffing-files/ePO_core-4.1.0.ttl`)
162+
* MERGE_SHAPES_FILE - path to the SHACL shapes file (default: `test/diffing-files/ePO_core_shapes-4.1.0.ttl`)
163+
* MERGE_OUTPUT_FILE - path to the output file (default: `${OUTPUT_FOLDER_PATH}/ePO_core_combined-1.0.ttl`)
164+
* **run-rdf-diff** – runs RDF diffing workflow between two RDF files using RDF Differ services and produces a diff report. The report type is determined by the `RDF_DIFF_TEMPLATE`.
165+
* parameters:
166+
* RDF_DIFF_FILE1 - path to the first RDF file (default: `test/diffing-files/ePO_core-4.1.0.ttl`)
167+
* RDF_DIFF_FILE2 - path to the second RDF file (default: `test/diffing-files/ePO_core-4.2.0.ttl`)
168+
* RDF_DIFF_OUTDIR - folder to store the diff output (default: `${OUTPUT_FOLDER_PATH}`)
169+
* RDF_DIFF_AP - application profile used for diffing (default: `owl-core-en-only`)
170+
* RDF_DIFF_TEMPLATE - template format for diff report (default: `html`)
155171
* **merge-xmi** - this will merge xmis from specific folder
156172
* parameters:
157173
* FIRST_XMI_TO_BE_MERGED_FILE_PATH - path to the first xmi to be merged. All xmi files need to be
@@ -357,6 +373,23 @@ Example
357373
make owl-core XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/file1.xml OUTPUT_FOLDER_PATH=./my-folder
358374
```
359375

376+
### Generating diff reports
377+
Model2owl uses the [RDF Differ](https://meaningfy-ws.github.io/rdf-differ-ws/)
378+
tool to calculate differences between two RDF graphs and to generate diff
379+
reports in AsciiDoc and JSON formats. It compares either two OWL core files or
380+
two pairs consisting of an OWL core file and a SHACL shapes file. When SHACL
381+
files are provided, the comparison scope additionally covers domain, range, and
382+
cardinality properties. The comparison scope is defined in an application
383+
profile suitable for comparing OWL ontologies. Details on how the RDF Differ
384+
tool works, produced reports, and how to interpret them can be found in the [project
385+
documentation](https://github.com/meaningfy-ws/rdf-differ-ws/blob/master/README.md).
386+
387+
Model2owl integrates the tool (via its CLI client) and provides a dedicated set
388+
of commands to interact with it (see the descriptions of the `run-rdf-diff` and
389+
`merge-owl-shacl` commands in [Functional commands](#functional-commands)). Apart from
390+
the functional tools, it also provides utility commands for installing and setting up
391+
the tool (see [Setting up commands](#setting-up-commands)).
392+
360393
### Testing
361394
There are three Make targets dedicated to testing the software:
362395
* `test` - runs all tests.

0 commit comments

Comments
 (0)