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
Currently, when I want to use, for example a local version of the NIF core ontology instead of the official version at /opt/nif-core.ttl, I can declare this using: bin/rdf-unit -s /opt-nif-core.ttl -d /opt/nif-doc-to-test.ttl
But if I use a file URL, the initialisation fails - a org.aksw.rdfunit.io.reader.RDFDereferenceReader and org.aksw.rdfunit.io.reader.RDFaReader are tried, which both seem only to expect and accept RDF/XML: bin/rdf-unit -s file:///opt-nif-core.ttl -d /opt/nif-doc-to-test.ttl <- fails
This specific issue should probably be fixed, but then still a user just wanting to re-route a single ontology to a local work-in-progress version would not be able to utilize the convenient automatic LOV-resolution for other vocabs appearing in the document ot validate.
I would propose a different approach, that introduced a new command line switch --prefix-remap:
Proposed semantics: Initialize the prefix <-> schema-uri BiMap as before, but afterwards merge the map provided from the command line into the default BiMap. This allows (as in the example scenario) easy-rerouting for test purposes and to specify additional prefixes for vacabularies that did not make it to LOV yet.
The -s switch could then really just expect prefix names (as many identifiers in the code already suggest), making its semantics clearer to follow by users and less error-prone to implement.
Currently, when I want to use, for example a local version of the NIF core ontology instead of the official version at
/opt/nif-core.ttl
, I can declare this using:bin/rdf-unit -s /opt-nif-core.ttl -d /opt/nif-doc-to-test.ttl
But if I use a file URL, the initialisation fails - a
org.aksw.rdfunit.io.reader.RDFDereferenceReader
andorg.aksw.rdfunit.io.reader.RDFaReader
are tried, which both seem only to expect and acceptRDF/XML
:bin/rdf-unit -s file:///opt-nif-core.ttl -d /opt/nif-doc-to-test.ttl
<- failsThis specific issue should probably be fixed, but then still a user just wanting to re-route a single ontology to a local work-in-progress version would not be able to utilize the convenient automatic LOV-resolution for other vocabs appearing in the document ot validate.
I would propose a different approach, that introduced a new command line switch
--prefix-remap
:bin/rdf-unit --prefix-map 'nif:/opt-nif-core.ttl' -d /opt/nif-doc-to-test.ttl
Proposed semantics: Initialize the prefix <-> schema-uri BiMap as before, but afterwards merge the map provided from the command line into the default BiMap. This allows (as in the example scenario) easy-rerouting for test purposes and to specify additional prefixes for vacabularies that did not make it to LOV yet.
The
-s
switch could then really just expect prefix names (as many identifiers in the code already suggest), making its semantics clearer to follow by users and less error-prone to implement.@jimkont What do you think?
The text was updated successfully, but these errors were encountered: