fibo2023Q3 / src /etc /testing /hygiene_parameterized /testHygiene_opaque_iris.sparql
wikipunk's picture
add FIBO Q3 2023 release to src
38b6321
raw
history blame
581 Bytes
prefix afn: <http://jena.apache.org/ARQ/function#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
##
# banner We should avoid opaque IRIs
SELECT DISTINCT ?error ?resource
WHERE
{
?resource ?property ?object.
FILTER (REGEX(afn:localname(?resource), "(\\d\\d\\d\\d+$)|([^A-Za-z][A-Za-z][^A-Za-z])"))
FILTER (REGEX(str(?resource), <HYGIENE_TESTS_FILTER_PARAMETER>))
FILTER NOT EXISTS {?resource rdf:type owl:NamedIndividual.}
BIND (concat ("PRODERROR: IRI ", STR(?resource), " may be opaque ") AS ?error)
}