| 1 | PREFIX pbo: <https://ontology.property.local/pbo#> |
| 2 | PREFIX ex: <https://ontology.property.local/pbo/example#> |
| 3 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
| 4 | PREFIX skos: <http://www.w3.org/2004/02/skos/core#> |
| 5 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> |
| 6 | |
| 7 | # CQ-015: properties whose intended operating model requires an authorisation type that is missing, pending or expired. |
| 8 | SELECT DISTINCT ?property ?operatingModel ?jurisdiction ?requiredAuthorisation ?status WHERE { |
| 9 | ?p a ?pt ; rdfs:label ?property ; pbo:intendedOperatingModel ?om ; pbo:locatedIn ?loc . |
| 10 | ?pt rdfs:subClassOf* pbo:PropertyAsset . |
| 11 | ?loc pbo:withinJurisdiction* ?j . |
| 12 | ?regime pbo:appliesToOperatingModel ?om ; pbo:appliesIn ?j ; pbo:requiresAuthorisationType ?at . |
| 13 | ?om skos:prefLabel ?operatingModel . ?j rdfs:label ?jurisdiction . ?at skos:prefLabel ?requiredAuthorisation . |
| 14 | OPTIONAL { ?p pbo:hasAuthorisation ?auth . ?auth pbo:authorisationType ?at ; pbo:authorisationStatus ?st } |
| 15 | BIND(COALESCE(?st, "missing") AS ?status) |
| 16 | FILTER(?status IN ("missing", "pending", "expired", "refused")) |
| 17 | } ORDER BY ?property ?requiredAuthorisation |