-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
770 additions
and
0 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,4 @@ | ||
{ | ||
"label": "SHACL Viz", | ||
"position": 2 | ||
} |
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.
Large diffs are not rendered by default.
Oops, something went wrong.
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,25 @@ | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX elm: <http://data.europa.eu/snb/model/elm/> | ||
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | ||
|
||
SELECT ?field {} | ||
VALUES ?field { | ||
xsd:string | ||
xsd:int | ||
xsd:integer | ||
xsd:positiveInteger | ||
xsd:dateTime | ||
rdf:langString | ||
xsd:anyURI | ||
xsd:boolean | ||
xsd:duration | ||
xsd:decimal | ||
xsd:double | ||
rdf:HTML | ||
skos:ConceptScheme | ||
skos:Concept | ||
elm:Identifier | ||
elm:WebResource | ||
elm:Note | ||
} |
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 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Example Usage | ||
|
||
- Download the SHACL Viz executable JAR: | ||
```bash | ||
curl -o shaclviz.jar https://repo1.maven.org/maven2/zone/cogni/semanticz/semanticz-shaclviz/1.0.1/semanticz-shaclviz-1.0.1-executable.jar | ||
``` | ||
|
||
- The following command (run using Java 17+) creates the diagram of the [ACQF data model](https://data.acqf-qcp.africa/) (for up-to-date version check the website) preconfiguring [classes to be visualised as fields](./acqf-field-query.rq): | ||
```bash | ||
java -jar shaclviz.jar acqf-exchange-model.ttl acqf-exchange-model.puml --fieldQuery=acqf-field-query.rq | ||
``` | ||
![acqf-exchange-model.svg](acqf-exchange-model.svg) | ||
|
||
- To see how the diagram looks like with the default field selection, run: | ||
```bash | ||
java -jar shaclviz.jar acqf-exchange-model.ttl acqf-exchange-model-full.puml | ||
``` | ||
![acqf-exchange-model-full.svg](acqf-exchange-model-full.svg) | ||
|
||
- full syntax can be checked by running `java -jar shaclviz.jar` and more examples can be found [here](https://github.com/cognizone/semanticz-shaclviz). |
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,12 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Features | ||
- visualizing ontology classes/properties (not their SHACL shapes) | ||
- displaying labels (SHACL label overrides the ontology label) and cardinalities | ||
- visualizing user-defined classes as fields | ||
- support for attribute filtering (e.g. include only required attributes) | ||
- export to | ||
- PlantUML (for easy visualization) | ||
- yEd (for advanced layouts and manual editing) |
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,22 @@ | ||
--- | ||
title: SHACL Viz | ||
slug: /shaclviz | ||
--- | ||
|
||
[SHACL Viz](https://github.com/cognizone/semanticz-shaclviz) draws a SHACL diagram for a _SHACL data model_ of the following form: | ||
- each shape is an IRI (not blank node) | ||
- each node shape has a `sh:targetClass` pointing to a single OWL class . | ||
- each property shape has a `sh:path` pointing to a single property. | ||
|
||
<table> | ||
<tr style="vertical-align: top "><td> | ||
Instead of SHACL-based diagrams ... | ||
|
||
![](shaclviz-example-before.png) | ||
</td><td> | ||
... SHACLViz creates OWL-based diagrams (user-defined classes can be rendered as fields - e.g. skos:Concept) | ||
|
||
|
||
![](shaclviz-example-after.png) | ||
</td></tr> | ||
</table> |
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.