gtfierro/ontoenv

Add `rdf.json` export option

Opened this issue · 1 comments

ektrah commented

Mapping file form:
{
"<ontology URI>": ["list of file paths defining the ontology"],
}

rdf-toolkit currently uses this format:

{
    "files": {
        "<ontology URI>": "<ontology file path>", 
    }
}

Wrapping the mapping in another JSON object gives me the opportunity to add more information, such as shown here.

I imagine a small extension with big impact could be this:

{
    "files": {
        "<ontology URI>": "<ontology file path>", 
    },
    "sources": [
        "<rdf.json file path>",
    ]
}

For example, ontoenv would first check if any of the rdf.json files listed under "sources" contains an ontology, before downloading it to the cache folder and adding it to "files". This would allow to distribute ontology files in e.g. a .zip file or NPM package and reference these in a modular way.