-
Notifications
You must be signed in to change notification settings - Fork 1
/
who_collects.html
97 lines (92 loc) · 3.47 KB
/
who_collects.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[[!--
$ pwd
/home/researchspace/antheia/researchspace/data/templates
$ cat http%3A%2F%2Fwww.metaphacts.com%2Fresource%2Fwho_collects.html
--]]
<h1>Who collects manuscripts by actor</h1>
<p>Who collects
<a href="/resource/?uri=[[urlParam "actor"]]">
[[urlParam "actorName"]]
</a>?
</p>
<semantic-query
query='
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX efrbroo: <http://erlangen-crm.org/efrbroo/>
PREFIX mmm-actors: <http://ldf.fi/mmm/actor/>
PREFIX mmms: <http://ldf.fi/schema/mmm/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX ecrm: <http://erlangen-crm.org/current/>
SELECT (COUNT (DISTINCT ?collector) AS ?num_coll) WHERE {
VALUES ( ?actor )
{
( <[[urlParam "actor" ]]> )
}
?wce mmms:carried_out_by_as_author ?actor ;
efrbroo:R16_initiated ?w .
?mpe ecrm:P108_has_produced ?m .
?m a efrbroo:F4_Manifestation_Singleton ;
mmms:manuscript_work ?w .
{
{
?m ecrm:P51_has_former_or_current_owner ?collector .
}
UNION
{
?m ecrm:P46i_forms_part_of ?col .
?col ecrm:P51_has_former_or_current_owner ?collector .
}
}
} LIMIT 10000 '
template='<p>Number of collectors: {{> template}}</p>'
>
<template id="template">
{{#each bindings}}
{{num_coll.value}}
{{/each}}
</template>
</semantic-query>
<semantic-table
query='
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX efrbroo: <http://erlangen-crm.org/efrbroo/>
PREFIX mmm-actors: <http://ldf.fi/mmm/actor/>
PREFIX mmms: <http://ldf.fi/schema/mmm/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX ecrm: <http://erlangen-crm.org/current/>
SELECT DISTINCT ?actor ?collector ?cname WHERE {
VALUES ( ?actor )
{
( <[[urlParam "actor" ]]> )
}
?wce mmms:carried_out_by_as_author ?actor ;
efrbroo:R16_initiated ?w .
?mpe ecrm:P108_has_produced ?m .
?m a efrbroo:F4_Manifestation_Singleton ;
mmms:manuscript_work ?w .
{
{
?m ecrm:P51_has_former_or_current_owner ?collector .
}
UNION
{
?m ecrm:P46i_forms_part_of ?col .
?col ecrm:P51_has_former_or_current_owner ?collector .
}
}
?collector skos:prefLabel ?cname .
} LIMIT 10000'
column-configuration='[
{"displayName": "Collector", "variableName": "collector" },
{"displayName": "OthersBy",
"cellTemplate": "{{> others_by_same_in_collection}}" }
]'
no-result-template="No collectors."
>
<template id="others_by_same_in_collection">
<a href="mss_by_collection_author?actor={{actor.value}}&collector={{collector.value}}">others in collection</a>
</template>
</semantic-table>
<hr/>