How to obtain all graphs Example

  1. 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} }

  2. 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.

Related