Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
@prefix dash: <http://datashapes.org/dash#> .
@prefix ex: <http://datashapes.org/sh/tests/sparql/pre-binding/unsupported-sparql-006.test#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
ex:Country
rdf:type rdfs:Class ;
rdfs:label "Country" ;
.
ex:InvalidCountry1
rdf:type ex:Country ;
ex:englishLabel "Munich" ;
ex:germanLabel "Muenchen" ;
rdfs:label "Invalid country1" ;
.
ex:LanguageConstraintComponentUsingASK
rdf:type sh:ConstraintComponent ;
rdfs:label "Language constraint component" ;
sh:labelTemplate "Values are literals with language \"{$lang}\"" ;
sh:parameter [
sh:path ex:lang ;
sh:datatype xsd:string ;
sh:description "The language tag, e.g. \"de\"." ;
sh:minLength 2 ;
sh:name "language" ;
] ;
sh:validator ex:hasLang ; # This was changed by HK on 2018-09-21, see https://github.com/w3c/data-shapes/issues/101
.
ex:LanguageExampleShape
rdf:type sh:NodeShape ;
sh:property _:b41651 ;
sh:property _:b75747 ;
sh:targetClass ex:Country ;
.
ex:ValidCountry1
rdf:type ex:Country ;
ex:englishLabel "Beijing"@en ;
ex:germanLabel "Peking"@de ;
rdfs:label "Valid country1" ;
.
ex:englishLabel
rdfs:domain ex:Country ;
.
ex:germanLabel
rdfs:domain ex:Country ;
.
ex:hasLang
rdf:type sh:SPARQLAskValidator ;
sh:ask """
ASK {
BIND (true AS ?value) .
FILTER (isLiteral(?value) && langMatches(lang(?value), $lang))
}
""" ;
sh:message "Values are literals with language \"{?lang}\"" ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
<unsupported-sparql-006>
) ;
.
<unsupported-sparql-006>
rdf:type sht:Validate ;
rdfs:label "Test of ASK trying to reassign ?value" ;
mf:action [
sht:dataGraph <> ;
sht:shapesGraph <> ;
] ;
mf:result sht:Failure ;
mf:status sht:approved ;
.
_:b41651
sh:path ex:englishLabel ;
ex:lang "en" ;
.
_:b75747
sh:path ex:germanLabel ;
ex:lang "de" ;
.