Skip to content

TiNG Triples in Named Graph

timrdf edited this page Apr 1, 2013 · 35 revisions

What is first

What we will cover

Let's get to it

Need to compare seven named graphs that drive http://ieeevis.tw.rpi.edu/search-graphics/v1/tree:

First, how to get the data without cheating?

Have a mirror-endpoint that benefits from pvload, but that's useless since we hacked the graph loads.

(magic gets me the files)

file system:

ScenarioPaperopencodingcleancopy.txt.xml.ttl.v6.graffle.ttl
ScenarioPaperopencodingcleancopy.txt.xml.ttl.v6.graffle.ttl.sd_name
ScenarioPaperopencodingcleancopy.txt.xml.ttl.graphml.ttl
ScenarioPaperopencodingcleancopy.txt.xml.ttl.graphml.ttl.sd_name

new-script.sh *.ttl (or, find *.ttl | xargs new-script.sh > ../ting.ttl) :

while [ $# -gt 0 ]; do
   file="$1"
   if [[ -e $file ]]; then 
      if [[ -e $file.sd_name ]]; then
         # 
         hash=`md5.sh -qs $spo`
         echo $CSV2RDF4LOD_BASE_URI/triple/$hash

      fi
   fi
done
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix sd:      <http://www.w3.org/ns/sparql-service-description#> .
@prefix void:    <http://rdfs.org/ns/void#> .

<http://ieeevis.tw.rpi.edu/triple/99f6fb6ba82a159ec66b671aa114d2a6>
   a rdf:Statement;
   dcterms:isPartOf :some-abstract-graph;
   # omitting SPO b/c we don't care (yet)
.

<http://ieeevis.tw.rpi.edu/sparql?query=PREFIX%20sd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fsparql-service-description%23%3E%20CONSTRUCT%20%7B%20%3Fendpoints_named_graph%20%3Fp%20%3Fo%20%7D%20WHERE%20%7B%20GRAPH%20%3Chttps%3A%2F%2Fgithub.com%2Ftimrdf%2Fcsv2rdf4lod-automation%2Fwiki%2FNaming-sparql-service-description%2527s-sd%253ANamedGraph%3E%20%7B%20%5B%5D%20sd%3Aurl%20%3Chttp%3A%2F%2Flogd.tw.rpi.edu%3A8890%2Fsparql%3E%3B%20sd%3AdefaultDatasetDescription%20%5B%20sd%3AnamedGraph%20%3Fendpoints_named_graph%20%5D%20.%20%3Fendpoints_named_graph%20sd%3Aname%20%3Chttps%3A%2F%2Fgithub.com%2Ftimrdf%2Fcsv2rdf4lod-automation%2Fwiki%2FNaming-sparql-service-description%2527s-sd%253ANamedGraph%3E%3B%20%3Fp%20%3Fo%20.%20%7D%20%7D>;
.

<http://ieeevis.tw.rpi.edu/sparql?query=PREFIX%20sd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fsparql-service-description%23%3E%20CONSTRUCT%20%7B%20%3Fendpoints_named_graph%20%3Fp%20%3Fo%20%7D%20WHERE%20%7B%20GRAPH%20%3Chttps%3A%2F%2Fgithub.com%2Ftimrdf%2Fcsv2rdf4lod-automation%2Fwiki%2FNaming-sparql-service-description%2527s-sd%253ANamedGraph%3E%20%7B%20%5B%5D%20sd%3Aurl%20%3Chttp%3A%2F%2Flogd.tw.rpi.edu%3A8890%2Fsparql%3E%3B%20sd%3AdefaultDatasetDescription%20%5B%20sd%3AnamedGraph%20%3Fendpoints_named_graph%20%5D%20.%20%3Fendpoints_named_graph%20sd%3Aname%20%3Chttps%3A%2F%2Fgithub.com%2Ftimrdf%2Fcsv2rdf4lod-automation%2Fwiki%2FNaming-sparql-service-description%2527s-sd%253ANamedGraph%3E%3B%20%3Fp%20%3Fo%20.%20%7D%20%7D>
   a sd:NamedGraph;
   sd:name <foo>;
   sd:graph :some-abstract-graph;
.

What is next