Skip to content

Rooted path finding

Tim L edited this page Jul 17, 2013 · 5 revisions

What we will cover

This page enumerates some examples of a common problem to understand how two resource sets relate within a large RDF graph.

Example 1: Constructing void:Linksets from SPO Balance summaries

One dataset: SPO Balance of the exemplar dataset

Two target resource sets:

  • Objects of any sio:has-member
  • Instances of sd:NamedGraph

Objective:

Review all paths from the sd:NamedGraphs to the objects of sio:has-member, choose the subset of paths desired, and build a query for a service to construct a void:Linkset graph from the SPO Balance summary.

Example 2: Two-level SPO Balance navigation

Four datasets with overlapping resources:

  • how-o-is-lod crawl,
  • SPO Balance against ieeevis.tw.rpi.edu/sparql,
  • Centrifuge's clustering, and
  • Centrifuge's tablized embedding.

Two target resource sets:

  • Instances of vsr:Root/prov:Collections (from Centrifuge),
  • Instances of vsr:SPODataset (from SPO Balance)

Objective:

See how these two sets relate within the graph.

Example 3: Datahub dataset to its dump file

Two target resource sets:

Context: Four datasets with overlapping resources:

A 1,130,030 triple union of the following RDF graphs:

  • how-o-is-lod crawl,
  • SPO Balance against ieeevis.tw.rpi.edu/sparql,
  • Centrifuge's clustering, and
  • Centrifuge's tablized embedding.

Objective:

The two resources should relate via void:dataDump, but the SPARQL query does not return results. So, we need to see how they actually are related.

Answer:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX datafaqs: <http://purl.org/twc/vocab/datafaqs#>
PREFIX dcat:     <http://www.w3.org/ns/dcat#>
PREFIX void:     <http://rdfs.org/ns/void#>

SELECT ?dataset ?type ?dump
WHERE {
  #?dataset a ?type; void:dataDump ?dump .
  ?dataset dcat:distribution [ dcat:accessURL ?dump; dcterms:format [ rdfs:label "application/x-ntriples"; ] ] .
}
Clone this wiki locally