VOS.VirtTipsAndTricksGuideAllGraphs
How to obtain all graphs Example
-
Using SPARQL Query: The most popular way for obtaining all graphs list, presuming every graph contains at least one triple for some rdf:type of some subject, is to execute the following query:
SQL> SPARQL SELECT DISTINCT ?g WHERE { GRAPH ?g {?s a ?t} }
-
Using Virtuoso built-in function:: Another solution is to use the Virtuoso DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS function:
SQL> DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS(); GRAPH_IRI VARCHAR _______________________________________________________________________________ http://www.openlinksw.com/schemas/virtrdf# http://localhost:8890/DAV http://localhost:8890/dataspace http://localhost:8890/dataspace/inf 4 Rows. -- 14 msec.