From 741dd725142848dd301ba3f0ca4c0358b12860c2 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sun, 10 Mar 2024 13:05:55 +0200 Subject: [PATCH 1/3] Fixing the invalid xref check --- docs/report_queries/invalid_xref.md | 2 +- robot-core/src/main/resources/report_queries/invalid_xref.rq | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/report_queries/invalid_xref.md b/docs/report_queries/invalid_xref.md index e3fca754b..a2ab3c4f5 100644 --- a/docs/report_queries/invalid_xref.md +++ b/docs/report_queries/invalid_xref.md @@ -11,7 +11,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity diff --git a/robot-core/src/main/resources/report_queries/invalid_xref.rq b/robot-core/src/main/resources/report_queries/invalid_xref.rq index 85b754264..fb6226279 100644 --- a/robot-core/src/main/resources/report_queries/invalid_xref.rq +++ b/robot-core/src/main/resources/report_queries/invalid_xref.rq @@ -10,7 +10,7 @@ PREFIX rdfs: SELECT DISTINCT ?entity ?property ?value WHERE { VALUES ?property {oboInOwl:hasDbXref} ?entity ?property ?value . - FILTER (!regex(?value, "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$")) + FILTER (!regex(?value, "^[A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_]:[^\\s]+$")) FILTER (!isBlank(?entity)) } ORDER BY ?entity From f1b32a2d8cae33e8db4a6439e34e61074fa23e6e Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Sun, 10 Mar 2024 13:08:00 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a7181f1..44eb2c6d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [`merge`] and 'annotate' operations '--annotate-defined-by' excludes reserved OWL 2 vocabularies [#1171] - Handle IRIs that are not entities in export [#1168] - Fix integration tests [#1181] +- Invalid Xrefs test has been fixed to recognise invalid CURIEs correctly [#1127] ## [1.9.5] - 2023-09-20 From 6fda11918fe5e7686ff64cc324cd1b1595ee5b6c Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Tue, 12 Mar 2024 22:59:31 +0200 Subject: [PATCH 3/3] Add broken xref as example --- docs/examples/report.tsv | 2 ++ docs/examples/uberon_fragment.owl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/examples/report.tsv b/docs/examples/report.tsv index 671a44a20..ca8312a9b 100644 --- a/docs/examples/report.tsv +++ b/docs/examples/report.tsv @@ -2,6 +2,8 @@ Level Rule Name Subject Property Value ERROR missing_ontology_description http://purl.obolibrary.org/obo/uberon.owl dc:description ERROR missing_ontology_license http://purl.obolibrary.org/obo/uberon.owl dc:license ERROR missing_ontology_title http://purl.obolibrary.org/obo/uberon.owl dc:title +WARN invalid_xref BFO:0000051 oboInOwl:hasDbXref BFO-:0000051 +WARN invalid_xref BFO:0000062 oboInOwl:hasDbXref :0000062 WARN missing_definition BFO:0000050 IAO:0000115 WARN missing_definition BFO:0000051 IAO:0000115 WARN missing_definition BFO:0000063 IAO:0000115 diff --git a/docs/examples/uberon_fragment.owl b/docs/examples/uberon_fragment.owl index 83a9116f0..ccf8beeb8 100644 --- a/docs/examples/uberon_fragment.owl +++ b/docs/examples/uberon_fragment.owl @@ -262,7 +262,7 @@ has_part - BFO:0000051 + BFO-:0000051 has_part has_part uberon @@ -276,7 +276,7 @@ preceded_by - BFO:0000062 + :0000062 X preceded_by Y iff: end(Y) before_or_simultaneous_with start(X) is preceded by preceded_by