Open dannymandel opened 1 year ago
The navocab
tool collates vocabularies from the .ttl files into a "triple store" using RDFLib, and supports various operations on the triple store. The process is a bit clunky, but basically involves building the store, then using the store to generate the json.
Building the store (can use local file path or url):
vocab load "https://raw.githubusercontent.com/isamplesorg/metadata/develop/src/vocabularies/materialtype.ttl"
vocab load "https://raw.githubusercontent.com/isamplesorg/metadata/develop/src/vocabularies/sampledfeature.ttl"
vocab load "https://raw.githubusercontent.com/isamplesorg/metadata/develop/src/vocabularies/specimentype.ttl"
Then adding the various extensions.
The webui JSON can be produced by:
vocab uijson VOCABULARY
Where VOCABULARY is one of the root vocabularies. These can be found by the command:
vocab vocabs
Then using one of the root vocabularies, and adding -e
to include the extensions. e.g.:
vocab uijson mat:materialsvocabulary -e
Output is json to stdout.
vocab uijson
as part of the build-e
when we run the materialsload
command -- give it the URLs to GitHub for the 3 ttl files when we generate the database at build time https://github.com/isamplesorg/metadata/tree/develop/src/vocabularies --make sure to grab the extension files as well