What is the SPARQL query to get the name of all graphs existing in my triplestore?

左心房为你撑大大i 提交于 2019-11-28 00:17:45

问题


I want to get the name of all existing graphs in my Fuseki server, it should return a message with a list of all graphs name.


回答1:


I have tried the answer given by Joshua Taylor in Virtuoso, but got nothing.

Maybe it's different between fuseki and virtuoso. So I provide a sparql for virtuoso users who just find the answer like me.

SELECT DISTINCT ?g 
WHERE {
  GRAPH ?g { ?s ?p ?o }
}



回答2:


Without more context, we don't know whether you mean some additional metadata about the "name" of a graph, or what you mean exactly by "a message with a list of all graphs name", but it sounds like you might just want:

SELECT ?g 
WHERE {
  GRAPH ?g { }
}


来源:https://stackoverflow.com/questions/32274562/what-is-the-sparql-query-to-get-the-name-of-all-graphs-existing-in-my-triplestor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!