You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The robot query command performing an update operation drops prefixes when the output is .ofn or .omn but not .owl (all I tested). This seems to be the same issue as #1101 except it's happening for robot update queries and wasn't fixed by PR #1106 (still happens in 1.9.5). The doid-edit.owl input file is formatted as .ofn. This happens for all SPARQL update queries I've tried (including a completely empty one, see bottom).
Thanks for pointing to #1106, which uses isPrefixOWLOntologyFormat() to check whether a format should use prefixes. That should be correct. In this case robot query is converting the input ontology to Turtle, loading into Jena, running SPARQL, converting back to Turtle, and reading in to OWLAPI again. I guess that the format of the input ontology is being lost. If I'm right, then the prefixes won't be preserved for RDFXML format either, but we might be setting decent prefixes in that case.
Do you (or anyone reading this) have time to dig into this issue? I have some big deadlines coming up.
I'd love to help more but I don't have sufficient expertise with Java (or sufficient familiarity with the internal workings of ROBOT/OWLAPI) to delve into this. My apologies.
The robot query command performing an update operation drops prefixes when the output is .ofn or .omn but not .owl (all I tested). This seems to be the same issue as #1101 except it's happening for robot update queries and wasn't fixed by PR #1106 (still happens in 1.9.5). The doid-edit.owl input file is formatted as .ofn. This happens for all SPARQL update queries I've tried (including a completely empty one, see bottom).
Prefixes dropped
.ofn output loses prefixes:
robot query -i doid-edit.owl --update fix_whitespace.rq -o tmp.ofn \ && mv tmp.ofn doid-edit.owl
Chaining
convert
doesn't help:robot \ query -i doid-edit.owl --update fix_whitespace.rq \ convert -o tmp.ofn \ && mv tmp.ofn doid-edit.owl
Separate
convert
doesn't help (for .ofn or .omn):Result:
Prefixes Preserved
.owl output preserves prefixes:
Using
--add-prefixes
also works (my current workaround):robot --add-prefixes prefixes.json \ query -i doid-edit.owl --update fix_whitespace.rq -o tmp.ofn \ && mv tmp.ofn doid-edit.owl
SPARQL queries
fix_whitespace.rq:
empty sparql update query:
prefixes.json file
The text was updated successfully, but these errors were encountered: