# Title: # Definition Source Required # Constraint Description: # All CCO classes and object properties that have a skos:definition should also # have a cco:ont00001754 [definition source] annotation. Terms missing a # definition source are flagged as warnings. Some terms may legitimately lack a # source (e.g., primitive relations); those should be reviewed case by case. # Severity: # Warning # Reference: # CCO Release Process v2, Step 6h # Pattern based on: min_1_eng_def.sparql # Author: # github.com/shanmukhkalasamudram PREFIX owl: PREFIX rdfs: PREFIX skos: PREFIX cco: SELECT DISTINCT ?resource ?label ?error WHERE { VALUES ?type { owl:Class owl:ObjectProperty } ?resource a ?type . # Must have a definition (already caught by min_1_eng_def if missing) ?resource skos:definition ?definition . # Scope to current CCO terms only FILTER (regex(str(?resource), "https://www.commoncoreontologies.org/")) FILTER (!isBlank(?resource)) # Flag those missing a definition source OPTIONAL { ?resource cco:ont00001754 ?source } FILTER (!bound(?source)) OPTIONAL { ?resource rdfs:label ?label } BIND (CONCAT("WARNING: Term ", str(?resource), " has a definition but is missing cco:ont00001754 [definition source].") AS ?error) } ORDER BY ?resource