17 lines
363 B
JavaScript
17 lines
363 B
JavaScript
/**
|
|
* @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;
|
|
}
|