1

I have created an ontology (.owl file) using Protege. The SPARQL Query tab in Protege works fine while querying the ontology, indicating that the ontology is free from errors. I have also uploaded this .owl file to my website (say http://www.abc.me/trial.owl). I apologise for not being able to provide the actual link.

I need to create a webpage using HTML and JavaScript to run SPARQL queries on this ontology. I've come across https://github.com/ktym/d3sparql but I'm not so clear with the concept of endpoints.

How do I go about querying my .owl file from my webpage?

help-info.de
  • 6,695
  • 16
  • 39
  • 41
  • 1
    You simply have to use a Javascript SPARQL API. d3sparql is more for SPARQL + visualization of the results, that's not what you want. But you can also simply use an AJAX call, see http://stackoverflow.com/questions/22769701/how-to-query-dbpedia-in-javascript – UninformedUser May 19 '17 at 18:51
  • 1
    Possible duplicate of [how to query Dbpedia in Javascript](http://stackoverflow.com/questions/22769701/how-to-query-dbpedia-in-javascript) – UninformedUser May 19 '17 at 18:51
  • Roughly speaking, SPARQL endpoint is a web service providing access to a triplestore through SPARQL queries. Thus, you need a triplestore with your data and a web service exposed. However, there are solutions like [rdfstore-js](https://github.com/antoniogarrote/rdfstore-js). – Stanislav Kralin May 20 '17 at 08:25
  • @Stanislav Kralin Thank you! Is there no way for me to directly query my ontology, which is on my website, from another website that I'm building? I'm a bit new to all this. How do I get started? – Vikram Bajaj May 20 '17 at 11:33
  • See [API](https://github.com/antoniogarrote/rdfstore-js/blob/master/README.md#api). – Stanislav Kralin May 20 '17 at 11:47

0 Answers0