Datasets:
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 skos: <http://www.w3.org/2004/02/skos/core#> | |
prefix xsd: <http://www.w3.org/2001/XMLSchema#> | |
## | |
# banner Definitions shouldn't be circular - this finds direct circularities therein. | |
SELECT DISTINCT ?error ?definition ?label | |
WHERE { | |
?subject rdfs:label ?label . | |
FILTER NOT EXISTS {?subject owl:deprecated "true"^^xsd:boolean} . | |
?subject skos:definition ?definition . | |
FILTER NOT EXISTS {?subject a owl:NamedIndividual} . | |
FILTER (REGEX(?definition, "\\W"+?label+"\\W")) | |
FILTER regex(str(?subject), <HYGIENE_TESTS_FILTER_PARAMETER>) | |
BIND ( | |
concat ("PRODERROR: Definition of ", str(?subject), " is immediately circular ") | |
AS ?error | |
) | |
} |