| Crates.io | owl2shacl |
| lib.rs | owl2shacl |
| version | 0.2.0 |
| created_at | 2025-06-20 06:26:21.517759+00 |
| updated_at | 2025-06-20 06:26:21.517759+00 |
| description | A CLI tool that tries to convert simple OWL ontologies into SHACL shapes. OWL ontologies define logical relationships. SHACL shapes define a data scheme, and allow to validate data against them. Strictly speaking, as these are different things, such a conversion is thus illegal/wrong in the ideological/theoretical sense. Thus this tool is not generally applicable, but only under the circumstance, that the OWL ontology is actually written as a data specification - if it is understood as a kind of distributed database schema, rather then for logical inference. Not only that, but it also has to conform to certain, very narrow rules, and only a few basic properties are translated into SHACL; the rest is ignored. |
| homepage | https://codeberg.org/elevont/owl2shacl |
| repository | https://codeberg.org/elevont/owl2shacl |
| max_upload_size | |
| id | 1719178 |
| size | 157,137 |
owl2shaclA CLI tool that tries to convert simple OWL ontologies into SHACL shapes. OWL ontologies define logical relationships. SHACL shapes define a data scheme, and allow to validate data against them. Strictly speaking, as these are different things, such a conversion is thus illegal/wrong in the ideological/theoretical sense. Thus this tool is not generally applicable, but only under the circumstance, that the OWL ontology is actually written as a data specification - if it is understood as a kind of distributed database schema, rather then for logical inference. Not only that, but it also has to conform to certain, very narrow rules, and only a few basic properties are translated into SHACL; the rest is ignored.
Roughly speaking, this tool supports a 25% subset of OWL Lite, plus some third party properties.
More specifically:
Class (Thing, Nothing)rdf:Propertyrdfs:subPropertyOfrdfs:domainrdfs:rangeIndividualequivalentClassequivalentPropertysameAsdifferentFromAllDifferentdistinctMembersObjectPropertyDatatypePropertyinverseOfTransitivePropertySymmetricPropertyFunctionalPropertyInverseFunctionalPropertyRestrictiononPropertyallValuesFromsomeValuesFromminCardinalitymaxCardinalitycardinalityOntologyimportsintersectionOfversionInfopriorVersionbackwardCompatibleWithincompatibleWithDeprecatedClassDeprecatedPropertyrdfs:labelrdfs:commentrdfs:seeAlsordfs:isDefinedByAnnotationPropertyOntologyPropertyxsd datatypesYou need to install Rust(lang) and Cargo.
Then get the whole repo plus git sub-modules with:
git clone --recurse-submodules https://codeberg.org/elevont/owl2shacl.git
cd owl2shacl
Then you can run:
cargo build --release
If all goes well, the executable can be found at target/release/owl2shacl.
As for now, you have two choices: