Virtuoso Open-Source Edition

VOS.VirtTipsAndTricksGuideClearGraphsRelEmptyGraphs

  • Topic
  • Discussion
  • VOS.VirtTipsAndTricksGuideClearGraphsRelEmptyGraphs(Last) -- DAVWikiAdmin? , 2017-06-13 05:47:21 Edit WebDAV System Administrator 2017-06-13 05:47:21

    How to clear graphs which are related to empty graphs?

    The following example demonstrates how to remove graphs which are related to empty graphs:

    PREFIX nrl:<http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#>
    SELECT ( bif:exec(bif:sprintf("SPARQL CLEAR GRAPH<%s>", str(?mg))))
    WHERE 
      {
        ?mg nrl:coreGraphMetadataFor ?g .
        FILTER(?g in ( <urn:nepomuk:local:8a9e692a> )) .
        FILTER ( !bif:exists((SELECT (1) WHERE { GRAPH ?g { ?s ?p ?o . } . })) ) .
      }
    

    Related