eddieantonio / node-sparql-client

A SPARQL client for Node.js
Other
19 stars 12 forks source link

add Inference to endpoint #10

Open maria-grigorieva opened 7 years ago

maria-grigorieva commented 7 years ago

Hi, is it possible to add DEFINE input:inference "ontology:ontology_name" to execute inference-based requests?

eddieantonio commented 7 years ago

Hello,

Since inference is a feature of the SPARQL endpoint, and not the client, this should not be a problem. Try it! Let me know if there are any issues if a query with inference works on a different client fails on sparql-client-2.

maria-grigorieva commented 7 years ago

Hi, for example, query like this:

DEFINE input:inference "ontology:" SELECT *WHERE { ?subj ?property ?obj . } can be executed in Virtuoso Web client, but with sparql-client-2 it fails.

eddieantonio commented 7 years ago

Hi Maria,

Thanks for the bug report! Is there a publicly accessible endpoint I can try this inference query on?

maria-grigorieva commented 7 years ago

Hi ) You can check it here: http://linkeddata.uriburner.com/sparql

with example request

DEFINE input:inference "vcardTofoaf"
PREFIX foaf:  <http://xmlns.com/foaf/0.1/>

SELECT ?s ?ln ?fn ?email
FROM <urn:sparql:fed:demo:foaf:addressbook>
FROM <urn:sparql:fed:demo:vcard:addressbook>
WHERE 
  { 
    ?s foaf:familyName ?ln ;
        foaf:givenName ?fn ;
          foaf:mbox ?email . 
  }