Project

General

Profile

« Previous | Next » 

Revision 51231

sparql queries are now freemarker templates where the subjectURL can be injected

View differences:

D1_Digital_Object.sparql
11 11
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
12 12

  
13 13
CONSTRUCT {
14
?s crm:P1_is_identified_by ?title .
15
?s crm:P3_has_note ?description .
16
?s a ?type .
14
<${subjectURL}> crm:P1_is_identified_by ?title .
15
<${subjectURL}> crm:P3_has_note ?description .
16
<${subjectURL}> a ?type .
17 17

  
18
?s crmpe:PP16_has_persistent_digital_object_part ?obj1 .
19
?s crmpe:PP17_has_snapshot ?obj2 .
20
?s crmpe:PP18_has_digital_object_part ?obj3 .
18
<${subjectURL}> crmpe:PP16_has_persistent_digital_object_part ?obj1 .
19
<${subjectURL}> crmpe:PP17_has_snapshot ?obj2 .
20
<${subjectURL}> crmpe:PP18_has_digital_object_part ?obj3 .
21 21

  
22
?s crmpe:PP19_has_persistent_software_part ?sw1 .
23
?s crmpe:PP21_has_software_part ?sw2 .
24
?s crmpe:PP22_has_release ?sw3 .
22
<${subjectURL}> crmpe:PP19_has_persistent_software_part <${subjectURL}>w1 .
23
<${subjectURL}> crmpe:PP21_has_software_part <${subjectURL}>w2 .
24
<${subjectURL}> crmpe:PP22_has_release <${subjectURL}>w3 .
25 25

  
26
?s crmpe:PP23i_is_dataset_part_of ?container .
27
?s crm:P129_is_about ?about .
28
?s crmpe:PP20_has_persistent_dataset_part ?d1 .
29
?s crmpe:PP39_is_metadata_for ?d2 .
30
?s crmpe:PP23_has_dataset_part ?d3 .
31
?s crmpe:PP24_has_dataset_snapshot ?d4 .
32
?s crmpe:PP41_is_index_of ?d5 .
26
<${subjectURL}> crmpe:PP23i_is_dataset_part_of ?container .
27
<${subjectURL}> crm:P129_is_about ?about .
28
<${subjectURL}> crmpe:PP20_has_persistent_dataset_part ?d1 .
29
<${subjectURL}> crmpe:PP39_is_metadata_for ?d2 .
30
<${subjectURL}> crmpe:PP23_has_dataset_part ?d3 .
31
<${subjectURL}> crmpe:PP24_has_dataset_snapshot ?d4 .
32
<${subjectURL}> crmpe:PP41_is_index_of ?d5 .
33 33

  
34 34
}
35 35
WHERE {
36 36
{
37
 ?s a crmdig:D1_Digital_Object .
38
 ?s a ?type .
37
 <${subjectURL}> a crmdig:D1_Digital_Object .
38
 <${subjectURL}> a ?type .
39 39
}
40 40
OPTIONAL
41 41
{
42
 ?s crm:P1_is_identified_by ?titleRes .
42
 <${subjectURL}> crm:P1_is_identified_by ?titleRes .
43 43
 ?titleRes rdfs:label ?title .
44 44
}
45 45
OPTIONAL
46 46
{
47
 ?s crm:P3_has_note ?description .
47
 <${subjectURL}> crm:P3_has_note ?description .
48 48
}
49 49

  
50
 OPTIONAL{?s crmpe:PP16_has_persistent_digital_object_part ?obj1 .}
51
 OPTIONAL{?s crmpe:PP17_has_snapshot ?obj2 .}
52
 OPTIONAL{?s crmpe:PP18_has_digital_object_part ?obj3 .}
50
 OPTIONAL{<${subjectURL}> crmpe:PP16_has_persistent_digital_object_part ?obj1 .}
51
 OPTIONAL{<${subjectURL}> crmpe:PP17_has_snapshot ?obj2 .}
52
 OPTIONAL{<${subjectURL}> crmpe:PP18_has_digital_object_part ?obj3 .}
53 53

  
54
 OPTIONAL{?s crmpe:PP19_has_persistent_software_part ?sw1 .}
55
 OPTIONAL{?s crmpe:PP21_has_software_part ?sw2 .}
56
 OPTIONAL{?s crmpe:PP22_has_release ?sw3 .}
54
 OPTIONAL{<${subjectURL}> crmpe:PP19_has_persistent_software_part <${subjectURL}>w1 .}
55
 OPTIONAL{<${subjectURL}> crmpe:PP21_has_software_part <${subjectURL}>w2 .}
56
 OPTIONAL{<${subjectURL}> crmpe:PP22_has_release <${subjectURL}>w3 .}
57 57

  
58
 OPTIONAL{?s crmpe:PP23i_is_dataset_part_of ?container .}
59
 OPTIONAL{?s crm:P129_is_about ?about .}
60
 OPTIONAL{?s crmpe:PP20_has_persistent_dataset_part ?d1 .}
61
 OPTIONAL{?s crmpe:PP39_is_metadata_for ?d2 .}
62
 OPTIONAL{?s crmpe:PP23_has_dataset_part ?d3 .}
63
 OPTIONAL{?s crmpe:PP24_has_dataset_snapshot ?d4 .}
64
 OPTIONAL{?s crmpe:PP41_is_index_of ?d5 .}
58
 OPTIONAL{<${subjectURL}> crmpe:PP23i_is_dataset_part_of ?container .}
59
 OPTIONAL{<${subjectURL}> crm:P129_is_about ?about .}
60
 OPTIONAL{<${subjectURL}> crmpe:PP20_has_persistent_dataset_part ?d1 .}
61
 OPTIONAL{<${subjectURL}> crmpe:PP39_is_metadata_for ?d2 .}
62
 OPTIONAL{<${subjectURL}> crmpe:PP23_has_dataset_part ?d3 .}
63
 OPTIONAL{<${subjectURL}> crmpe:PP24_has_dataset_snapshot ?d4 .}
64
 OPTIONAL{<${subjectURL}> crmpe:PP41_is_index_of ?d5 .}
65 65
}

Also available in: Unified diff