-
Notifications
You must be signed in to change notification settings - Fork 3
TiNG Triples in Named Graph
timrdf edited this page Apr 1, 2013
·
35 revisions
- Naming sparql service description's sd:NamedGraph
- Named graphs that know where they came from (approach 1 and approach 2)
Need to compare seven named graphs that drive http://ieeevis.tw.rpi.edu/search-graphics/v1/tree:
- lam-2012-evaluations-2-categories
- lam-2012-evaluations-7-scenarios
- 2-categories/version/2013-Mar-21/source/lodspeakr-basic-menu.svg
- 7-scenarios/version/2013-Mar-21/source/lodspeakr-basic-menu.svg
- ScenarioPaperopencodingcleancopy.txt.xml.ttl.graffle
- ScenarioPaperopencodingcleancopy.txt.xml.ttl.graphml
- ScenarioPaperopencodingcleancopy.txt.xml.ttl.v6.graffle
First, how to get the data without cheating?
- http://ieeevis.tw.rpi.edu/namedGraphs doesn't list the graphic named graphs. Didn't use pvload; hacked a bash for loop on vload.
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
bash-3.2$ resource-name.sh --named-graph http://ieeevis.tw.rpi.edu/sparql http://ieeevis.tw.rpi.edu/lam-2012-evaluations-7-scenarios
http://ieeevis.tw.rpi.edu/sparql?query=PREFIX+sd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fsparql-service-description%23%3E+CONSTRUCT+%7B+%3Fendpoints_named_graph+%3Fp+%3Fo+%7D+WHERE+%7B+GRAPH+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E+%7B+%5B%5D+sd%3Aurl+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Fsparql%3E%3B+sd%3AdefaultDatasetDescription+%5B+sd%3AnamedGraph+%3Fendpoints_named_graph+%5D+.+%3Fendpoints_named_graph+sd%3Aname+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E%3B+%3Fp+%3Fo+.+%7D+%7D
bash-3.2$ md5.sh -qs http://ieeevis.tw.rpi.edu/sparql?query=PREFIX+sd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fsparql-service-description%23%3E+CONSTRUCT+%7B+%3Fendpoints_named_graph+%3Fp+%3Fo+%
7D+WHERE+%7B+GRAPH+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E+%7B+%5B%5D+sd%3Aurl+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Fsparql%3E%3B+sd%3AdefaultDatasetDescripti
on+%5B+sd%3AnamedGraph+%3Fendpoints_named_graph+%5D+.+%3Fendpoints_named_graph+sd%3Aname+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E%3B+%3Fp+%3Fo+.+%7D+%7D
80f1c94b2396f699244bc09ca627e0bd
md5.sh -qs http://ieeevis.tw.rpi.edu/sparql => c61001101192882645af4eb05fc63150
@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/id/triple/99f6fb6ba82a159ec66b671aa114d2a6>
a rdf:Statement;
dcterms:isPartOf <http://ieeevis.tw.rpi.edu/id/named-graph/80f1c94b2396f699244bc09ca627e0bd>;
# omitting SPO b/c we don't care (yet)
.
<http://ieeevis.tw.rpi.edu/id/named-graph/80f1c94b2396f699244bc09ca627e0bd>
a sd:NamedGraph;
sd:name <http://ieeevis.tw.rpi.edu/lam-2012-evaluations-7-scenarios>;
# sd:graph ...;
prov:hadLocation <http://ieeevis.tw.rpi.edu/sparql>;
owl:sameAs <http://ieeevis.tw.rpi.edu/sparql?query=PREFIX+sd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fsparql-service-description%23%3E+CONSTRUCT+%7B+%3Fendpoints_named_graph+%3Fp+%3Fo+%7D+WHERE+%7B+GRAPH+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E+%7B+%5B%5D+sd%3Aurl+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Fsparql%3E%3B+sd%3AdefaultDatasetDescription+%5B+sd%3AnamedGraph+%3Fendpoints_named_graph+%5D+.+%3Fendpoints_named_graph+sd%3Aname+%3Chttp%3A%2F%2Fieeevis.tw.rpi.edu%2Flam-2012-evaluations-7-scenarios%3E%3B+%3Fp+%3Fo+.+%7D+%7D>;
.