ontodia
ontodia copied to clipboard
Prepopulating with specific resource
Is is possible to add a resource to the workspace on initialization
e.g. I would like to show a specific dbpedia resource when I initialize the workspace.
Currently I use this method which seems to work:
let elm = workspace.getModel().dataProvider.elementInfo({elementIds: ['http://example.com/resource']});
elm.then(function(arg){
workspace.getModel().createElement(arg['http://example.com/resource'])
});```
There’s the way of specifying the graph to visualize at the startup, see example in ontodia/src/examples/sparqlRDFGraph.ts, and you can use GraphBuilder:createGraph(), pass the single URL into elementIds and an empty array to links to specify only one element to present.
okay, that is clear, do you allow forking of the wiki ? then I'll do a pull request on a wikipage
Thanks for being eager to submit a PR to wiki!
As I said here - https://github.com/sputniq-space/ontodia/issues/185#issuecomment-469180540 - we are reconsidering the open source support model, but still intend to continue with it in the future. It is the question of how it will be managed. Once clear on it, we will notify you and the entire community and inform on the new process.