skosjs icon indicating copy to clipboard operation
skosjs copied to clipboard

Use with local Blazegraph

Open redskate opened this issue 7 years ago • 4 comments

Hi Thomas

I have my Blazegraph server under a local url like http://10.0.1.130:8888/bigdata/namespace/GETTY_AAT/sparql (blazegraph 2.1.4) which is de facto a SPARQL 1.1 endpoint.

The repository is: triples with text index (no quads, no graphs)

when I use your demo and I give this in both fields (select and update) skosjs throw a warning and says "could not list graphs" ...

This repository is used already by SKOS Shuttle - https://skosshuttle.ch so it should contain something like SKOS in a default graph...

What am I missing to get it running?

Thanks (and my compliments) Cheers Fabio

redskate avatar Mar 18 '17 14:03 redskate

Hi! The query that is issued is:

   SELECT DISTINCT  ?uri ?title
   WHERE
     {   { GRAPH ?uri
             { ?uri  a                     <http://tkurz.github.com/skosjs/ns/2012/03/Project> }
         }
       UNION
         { GRAPH ?uri
             { ?a  a                     <http://www.w3.org/2004/02/skos/core#Concept> }
         }
       OPTIONAL
         { ?uri  <http://purl.org/dc/terms/title>  ?title }
     }

So it should work. It seems that the endpoint does not return data: http://10.0.1.130:8888/bigdata/namespace/GETTY_AAT/sparql/select?query=SELECT%20DISTINCT%20%3Furi%20%3Ftitle%20WHERE%20%7B%20%7BGRAPH%20%3Furi%20%7B%20%3Furi%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type%3E%3Chttp%3A%2F%2Ftkurz.github.com%2Fskosjs%2Fns%2F2012%2F03%2FProject%3E%20%7D%7DUNION%20%7BGRAPH%20%3Furi%20%7B%20%3Fa%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23type%3E%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23Concept%3E%20%7D%7DOPTIONAL%20%7B%3Furi%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2Ftitle%3E%20%3Ftitle.%7D%7D

tkurz avatar Mar 20 '17 08:03 tkurz

Hi :) and thank you for your query.

This query forces the Triple Store to be in Quad mode. This is not always the case.

In my case I have a triple store in triple mode. In this case the triple store (with a namespace in triple mode) throw an exception:

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.bigdata.rdf.sparql.ast.QuadsOperationInTriplesModeException: Use of WITH and GRAPH constructs in query body is not supported in triples mode.

So maybe you might want to think on that ? Hope that helped.

Pfuirti

redskate avatar Mar 20 '17 18:03 redskate

Hi. SKOSjs is always assuming that contexts/graphs exists (so that it is a quadstore). As you can see in https://github.com/tkurz/skosjs/blob/master/js/skos-client.js it is included in many queries. SKOSjs is currently not in development, but it would be great if you can to contribute here !

tkurz avatar Mar 21 '17 08:03 tkurz

Hi

thank you for your message. SKOS Shuttle is not assuming that and actually you do not need a graph to retrieve triples. There is something like a “default-graph” you might consider :) Ok, so I will wait until I will have something inside a graph.

Thank you and enjoy Fabio

On 21 Mar 2017, at 09:17, Thomas Kurz [email protected] wrote:

Hi. SKOSjs is always assuming that contexts/graphs exists (so that it is a quadstore). As you can see in https://github.com/tkurz/skosjs/blob/master/js/skos-client.js https://github.com/tkurz/skosjs/blob/master/js/skos-client.js it is included in many queries. SKOSjs is currently not in development, but it would be great if you can to contribute here !

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tkurz/skosjs/issues/32#issuecomment-288006000, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7rrTFLxDerHCiE5DXrRBhD2Fl1DlIJks5rn4eggaJpZM4Mhbe4.

redskate avatar Mar 23 '17 08:03 redskate