I am trying to use OpenLink Structured Data Editor (OSDE) to populate an RDF graph using a specific ontology as a TBox (as suggested in topic “Editing forms based on RDF/OWL classes?”) but I get a CORS error.
I have uploaded my ontology to be used as my documents’ TBox with base URI http://purl.org/myontology.owl in my local virtuoso instance, using its base URI as the graph name. Please note that this URI is also resolvable through a web browser, to the respective GitHub repository.
I create a new document in my OSDE instance and my first step would be to link my uploaded TBox ontology. When I try to add it (clicking the + button at the “Linked Vocabularies” section), I add a prefix (e.g. myontology) and the graph’s URI and finally get a CORS error message
Is the ODSE trying to resolve my URL on internet or try to get the local virtuoso graph? If it tries to get it through internet, it would reach github which could of course prevent CORS and this is out of my reach.
Is there a way to link a locally hosted ontology? Please note that I have already enabled CORS requests of local instance of Virtuoso.
Is there a guide to OSDE (apart from the overview youtube video)?
I note that site references an older RDF Editor VAD (0.17_git142) from 2017, with which I do get the CORS error you report with, but does not occur with the latest RDF Editor VAD (0.17_git181).
Unfortunately, the error remains. I have updated to version: 0.17_git181 and restarted my vm but still I get the exact same error. I do not understand why http://linkeddata.uriburner.com/ is called. Please note that I have also tested it starting chrome with no CORS protection. Therefore, it must be a server side problem, and it should be somehow related with the virtuoso endpoint asked for the graph, (which seems to be http://linkeddata.uriburner.com/).
I would kindly ask again my questions:
Is the OSDE trying to resolve my URL on internet or try to get the local virtuoso graph? If it tries to get it through internet, it would reach github which could of course prevent CORS and this is out of my reach.
Is there a way to link a locally hosted ontology? Please note that I have already enabled CORS requests of local instance of Virtuoso.
Is there a guide to OSDE (apart from the overview youtube video)?
Obviously, I miss something fundamental and therefore I cannot really translate your answer successfully to my setting. Using chrome plugin, I do not get a CORS error, but still I cannot import my ontology. Therefore, I will use chrome plugin to make things a little simpler but still they are not clear for me.
Let me rephrase my question setting and kindly insist on asking.
I have an ontology stored on a local virtuoso instance accessible on virtuoso_url:8890 (i.e. virtuoso_url:8890/conductor would be its administration interface and virtuoso_uri:8890/sparql would be the SPARQL endpoint). My ontology is stored on an RDF graph named graph_uri and the ontology’s base uri is base_uri. I can ask SPARQL queries on my ontology and get answers through the default HTML interface on virtuoso_uri:8890/sparql.
What would be the URI I should add to the “Linked Vocabularies” section of the OSDE to import my ontology concepts and use it as a reference terminology?
Since I can access my ontology through SPARQL endpoint (i.e. virtuoso_uri:8890/sparql), and ask SPARQL queries I suppose that I do not have to do anything else to “publish” my graph. Is this correct or do I have to do something?
PS. Thank you very much for your time. I really appreciate your help.
The issue here is that CORS needs to be enabled on the server on which the imported Ontology is deployed, from which it is retrieved.
OSDE is a Single-Page App (SPA) deployed using HTML, so the CORS sandbox in your browser takes control over HTTP requests that it issues.
A work around is as follows:
Open the RDF document associated with Ontology
Copy its content to your clipboard
Use the “Direct Input” feature and paste in the content
If, on the other hand, you are simply trying to use terms from a remote Ontology for RDF creation in OSDE, we can take a look at adding the “Direct Input” or some override to the Vocabulary binding feature too.
Okay, I suggest a new Github issue regarding the ability to import local ontologies using file: scheme URIs as a way to negate CORS issues afflicting some shared ontologies and vocabularies.
This is an enhancement to the Ontology/Vocabulary binding UI component.
I added a ticket in github as you suggested to be able to use locally hosted ontologies as linked vocabularies.
Is there a way to upload my ontology in a repository (perhaps a public repository, or
linkeddata uriburner ) and then use it as a “linked vocabulary” to reference its concepts?