Skip to content

Commit

Permalink
Merge pull request #1186 from ontodev/issue1127-invalidxref
Browse files Browse the repository at this point in the history
Fixing the invalid xref check
  • Loading branch information
jamesaoverton authored May 1, 2024
2 parents c1ad167 + 6fda119 commit e76c16e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,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

Expand Down
2 changes: 2 additions & 0 deletions docs/examples/report.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/uberon_fragment.owl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000051">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</rdfs:label>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000051</oboInOwl:hasDbXref>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO-:0000051</oboInOwl:hasDbXref>
<oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</oboInOwl:id>
<oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">has_part</oboInOwl:shorthand>
<oboInOwl:hasOBONamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#string">uberon</oboInOwl:hasOBONamespace>
Expand All @@ -276,7 +276,7 @@
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000062">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preceded_by</rdfs:label>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000062</oboInOwl:hasDbXref>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">:0000062</oboInOwl:hasDbXref>
<obo:IAO_0000115 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">X preceded_by Y iff: end(Y) before_or_simultaneous_with start(X)</obo:IAO_0000115>
<oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">is preceded by</oboInOwl:hasExactSynonym>
<oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preceded_by</oboInOwl:shorthand>
Expand Down
2 changes: 1 addition & 1 deletion docs/report_queries/invalid_xref.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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

0 comments on commit e76c16e

Please sign in to comment.