One of the standard operations performed by the ODK when preparing import modules is to insert a dc:source
ontology annotation with the value of the ontology’s version IRI. This is done with robot query --update
and the following SPARQL query:
PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> INSERT { ?ontology dc:source ?version_iri . } WHERE { ?ontology rdf:type owl:Ontology ; owl:versionIRI ?version_iri . }
While the query itself is very simple, going through all the convoluted process to execute SPARQL queries with ROBOT (converting the ontology from the OWLAPI model to the Jena model, running the query on the Jena model, dumping the updated model in Turtle, then parsing the dumped Turtle back into a OWLAPI model) is a considerable waste of resources for a task that could be done with a handful of lines of Java code. In fact, that task is so resource-intensive that the ODK has to disable it for “large” import modules.
It would be very convenient if ROBOT allowed to perform that task without having to rely on SPARQL.
I propose that it should be possible to do something like this:
robot annotate --input my-ontology.owl \ --enable-interpolation true \ --link-annotation dc:source "%{version_iri}" \ --output my-annotated-ontology.owl
That is, make it possible to use %{version_iri}
or %{ontology_iri}
as placeholders within the values of the various *-annotation
options, to be replaced with the version IRI or the ontology IRI of the current ontology.
Thoughts?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4