Draft Ontology module
This commit is contained in:
16
js/ontology.js
Normal file
16
js/ontology.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @module Ontology
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load an ontology from its JSON description
|
||||
* @param {String} jsonPath The path (URI) of the ontology JSON file
|
||||
* @returns {Object}
|
||||
*/
|
||||
export async function loadOntology(jsonPath) {
|
||||
const ontology = await fetch(jsonPath)
|
||||
.then(res => res.json())
|
||||
.catch(err => console.error(err));
|
||||
|
||||
return ontology;
|
||||
}
|
||||
Reference in New Issue
Block a user