Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More transparent facilites to specify local alternatives for LOV schema locations for CLI #39

Open
neradis opened this issue Aug 11, 2015 · 0 comments

Comments

@neradis
Copy link
Contributor

neradis commented Aug 11, 2015

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:

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?

jimkont added a commit that referenced this issue Sep 27, 2015
jimkont added a commit that referenced this issue Sep 27, 2015
jimkont added a commit that referenced this issue Sep 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant