<?php
require_once ("header.php");
setGlobals();
$q = "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl:<http://www.w3.org/2002/07/owl#>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX crm:<http://www.cidoc-crm.org/rdfs/cidoc_crm_v5.0.2_english_label.rdfs#>
PREFIX rro:<https://rdf.ng-london.org.uk/raphael/ontology/>
PREFIX rri:<https://rdf.ng-london.org.uk/raphael/resource/>
SELECT
?text ?id ?title ?label ?im ?thumb ?caption
?child ?child_id ?child_title ?child_label
?child_im ?child_thumb ?child_caption
WHERE {
?text rro:RP17.has_identifier ?id ;
rro:RP34.has_title ?title ;
rdfs:label ?label ;
rdf:type rro:RC220.Digital_Text .
Optional {
?text rro:RP40.is_related_to ?im .
?im rdf:type rro:RC25.Image ;
rro:RP259.has_thumbnail ?thumb ;
rro:RP233.has_caption ?caption . }.
Optional {
?child rro:RP99.is_part_of ?text ;
rro:RP17.has_identifier ?child_id ;
rro:RP34.has_title ?child_title ;
rdfs:label ?child_label ;
rdf:type rro:RC220.Digital_Text .
Optional {
?child rro:RP40.is_related_to ?child_im .
?child_im rdf:type rro:RC25.Image ;
rro:RP259.has_thumbnail ?child_thumb ;
rro:RP233.has_caption ?child_caption . }.
} .
FILTER ( ?text = rri:Hofmann_Provenance_2008_NG1171_NG6480_Part_I_0001 ) . }";
$r = selectQuery($q, true);
echo "<pre>";
print_r ($r);
echo "</pre>";
?>
|