managerQuery.js 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. var queryManager = {
  2. prefixes : {
  3. all : "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \
  4. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \
  5. PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> \
  6. PREFIX owl: <http://www.w3.org/2002/07/owl#> \
  7. PREFIX schema: <http://schema.org/> \
  8. PREFIX foaf: <http://xmlns.com/foaf/0.1/> \
  9. PREFIX person: <http://www.w3.org/ns/person#> \
  10. PREFIX time: <https://www.w3.org/TR/owl-time#> "
  11. },
  12. queryMMO: {
  13. queryLabel : " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier \
  14. WHERE {<{GRAPH}> \
  15. GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
  16. ?subject rdfs:label ?label . \
  17. ?subject crm:P1_is_identified_by ?uri_identifier . \
  18. ?uri_identifier rdfs:label ?identifier ; \
  19. crm:P2_has_type 'Segnatura' . \
  20. <{WORD}> \
  21. }",
  22. queryArte : " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier ?type \
  23. WHERE { <{GRAPH}> \
  24. GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
  25. ?subject rdfs:label ?label ; \
  26. crm:P2_has_type ?type ; \
  27. crm:P1_is_identified_by ?uri_identifier . \
  28. ?uri_identifier rdfs:label ?identifier . \
  29. <{WORD}> \
  30. FILTER (?type = \"Opera d'Arte\") \
  31. }",
  32. queryIdentificatore: " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier \
  33. WHERE {<{GRAPH}> \
  34. GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
  35. ?subject rdfs:label ?label . \
  36. ?subject crm:P1_is_identified_by ?uri_identifier . \
  37. ?uri_identifier rdfs:label ?identifier ; \
  38. crm:P2_has_type 'Segnatura' . \
  39. FILTER (CONTAINS(?identifier, '<{WORD}>')) \
  40. }"
  41. },
  42. queryINF: {
  43. queryContenuti1: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?typeObj ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
  44. WHERE { <{GRAPH}> \
  45. GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
  46. rdfs:label ?label .} \
  47. OPTIONAL {?mmo crm:P128_carries ?subject ; \
  48. crm:P2_has_type ?typeObj . } \
  49. OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
  50. OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
  51. ?id_subject rdfs:label ?id ; \
  52. rdf:type crm:E42_Identifier . } \
  53. OPTIONAL {?subject crm:P2_has_type ?type . } \
  54. ?subject ?property ?object_Label . \
  55. <{WORD}> \
  56. }",
  57. queryContenuti2: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
  58. WHERE { <{GRAPH}> \
  59. GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
  60. rdfs:label ?label .} \
  61. OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
  62. OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
  63. ?id_subject rdfs:label ?id ; \
  64. rdf:type crm:E42_Identifier . } \
  65. OPTIONAL {?subject crm:P2_has_type ?type . } \
  66. VALUES ?object_type {crm:E1_Entity crm:E1_CRM_Entity crm:E41_Appellation crm:E62_String} \
  67. ?subject ?property ?object . \
  68. ?object rdfs:label ?object_Label . \
  69. ?object rdf:type ?object_type . \
  70. <{WORD}> \
  71. FILTER NOT EXISTS { ?property rdfs:label 'label' } \
  72. }",
  73. queryContenuti3: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
  74. WHERE {<{GRAPH}> \
  75. GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
  76. rdfs:label ?label .} \
  77. OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
  78. OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
  79. ?id_subject rdfs:label ?id ; \
  80. rdf:type crm:E42_Identifier . } \
  81. OPTIONAL {?subject crm:P2_has_type ?uri_type . \
  82. ?uri_type rdfs:label ?type . } \
  83. ?subject crm:P67_refers_to ?object_uri . \
  84. ?object_uri rdfs:label ?object_Label . \
  85. <{WORD}> \
  86. }"
  87. },
  88. queryPER: {
  89. queryNome: " SELECT DISTINCT ?g AS ?graph ?subject ?name \
  90. WHERE { <{GRAPH}> \
  91. GRAPH ?g { ?subject ?property ?object . } \
  92. ?subject rdf:type crm:E21_Person ; \
  93. foaf:name ?name . \
  94. <{WORD}> \
  95. } ",
  96. queryNote: " SELECT DISTINCT ?g AS ?graph ?subject ?name ?note \
  97. WHERE {<{GRAPH}> \
  98. GRAPH ?g { ?subject ?property ?object . } \
  99. ?subject rdf:type crm:E21_Person ; \
  100. foaf:name ?name . \
  101. ?subject crm:P3_has_note ?note . \
  102. <{WORD}> \
  103. }",
  104. queryOccupazione: " SELECT DISTINCT ?g AS ?graph ?subject ?name ?occupation \
  105. WHERE {<{GRAPH}> \
  106. GRAPH ?g { ?subject ?property ?object . } \
  107. ?subject rdf:type crm:E21_Person ; \
  108. foaf:name ?name . \
  109. ?subject schema:hasOccupation ?uri_occupation . \
  110. ?uri_occupation rdfs:label ?occupation . \
  111. <{WORD}> \
  112. }"
  113. },
  114. queryLG: {
  115. queryLuoghi : " SELECT DISTINCT ?g AS ?graph ?subject ?label \
  116. WHERE {<{GRAPH}> \
  117. GRAPH ?g { ?subject ?property ?object } \
  118. ?subject rdfs:label ?label ; \
  119. rdf:type crm:E53_Place ; \
  120. crm:P168_place_is_defined_by ?coords . \
  121. <{WORD}> \
  122. }"
  123. },
  124. queryRES: {
  125. queryExchange : " SELECT DISTINCT ?uri_document ?document ?time_span_from ?time_span_to ?uri_place_from ?place_from ?uri_place_to ?place_to \
  126. { \
  127. ?event_from rdfs:subClassOf ?event ; \
  128. rdf:type crm:EL2_Send_Letter . \
  129. ?event_to rdfs:subClassOf ?event ; \
  130. rdf:type crm:EL3_Receive_Letter . \
  131. \
  132. ?event_from crm:P01_has_domain ?pc_from . \
  133. ?pc_from crm:P02_has_range <{MITTENTE}> . \
  134. OPTIONAL {?event_from crm:P4_has_time-span ?uri_time_span_from . \
  135. ?uri_time_span_from rdfs:label ?time_span_from} \
  136. OPTIONAL {?event_from crm:P27_moved_from ?aspo_place_from . \
  137. ?aspo_place_from owl:sameAs ?uri_place_from . \
  138. ?uri_place_from rdfs:label ?place_from ; \
  139. crm:P168_place_is_defined_by ?coords_from} \
  140. \
  141. ?event_to crm:P01_has_domain ?pc_to . \
  142. ?pc_to crm:P02_has_range <{DESTINATARIO}> . \
  143. OPTIONAL {?event_to crm:P4_has_time-span ?uri_time_span_to . \
  144. ?uri_time_span_to rdfs:label ?time_span_to} \
  145. OPTIONAL {?event_to crm:P26_moved_to ?aspo_place_to . \
  146. ?aspo_place_to owl:sameAs ?uri_place_to . \
  147. ?uri_place_to rdfs:label ?place_to ; \
  148. crm:P168_place_is_defined_by ?coords_to} \
  149. \
  150. ?uri_document crm:P25i_moved_by ?event ; \
  151. rdfs:label ?document . \
  152. }",
  153. queryEsploraDocumenti : " SELECT DISTINCT ?document ?uri_document ?sigla ?time_span ?year ?month ?day ?text ?uri_infObj (group_concat(distinct ?type ;separator=', ') as ?types) \
  154. WHERE { \
  155. { ?uri_thing crm:P128_carries <{URI}> . \
  156. ?uri_infObj crm:P67_refers_to ?uri_thing . \
  157. } UNION { \
  158. ?uri_infObj crm:P67_refers_to <{URI}> . } \
  159. ?uri_document crm:P128_carries ?uri_infObj ; \
  160. rdfs:label ?document . \
  161. OPTIONAL {?uri_infObj crm:P2_has_type ?uri_type . \
  162. ?uri_type rdfs:label ?type . } \
  163. OPTIONAL {?uri_infObj crm:P190_has_symbolic_content ?text .} \
  164. GRAPH <http://147.213.76.182:8890/aspo/datini> {?uri_document crm:P25i_moved_by ?mov_ev .} \
  165. ?send rdfs:subClassOf ?mov_ev ; \
  166. rdf:type crm:EL2_Send_Letter . \
  167. OPTIONAL {?uri_infObj crm:P1_is_identified_by ?uri_sigla . \
  168. ?uri_sigla crm:P2_has_type ?sigla_type ; \
  169. rdfs:label ?sigla . \
  170. ?sigla_type rdfs:label 'Sigla OVI' .} \
  171. OPTIONAL {?send crm:P4_has_time-span ?uri_time_span . \
  172. ?uri_time_span rdfs:label ?time_span . \
  173. OPTIONAL {?uri_time_span time:year ?year } \
  174. OPTIONAL {?uri_time_span time:month ?month } \
  175. OPTIONAL {?uri_time_span time:day ?day } \
  176. } \
  177. } \
  178. ORDER BY ?year ?month ?day",
  179. queryTrovaIDlemma : "SELECT DISTINCT ?id \
  180. WHERE {?subject rdfs:label '<{LEMMA}>' ; \
  181. crm:P67_refers_to ?uri_sigla . \
  182. ?uri_sigla rdfs:label '<{SIGLA}>' . \
  183. ?subject crm:P1_is_identified_by ?uri_id . \
  184. ?uri_id rdfs:label ?id . }",
  185. queryTrovaSigla : " SELECT DISTINCT ?uri ?sigla ?text \
  186. WHERE { \
  187. ?uri crm:P1_is_identified_by ?uri_sigla ; \
  188. crm:P190_has_symbolic_content ?text . \
  189. ?uri_sigla rdfs:label ?sigla ; \
  190. crm:P2_has_type ?uri_sigla_type . \
  191. ?uri_sigla_type rdfs:label 'Sigla OVI' . \
  192. {?uri crm:P67_refers_to ?lem . \
  193. ?lem crm:P128_carries <{URI}>} \
  194. UNION \
  195. {?uri crm:P67_refers_to <{URI}> }} ",
  196. queryEsploraMappa : " SELECT DISTINCT ?uri_subject ?subject ?uri_place ?uri_infObj ?place ?coords ?time_span ?year ?month ?day ?text \
  197. WHERE { \
  198. { ?uri_thing crm:P128_carries <{URI}> . \
  199. ?uri_infObj crm:P67_refers_to ?uri_thing . \
  200. } UNION { \
  201. ?uri_infObj crm:P67_refers_to <{URI}> . } \
  202. ?uri_subject crm:P128_carries ?uri_infObj ; \
  203. rdfs:label ?subject . \
  204. ?uri_infObj crm:P190_has_symbolic_content ?text . \
  205. ?uri_subject crm:P25i_moved_by ?mov_ev . \
  206. ?send rdfs:subClassOf ?mov_ev ; \
  207. rdf:type crm:EL2_Send_Letter . \
  208. GRAPH <http://147.213.76.182:8890/aspo/datini> {?send crm:P4_has_time-span ?uri_time_span . } \
  209. ?uri_time_span rdfs:label ?time_span . \
  210. ?uri_time_span time:year ?year . \
  211. OPTIONAL {?uri_time_span time:month ?month } \
  212. OPTIONAL {?uri_time_span time:day ?day } \
  213. ?send crm:P27_moved_from ?uri_placeNT . \
  214. ?uri_placeNT owl:sameAs ?uri_place . \
  215. ?uri_place rdfs:label ?place ; \
  216. crm:P168_place_is_defined_by ?coords . \
  217. } \
  218. ORDER BY ?year ?month ?day"
  219. },
  220. querySchedaPersona : {
  221. queryNetwork : " SELECT COUNT(?event1) AS ?count1 COUNT(?event2) AS ?count2 COUNT(?event3) AS ?count3 ?uri2 SAMPLE(?label2) AS ?text \
  222. WHERE { \
  223. {?event1 rdf:type crm:EL1_Exchange_Letters . \
  224. ?event_to rdfs:subClassOf ?event1; \
  225. rdf:type crm:EL2_Send_Letter ; \
  226. crm:P01_has_domain ?pc_to . \
  227. ?pc_to crm:P02_has_range ?uri . \
  228. ?uri rdfs:label ?label . \
  229. ?event_from rdfs:subClassOf ?event1; \
  230. rdf:type crm:EL3_Receive_Letter; \
  231. crm:P01_has_domain ?pc_from . \
  232. ?pc_from crm:P02_has_range ?uri2 . \
  233. ?uri2 rdfs:label ?label2 . \
  234. FILTER (?uri = <{URI}>) \
  235. } UNION { \
  236. ?event2 rdf:type crm:EL1_Exchange_Letters . \
  237. ?event_to rdfs:subClassOf ?event2; \
  238. rdf:type crm:EL3_Receive_Letter ; \
  239. crm:P01_has_domain ?pc_from . \
  240. ?pc_from crm:P02_has_range ?uri . \
  241. ?uri rdfs:label ?label . \
  242. ?event_from rdfs:subClassOf ?event2; \
  243. rdf:type crm:EL2_Send_Letter; \
  244. crm:P01_has_domain ?pc_to . \
  245. ?pc_to crm:P02_has_range ?uri2 . \
  246. ?uri2 rdfs:label ?label2 . \
  247. FILTER (?uri = <{URI}>) \
  248. } UNION { \
  249. ?pc crm:P02_has_range <{URI}> . \
  250. ?event3 crm:P01_has_domain ?pc . \
  251. ?event3 crm:P01_has_domain ?pc1 . \
  252. ?pc1 crm:P02_has_range ?uri2 . \
  253. ?uri2 rdfs:label ?label2 . \
  254. FILTER (?pc != ?pc1) \
  255. } \
  256. }",
  257. queryNetwork2 : " SELECT DISTINCT ?uri_person ?name \
  258. WHERE { \
  259. VALUES ?uri {<{URI}>} \
  260. ?pc crm:P02_has_range ?uri . \
  261. ?event crm:P01_has_domain ?pc . \
  262. ?event crm:P01_has_domain ?pc1 . \
  263. ?pc1 crm:P02_has_range ?uri_person . \
  264. ?uri_person rdfs:label ?name . \
  265. FILTER (?pc != ?pc1) \
  266. }",
  267. query : " SELECT DISTINCT ?place ?label ?tipo ?coordinates COUNT(?pc) AS ?count \
  268. WHERE { \
  269. VALUES ?uri {<{URI}>} \
  270. {?place rdfs:label ?label ; \
  271. crm:P168_place_is_defined_by ?coordinates . \
  272. ?place_from rdf:type crm:E53_Place ; \
  273. owl:sameAs ?place . \
  274. ?event_from crm:P01_has_domain ?pc ; \
  275. rdfs:label ?tipo ; \
  276. ?property ?place_from . \
  277. ?pc crm:P02_has_range ?uri . \
  278. } UNION { \
  279. ?uri crm:P100i_died_in ?uri_death . \
  280. ?uri_death crm:P7_took_place_at ?uri_place . \
  281. ?uri_place rdf:type crm:E53_Place ; \
  282. owl:sameAs ?place . \
  283. ?place rdfs:label ?label ; \
  284. crm:P168_place_is_defined_by ?coordinates . \
  285. } UNION { \
  286. ?uri crm:P98i_was_born ?uri_birth . \
  287. ?uri_birth crm:P7_took_place_at ?uri_place . \
  288. ?uri_place rdf:type crm:E53_Place ; \
  289. owl:sameAs ?place . \
  290. ?place rdfs:label ?label ; \
  291. crm:P168_place_is_defined_by ?coordinates . \
  292. } \
  293. UNION { \
  294. ?pc crm:P02_has_range ?uri . \
  295. ?uri_event crm:P01_has_domain ?pc; \
  296. crm:P7_took_place_at ?place ; \
  297. crm:P2_has_type ?uri_type . \
  298. ?uri_type rdfs:label ?tipo . \
  299. ?place rdf:type crm:E53_Place ; \
  300. rdfs:label ?label . \
  301. ?place crm:P168_place_is_defined_by ?coordinates .\
  302. } \
  303. }",
  304. queryRiferimenti : " SELECT DISTINCT ?uri_same \
  305. WHERE { \
  306. VALUES ?uri {<{URI}>} \
  307. ?uri owl:sameAs ?uri_same \
  308. }",
  309. queryInfo : " SELECT DISTINCT ?uri ?graph ?label ?identifier ?id_type ?name ?givenName ?familyName ?relative2 ?relative3 ?provenienza (GROUP_CONCAT(DISTINCT CONCAT(?variant, '| ', ?otherName) ; SEPARATOR = ';') AS ?variants) ?gender ?Birth_Date ?Birth_Place ?Death_Date ?Death_Place ?patronymic ?occupation ?qualification ?group \
  310. WHERE { \
  311. VALUES ?uri {<{URI}>} \
  312. GRAPH ?graph {?uri rdfs:label ?label} \
  313. ?uri foaf:name ?name . \
  314. OPTIONAL {?uri crm:P1_is_identified_by ?id . \
  315. ?id rdfs:label ?identifier ; \
  316. crm:P2_has_type ?id_type .} \
  317. OPTIONAL {?uri foaf:givenName ?givenName} \
  318. OPTIONAL {?uri foaf:familyName ?familyName} \
  319. OPTIONAL {?uri foaf:gender ?gender} \
  320. OPTIONAL {?uri person:patronymicName ?patronymic } \
  321. OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_provenienza . \
  322. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  323. rdfs:label ?provenienza . } \
  324. OPTIONAL {?uri crm:P2_has_type ?uri_person_type . \
  325. ?uri_person_type rdfs:label ?person_type } \
  326. OPTIONAL {?uri schema:hasOccupation ?uriOccupation . \
  327. ?uriOccupation rdf:type schema:Occupation; \
  328. rdfs:label ?occupation } \
  329. OPTIONAL {?uri schema:honorificPrefix ?qualification} \
  330. OPTIONAL {?uri crm:P100i_died_in ?Death . \
  331. OPTIONAL {?Death crm:P4_has_time-span ?Death_TS . \
  332. ?Death_TS rdfs:label ?Death_Date . } \
  333. OPTIONAL {?Death crm:P7_took_place_at ?Place_D . \
  334. ?Place_D rdfs:label ?Death_Place } \
  335. } \
  336. OPTIONAL {?uri crm:P98i_was_born ?Birth . \
  337. OPTIONAL {?Birth crm:P4_has_time-span ?Birth_TS . \
  338. ?Birth_TS rdfs:label ?Birth_Date . } \
  339. OPTIONAL {?Birth crm:P7_took_place_at ?Place_B . \
  340. ?Place_B rdfs:label ?Birth_Place } \
  341. } \
  342. OPTIONAL {?uri crm:P107i_is_current_or_former_member_of ?uriGroup . \
  343. ?uriGroup rdfs:label ?group } \
  344. OPTIONAL {?uri schema:alternateName ?alias . } \
  345. OPTIONAL {?uri owl:sameAs ?variant . \
  346. ?variant foaf:name ?otherName . } \
  347. OPTIONAL {?relation2 crm:P141_assigned ?uri ; \
  348. crm:P42_assigned ?uri_rel_type2 . \
  349. ?uri_rel_type2 rdfs:label 'Avo di secondo grado' . \
  350. ?uri_relative2 crm:P141_assigned ?relation2; \
  351. rdfs:label ?relative2 .} \
  352. OPTIONAL {?relation3 crm:P141_assigned ?uri ; \
  353. crm:P42_assigned ?uri_rel_type3 . \
  354. ?uri_rel_type3 rdfs:label 'Avo di terzo grado' . \
  355. ?uri_relative3 crm:P141_assigned ?relation3; \
  356. rdfs:label ?relative3 .} \
  357. } \
  358. GROUP BY ?graph ?uri ?label ?identifier ?id_type ?name ?givenName ?familyName ?relative2 ?relative3 ?provenienza ?gender ?Birth_Date ?Birth_Place ?Death_Date ?Death_Place ?patronymic ?occupation ?qualification ?group \
  359. LIMIT 1 ",
  360. queryInfoGettatelli : " SELECT DISTINCT ?card ?uri_card \
  361. WHERE { \
  362. VALUES ?uri {<{URI}>} \
  363. ?documentation crm:P67_refers_to ?uri ; \
  364. crm:P141_assigned ?uri_card . \
  365. ?uri_card rdfs:label ?card . \
  366. } ",
  367. queryRelazioni : " SELECT DISTINCT ?relation_type ?note ?uri_person ?name ?givenName ?familyName ?patronymic ?provenienza \
  368. WHERE { \
  369. VALUES ?uri {<{URI}>} \
  370. ?uri crm:P141_assigned ?relation . \
  371. ?relation crm:P42_assigned ?uri_type ; \
  372. crm:P141_assigned ?uri_person . \
  373. ?uri_type rdfs:label ?relation_type . \
  374. OPTIONAL {?uri_type crm:P3_has_note ?note } \
  375. ?uri_person foaf:name ?name . \
  376. OPTIONAL {?uri_person foaf:givenName ?givenName} \
  377. OPTIONAL {?uri_person foaf:familyName ?familyName} \
  378. OPTIONAL {?uri_person person:patronymicName ?patronymic } \
  379. OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
  380. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  381. rdfs:label ?provenienza . } \
  382. } ",
  383. queryRelazioniInverse : " SELECT DISTINCT ?relation_type ?note ?uri_person SAMPLE(?name) AS ?name ?givenName ?familyName ?patronymic ?provenienza \
  384. WHERE { \
  385. VALUES ?uri {<{URI}>} \
  386. ?relation crm:P141_assigned ?uri; \
  387. crm:P42_assigned ?uri_type . \
  388. ?uri_person crm:P141_assigned ?relation . \
  389. ?uri_type rdfs:label ?relation_type . \
  390. OPTIONAL {?uri_type crm:P3_has_note ?note } \
  391. OPTIONAL {?uri_person foaf:name ?name } \
  392. OPTIONAL {?uri_person foaf:givenName ?givenName} \
  393. OPTIONAL {?uri_person foaf:familyName ?familyName} \
  394. OPTIONAL {?uri_person person:patronymicName ?patronymic } \
  395. OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
  396. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  397. rdfs:label ?provenienza . } \
  398. } ",
  399. queryLetters : " SELECT DISTINCT ?type ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
  400. WHERE { \
  401. VALUES ?uri {<{URI}>} \
  402. {?pc crm:P02_has_range ?uri . \
  403. } UNION { \
  404. ?group crm:P107_has_current_or_former_member ?uri; \
  405. crm:P2_has_type 'Gruppo scrittura lettera' . \
  406. ?pc crm:P02_has_range ?group . \
  407. } \
  408. ?ev_move crm:P01_has_domain ?pc ; \
  409. rdfs:label ?type ; \
  410. rdfs:subClassOf ?event . \
  411. ?document_uri crm:P25i_moved_by ?event ; \
  412. rdfs:label ?document_name . \
  413. ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  414. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  415. rdfs:label ?segnatura . \
  416. OPTIONAL {GRAPH <http://147.213.76.182:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
  417. ?InfObj rdf:type crm:E73_Information_Object} }. \
  418. OPTIONAL {?ev_move crm:P4_has_time-span ?uri_ts . \
  419. ?uri_ts rdfs:label ?time_span . } \
  420. }",
  421. queryDocuments : " SELECT DISTINCT ?role ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
  422. WHERE { \
  423. ?document ?property ?event ; \
  424. crm:P1_is_identified_by ?uri_id ; \
  425. rdfs:label ?label . \
  426. ?uri_id rdfs:label ?id ; \
  427. crm:P2_has_type 'Segnatura' . \
  428. OPTIONAL { \
  429. {?event crm:P4_has_time-span ?uri_time_span . \
  430. ?uri_time_span rdfs:label ?time_span . \
  431. } UNION { \
  432. ?sub_event rdfs:subClassOf ?event ; \
  433. crm:P4_has_time-span ?uri_time_span . \
  434. ?uri_time_span rdfs:label ?time_span . } \
  435. } \
  436. ?event crm:P01_has_domain ?domain . \
  437. ?domain crm:P02_has_range <{URI}> ; \
  438. crm:P14.1_in_the_role_of ?uri_role . \
  439. ?uri_role rdfs:label ?role . \
  440. } \
  441. GROUP BY ?document ?label ?id ?role ",
  442. queryOtherDoc : " SELECT DISTINCT ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
  443. WHERE { \
  444. VALUES ?uri {<{URI}> } \
  445. {?domain crm:P02_has_range ?uri . \
  446. ?event crm:P01_has_domain ?domain . \
  447. ?document crm:P92i_was_brought_into_existence_by ?event ; \
  448. crm:P1_is_identified_by ?uri_id ; \
  449. rdfs:label ?label . \
  450. ?uri_id crm:P2_has_type 'Segnatura'; \
  451. rdfs:label ?id . \
  452. } UNION { \
  453. ?event crm:P67_refers_to ?uri . \
  454. ?document crm:P92i_was_brought_into_existence_by ?event ; \
  455. rdfs:label ?label ; \
  456. crm:P1_is_identified_by ?uri_id . \
  457. ?uri_id rdfs:label ?id ; \
  458. crm:P2_has_type 'Segnatura' . \
  459. } UNION { \
  460. ?event crm:P67_refers_to ?uri . \
  461. ?documentation crm:P67_refers_to ?uri ; \
  462. crm:P141_assigned ?card . \
  463. ?document crm:P46_is_composed_of ?card ; \
  464. rdfs:label ?label ; \
  465. crm:P1_is_identified_by ?uri_id . \
  466. ?uri_id rdfs:label ?id ; \
  467. crm:P2_has_type 'Segnatura' . \
  468. } \
  469. OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
  470. ?uri_time_span rdfs:label ?time_span} \
  471. } ",
  472. queryOpere : " SELECT DISTINCT ?subject ?label ?nct (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
  473. WHERE {?subject rdf:type crm:E22_Man-Made_Object ; \
  474. rdfs:label ?label ; \
  475. crm:P1_is_identified_by ?uri_nct . \
  476. ?uri_nct rdfs:label ?nct . \
  477. ?production crm:P108_has_produced ?subject . \
  478. OPTIONAL {?production crm:P4_has_time-span ?uri_time_span . \
  479. ?uri_time_span rdfs:label ?time_span } \
  480. ?pc crm:P01_has_domain ?production ; \
  481. crm:P02_has_range <{URI}> } \
  482. GROUP BY ?subject ?label ?nct ",
  483. queryGettatelliEv : " SELECT DISTINCT ?event_type ?time_span \
  484. WHERE { \
  485. VALUES ?uri {<{URI}>} \
  486. ?uri crm:P12i_was_present_at ?event . \
  487. ?event crm:P2_has_type ?uri_event_type ; \
  488. crm:P4_has_time-span ?uri_time_span . \
  489. ?uri_time_span rdfs:label ?time_span . \
  490. ?uri_event_type rdfs:label ?event_type . \
  491. } ",
  492. queryEventi : " SELECT DISTINCT ?event_type ?role ?uri_time_span ?year ?month ?day ?time_span ?place ?uri_place ?coords ?place2 ?uri_place2 ?coords2 ?place3 ?uri_place3 ?coords3 ?place4 ?uri_place4 ?coords4 ?document ?uri_document \
  493. WHERE { \
  494. VALUES ?uri {<{URI}>} \
  495. ?domain crm:P02_has_range ?uri ; \
  496. crm:P14.1_in_the_role_of ?uri_role . \
  497. ?uri_role rdfs:label ?role . \
  498. ?event crm:P01_has_domain ?domain ; \
  499. crm:P2_has_type ?uri_event_type . \
  500. ?uri_event_type rdfs:label ?event_type . \
  501. OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
  502. ?uri_time_span rdfs:label ?time_span . \
  503. OPTIONAL {?uri_time_span time:year ?year .} \
  504. OPTIONAL {?uri_time_span time:month ?month .} \
  505. OPTIONAL {?uri_time_span time:day ?day .} \
  506. } \
  507. ?event crm:P7_took_place_at ?uri_location . \
  508. ?uri_location rdfs:label ?place . \
  509. OPTIONAL {?uri_place owl:sameAs ?uri_location . \
  510. ?uri_place crm:P168_place_is_defined_by ?coords } \
  511. OPTIONAL {?uri_location crm:P89_falls_within ?uri_place2 . \
  512. ?uri_place2 rdfs:label ?place2 . \
  513. OPTIONAL {?uri_place2 crm:P168_place_is_defined_by ?coords2 . } \
  514. OPTIONAL {?uri_place2 crm:P89_falls_within ?uri_place3 . \
  515. ?uri_place3 rdfs:label ?place3 . \
  516. OPTIONAL {?uri_place3 crm:P168_place_is_defined_by ?coords3 . \
  517. OPTIONAL {?uri_place3 crm:P89_falls_within ?uri_place4 . \
  518. ?uri_place4 rdfs:label ?place4 . \
  519. OPTIONAL {?uri_place4 crm:P168_place_is_defined_by ?coords4 .} \
  520. } \
  521. } \
  522. }} \
  523. ?document_info crm:P70_documents ?event . \
  524. ?uri_document crm:P128_carries ?document_info ; \
  525. rdfs:label ?document . \
  526. } \
  527. ORDER BY ?year ?month ?day ",
  528. queryCompagnia : " SELECT DISTINCT ?denomination ?occupation ?uri_sede ?uri_place ?sede \
  529. WHERE { \
  530. VALUES ?uri {<{URI}>} \
  531. ?uri rdf:type crm:E74_Group . \
  532. ?uri crm:P2_has_type ?denomination . \
  533. OPTIONAL {?uri schema:hasOccupation ?uri_Occupation . \
  534. ?uri_Occupation rdfs:label ?occupation .} \
  535. OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_sede . \
  536. ?uri_sede rdfs:label ?sede . \
  537. OPTIONAL {?uri_sede owl:sameAs ?uri_place . \
  538. ?uri_place crm:P168_place_is_defined_by ?coords .} \
  539. } \
  540. }",
  541. queryContrassegni : " SELECT DISTINCT ?uri ?uri_image ?contrassegno ?image \
  542. WHERE { \
  543. VALUES ?uri {<{URI}>} \
  544. ?event crm:P141_assigned ?uri ; \
  545. crm:P140_assigned_attribute_to ?uri_contrassegno . \
  546. ?uri_contrassegno crm:P2_has_type 'Contrassegno'; \
  547. rdfs:label ?contrassegno . \
  548. ?uri_image crm:P138_represents ?uri_contrassegno ; \
  549. crm:P104_is_subject_to ?right ; \
  550. crm:P3_has_note ?note ; \
  551. crm:P1_is_identified_by ?uri_id . \
  552. ?uri_id rdfs:label ?image . \
  553. } ",
  554. queryOccupazione : " SELECT DISTINCT ?occupation ?worklocation \
  555. WHERE { \
  556. VALUES ?uri {<{URI}>} \
  557. ?uri rdf:type crm:E21_Person ; \
  558. schema:hasOccupation ?uri_occupation ; \
  559. schema:workLocation ?uri_worklocation . \
  560. ?uri_occupation rdfs:label ?occupation ; \
  561. schema:occupationLocation ?uri_worklocation . \
  562. ?uri_worklocation rdfs:label ?worklocation . \
  563. }"
  564. },
  565. querySchedaOggetto : {
  566. queryInfo : " SELECT DISTINCT ?g AS ?graph ?uri ?label ?dimension ?consistency ?id ?sigla_registro (group_concat(distinct ?dimension ; separator='<br />') as ?dimensions) ?material (group_concat(distinct ?time_span ;separator='-') as ?time_span) ?location ?uri_owner ?owner ?uri_document ?document ?note \
  567. WHERE { \
  568. VALUES ?uri {<{URI}>} \
  569. GRAPH ?g { ?uri rdfs:label ?label } \
  570. ?uri rdf:type crm:E22_Man-Made_Object . \
  571. OPTIONAL {?uri crm:P1_is_identified_by ?uri_id . \
  572. ?uri_id rdfs:label ?id ; \
  573. crm:P2_has_type 'Segnatura' .} \
  574. OPTIONAL { ?uri crm:P43_has_dimension ?uri_consistency . \
  575. ?uri_consistency crm:P2_has_type 'Consistenza carte' ; \
  576. rdfs:label ?consistency } \
  577. OPTIONAL { ?uri crm:P43_has_dimension ?uri_dimension . \
  578. ?uri_dimension crm:P2_has_type 'Dimensioni' ; \
  579. rdfs:label ?dimension } \
  580. OPTIONAL { ?uri crm:P139_has_alternative_form ?uri_registro . \
  581. ?uri_registro rdfs:label ?sigla_registro; \
  582. crm:P2_has_type 'Sigla registro' . } \
  583. OPTIONAL { ?uri crm:P45_consist_of ?uri_material . \
  584. ?uri_material rdfs:label ?material } \
  585. OPTIONAL { ?uri crm:P52_has_current_owner ?uri_owner . \
  586. ?uri_owner rdfs:label ?owner . } \
  587. OPTIONAL { ?uri crm:P54_has_current_permanent_location ?location } \
  588. OPTIONAL { ?uri crm:P3_has_note ?uri_note . \
  589. ?uri_note rdfs:label ?note } \
  590. OPTIONAL { ?uri crm:P92i_was_brought_into_existence_by ?creation . \
  591. ?creation crm:P4_has_time-span ?uri_time_span . \
  592. ?uri_time_span rdfs:label ?time_span . } \
  593. OPTIONAL {?uri_document crm:P46_is_composed_of ?uri ; \
  594. rdfs:label ?document .} \
  595. } ",
  596. queryContent : " SELECT DISTINCT ?g AS ?graph ?uri ?titolo ?tipo (group_concat(distinct ?ref ; separator='<br />') as ?ref) \
  597. WHERE { \
  598. VALUES ?object {<{URI}>} \
  599. ?object crm:P128_carries ?uri . \
  600. ?uri rdf:type crm:E73_Information_Object . \
  601. GRAPH ?g { ?uri rdfs:label ?label } \
  602. OPTIONAL {?uri crm:P1_is_identified_by ?uri_titolo . \
  603. ?uri_titolo rdfs:label ?titolo ; \
  604. rdf:type crm:E35_Title . } \
  605. OPTIONAL { ?uri crm:P2_has_type ?uri_tipo . \
  606. ?uri_tipo rdfs:label ?tipo . } \
  607. OPTIONAL { ?uri crm:P67_refers_to ?uri_ref . \
  608. ?uri_ref rdfs:label ?ref . } \
  609. FILTER NOT EXISTS {GRAPH <http://147.213.76.182:8890/ovi/datini> { ?uri rdfs:label ?label }}. \
  610. }",
  611. queryOviLetter : " SELECT DISTINCT ?otherId ?InfObj \
  612. WHERE { \
  613. VALUES ?uri {<{URI}>} \
  614. ?uri crm:P1_is_identified_by ?uri_id . \
  615. ?uri_id crm:P2_has_type 'Segnatura' ; \
  616. crm:P139_has_alternative_form ?other_id . \
  617. ?other_id crm:P2_has_type ?uri_type ; \
  618. rdfs:label ?otherId . \
  619. ?uri_type rdfs:label 'Segnatura OVI' . \
  620. OPTIONAL { ?uri crm:P128_carries ?InfObj . \
  621. GRAPH <http://147.213.76.182:8890/ovi/datini> {?InfObj rdf:type crm:E73_Information_Object } } \
  622. } ",
  623. queryPersone : " SELECT DISTINCT ?uri_person ?name (group_concat(distinct ?p_type ; separator=', ') as ?types) (group_concat(distinct ?person_note ; separator=', ') as ?types2) ?note \
  624. WHERE { \
  625. VALUES ?uri {<{URI}>} \
  626. { \
  627. ?document crm:P141_assigned ?uri ; \
  628. crm:P67_refers_to ?uri_person . \
  629. ?uri_person foaf:name ?name ; \
  630. crm:P2_has_type ?person_type . \
  631. ?person_type rdfs:label ?p_type . \
  632. } UNION { \
  633. ?uri crm:P92i_was_brought_into_existence_by ?creation . \
  634. ?creation crm:P67_refers_to ?uri_person . \
  635. ?uri_person foaf:name ?name ; \
  636. crm:P67.1_type ?person_type . \
  637. OPTIONAL {?uri_person crm:P3_has_note ?note } \
  638. ?person_type rdfs:label ?p_type . \
  639. } UNION { \
  640. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  641. {?uri_paper crm:P128_carries ?uri_doc } \
  642. UNION \
  643. {?uri crm:P128_carries ?uri_doc } \
  644. ?uri_doc crm:P70_documents ?event ; \
  645. rdfs:label ?document . \
  646. ?uri_obj crm:P128_carries ?uri_doc . \
  647. ?uri_doc rdfs:label ?object . \
  648. ?event crm:P01_has_domain ?domain . \
  649. ?domain crm:P02_has_range ?uri_person ; \
  650. crm:P14.1_in_the_role_of ?uri_role . \
  651. ?uri_role rdfs:label ?p_type . \
  652. ?uri_person rdfs:label ?name . \
  653. OPTIONAL {?uri_person crm:P3_has_note ?uri_person_note . \
  654. ?uri_person_note rdfs:label ?person_note; \
  655. crm:P2_has_type 'Nota collegamento con gettatello' . } \
  656. } \
  657. }",
  658. queryAssocDocs : " SELECT DISTINCT ?card ?doc_type ?name_card \
  659. WHERE { \
  660. VALUES ?uri {<{URI}>} \
  661. ?uri crm:P46_is_composed_of ?card . \
  662. ?card rdfs:label ?name_card . \
  663. OPTIONAL {?card crm:P2_has_type ?doc_type } \
  664. OPTIONAL {?document crm:P141_assigned ?card ; \
  665. crm:P67_refers_to ?uri_person . \
  666. ?uri_person foaf:name ?name ; \
  667. crm:P2_has_type ?person_type . \
  668. ?person_type rdfs:label ?type . \
  669. } \
  670. }",
  671. queryContrassegni : " SELECT DISTINCT ?g ?uri ?contrassegno ?uri_id ?uri_istituto ?provenienza ?image ?uri_person ?gettatello ?license \
  672. WHERE {VALUES ?uri {<{URI}>} \
  673. GRAPH ?g {?uri ?p ?o} \
  674. ?uri crm:P138_represents ?uri_contrassegno ; \
  675. crm:P1_is_identified_by ?uri_id ; \
  676. crm:P3_has_note ?uri_provenienza ; \
  677. crm:P104_is_subject_to ?uri_license . \
  678. ?uri_provenienza rdfs:label ?provenienza ; \
  679. crm:P1_is_identified_by ?uri_istituto . \
  680. ?uri_license crm:P1_is_identified_by ?license . \
  681. ?uri_id rdfs:label ?image . \
  682. ?uri_contrassegno rdfs:label ?contrassegno . \
  683. ?uri_documentation crm:P140_assigned_attribute_to ?uri_contrassegno ; \
  684. crm:P141_assigned ?uri_person . \
  685. ?uri_person rdfs:label ?gettatello . \
  686. }",
  687. queryEventiGettatelli : " SELECT DISTINCT ?uri_obj ?object ?name_event ?event_type ?uri_person ?label ?role ?time_span ?uri_place ?place \
  688. WHERE {VALUES ?uri {<{URI}>} \
  689. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  690. {?uri_paper crm:P128_carries ?uri_doc } \
  691. UNION \
  692. {?uri crm:P128_carries ?uri_doc } \
  693. ?uri_doc crm:P70_documents ?event ; \
  694. rdfs:label ?document . \
  695. ?uri_obj crm:P128_carries ?uri_doc . \
  696. ?uri_doc rdfs:label ?object . \
  697. ?event rdfs:label ?name_event . \
  698. ?event crm:P2_has_type ?uri_event_type . \
  699. ?uri_event_type rdfs:label ?event_type . \
  700. ?event crm:P01_has_domain ?domain . \
  701. ?domain crm:P02_has_range ?uri_person ; \
  702. crm:P14.1_in_the_role_of ?uri_role . \
  703. ?uri_role rdfs:label ?role . \
  704. ?uri_person rdfs:label ?label . \
  705. OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
  706. ?uri_time_span rdfs:label ?time_span . } \
  707. OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
  708. ?uri_place owl:sameAs ?uri_location ; \
  709. crm:P168_place_is_defined_by ?coords; \
  710. rdfs:label ?place . } \
  711. }",
  712. queryLuoghiGT : " SELECT DISTINCT ?uri_place ?place \
  713. WHERE {VALUES ?uri {<{URI}>} \
  714. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  715. {?uri_paper crm:P128_carries ?uri_doc } \
  716. UNION \
  717. {?uri crm:P128_carries ?uri_doc } \
  718. ?uri_doc crm:P70_documents ?event . \
  719. ?event crm:P7_took_place_at ?uri_place . \
  720. ?uri_place crm:P168_place_is_defined_by ?coords; \
  721. rdfs:label ?place . \
  722. }",
  723. queryTree : " SELECT DISTINCT ?uri ?label ?uri_document ?document \
  724. WHERE {VALUES ?uri {<{URI}>} \
  725. ?uri rdfs:label ?label ; \
  726. crm:P46_is_composed_of ?uri_document . \
  727. ?uri_document rdfs:label ?document \
  728. }"
  729. },
  730. querySchedaLuogo : {
  731. query : " SELECT DISTINCT ?graph ?uri ?name_place ?coordinates {\
  732. GRAPH ?graph { VALUES ?uri { <{URI}> } \
  733. ?uri crm:P168_place_is_defined_by ?coordinates;\
  734. rdfs:label ?name_place .\
  735. }\
  736. }",
  737. queryRiferimenti : " SELECT DISTINCT ?references {\
  738. <{URI}> owl:sameAs ?references\
  739. }",
  740. queryToponimi : " SELECT DISTINCT ?toponimi {\
  741. <{URI}> crm:P1_is_identified_by ?uri_toponym .\
  742. ?uri_toponym rdfs:label ?toponimi\
  743. }",
  744. queryRicezione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
  745. WHERE { \
  746. <{URI}> owl:sameAs ?place . \
  747. ?event_to crm:P26_moved_to ?place ; \
  748. rdf:type crm:EL3_Receive_Letter ; \
  749. rdfs:subClassOf ?event . \
  750. ?document_uri crm:P25i_moved_by ?event ; \
  751. rdfs:label ?document_name . \
  752. ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  753. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  754. rdfs:label ?segnatura . \
  755. OPTIONAL {GRAPH <http://147.213.76.182:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
  756. ?InfObj rdf:type crm:E73_Information_Object} }. \
  757. OPTIONAL {?event_to crm:P4_has_time-span ?uri_ts . \
  758. ?uri_ts rdfs:label ?time_span . } \
  759. } ",
  760. queryInvio : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
  761. WHERE { \
  762. <{URI}> owl:sameAs ?place . \
  763. ?event_to crm:P27_moved_from ?place ; \
  764. rdf:type crm:EL2_Send_Letter ; \
  765. rdfs:subClassOf ?event . \
  766. ?document_uri crm:P25i_moved_by ?event ; \
  767. rdfs:label ?document_name . \
  768. ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  769. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  770. rdfs:label ?segnatura . \
  771. OPTIONAL {GRAPH <http://147.213.76.182:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
  772. ?InfObj rdf:type crm:E73_Information_Object} }. \
  773. OPTIONAL {?event_to crm:P4_has_time-span ?uri_ts . \
  774. ?uri_ts rdfs:label ?time_span . } \
  775. }",
  776. queryCitazione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name SAMPLE(?time_span) AS ?time_span ?InfObj \
  777. WHERE { \
  778. VALUES ?uri {<{URI}>} \
  779. {?uri crm:P1_is_identified_by ?toponym . \
  780. ?InfObj crm:P67_refers_to ?toponym . \
  781. ?document_uri crm:P128_carries ?InfObj ; \
  782. rdfs:label ?document_name . \
  783. OPTIONAL {?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  784. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  785. rdfs:label ?segnatura . } \
  786. OPTIONAL {?document_uri crm:P25i_moved_by ?event . \
  787. ?event_send rdfs:subClassOf ?event ; \
  788. rdf:type crm:EL2_Send_Letter ; \
  789. crm:P4_has_time-span ?uri_ts . \
  790. ?uri_ts rdfs:label ?time_span . } \
  791. } UNION { \
  792. ?event_gt crm:P7_took_place_at ?uri . \
  793. ?document_inf crm:P70_documents ?event_gt . \
  794. ?document_uri crm:P128_carries ?document_inf ; \
  795. crm:P1_is_identified_by ?uriSegnatura ; \
  796. rdfs:label ?document_name . \
  797. ?uriSegnatura rdfs:label ?segnatura . \
  798. } \
  799. } ",
  800. queryPersone : " SELECT DISTINCT ?role ?range SAMPLE(?name) AS ?label COUNT(?range) AS ?count \
  801. WHERE{ \
  802. VALUES ?uri {<{URI}>} \
  803. {?place owl:sameAs ?uri . \
  804. ?event_to crm:P26_moved_to ?place ; \
  805. rdf:type crm:EL3_Receive_Letter ; \
  806. crm:P01_has_domain ?domain . \
  807. ?domain crm:P02_has_range ?range ; \
  808. crm:P14.1_in_the_role_of ?uri_role . \
  809. ?uri_role rdfs:label ?role . \
  810. ?range rdfs:label ?lb ; \
  811. foaf:name ?name . \
  812. } UNION { \
  813. ?place owl:sameAs ?uri . \
  814. ?event_to crm:P27_moved_from ?place ; \
  815. rdf:type crm:EL2_Send_Letter ; \
  816. crm:P01_has_domain ?domain . \
  817. ?domain crm:P02_has_range ?range ; \
  818. crm:P14.1_in_the_role_of ?uri_role . \
  819. ?uri_role rdfs:label ?role . \
  820. ?range rdfs:label ?lb ; \
  821. foaf:name ?name . \
  822. } UNION { \
  823. ?event_gt crm:P7_took_place_at ?uri ; \
  824. crm:P01_has_domain ?domain . \
  825. ?domain crm:P02_has_range ?range ; \
  826. crm:P14.1_in_the_role_of ?uri_role . \
  827. ?uri_role rdfs:label ?role . \
  828. ?range rdfs:label ?name . \
  829. } \
  830. } GROUP BY ?role ?range \
  831. ORDER BY ?label",
  832. queryCount : " SELECT ?place ?label COUNT(?label) AS ?Count \
  833. WHERE{ \
  834. ?place_to owl:sameAs <{URI}> . \
  835. ?event_to crm:P26_moved_to ?place_to ; \
  836. rdf:type crm:EL3_Receive_Letter ; \
  837. rdfs:subClassOf ?event . \
  838. ?event_from rdfs:subClassOf ?event ; \
  839. rdf:type crm:EL2_Send_Letter ; \
  840. crm:P27_moved_from ?place . \
  841. ?place rdfs:label ?label \
  842. } \
  843. ORDER BY DESC (?Count)",
  844. queryCount2 : " SELECT ?place ?label COUNT(?label) AS ?Count \
  845. WHERE{ \
  846. ?place_from owl:sameAs <{URI}> . \
  847. ?event_from crm:P27_moved_from ?place_from ; \
  848. rdf:type crm:EL2_Send_Letter ; \
  849. rdfs:subClassOf ?event . \
  850. ?event_to rdfs:subClassOf ?event ; \
  851. rdf:type crm:EL2_Send_Letter ; \
  852. crm:P27_moved_from ?place . \
  853. ?place rdfs:label ?label . \
  854. } \
  855. ORDER BY DESC (?Count) "
  856. },
  857. querySchedaOpera : {
  858. queryInfo : " SELECT DISTINCT ?graph ?uri ?identifier ?label ?title ?uriType ?type ?uriOwner ?current_owner ?current_location ?subject (group_concat(distinct ?value ; separator='x') as ?dimensions) SAMPLE(?unit) AS ?unit (GROUP_CONCAT(DISTINCT CONCAT(?uriMaterial, '; ', ?material) ; SEPARATOR = '<br />') AS ?Materials) ?uriSubjectPer ?personName ?personSurname ?personPatronymic ?iscrizione ?condition ?note \
  859. WHERE { \
  860. VALUES ?uri {<{URI}>} \
  861. GRAPH ?graph {?uri rdfs:label ?label} \
  862. OPTIONAL {?uri crm:P3_has_note ?note } \
  863. ?uri crm:P128_carries ?Inf_Obj . \
  864. OPTIONAL {?Inf_Obj crm:P1_is_identified_by ?uriTitle . \
  865. ?uriTitle rdf:type crm:E35_Title; \
  866. rdfs:label ?title } \
  867. OPTIONAL {?Inf_Obj crm:P2_has_type ?uriType . \
  868. ?uriType rdfs:label ?type } \
  869. OPTIONAL {?uri crm:P43_has_dimension ?uriDimension . \
  870. ?uriDimension crm:P90_has_value ?value; \
  871. crm:P91_has_unit ?uri_unit . \
  872. ?uri_unit rdfs:label ?unit } \
  873. OPTIONAL {?uri crm:P1_is_identified_by ?uriIdentifier . \
  874. ?uriIdentifier rdfs:label ?identifier } \
  875. OPTIONAL {?uri crm:P45_consists_of ?uriMaterial . \
  876. ?uriMaterial rdfs:label ?material } \
  877. OPTIONAL {?uri crm:P44_has_condition ?uriCondition . \
  878. ?uriCondition crm:P2_has_type ?condition} \
  879. OPTIONAL {?uri crm:P54_has_current_permanent_location ?current_location } \
  880. OPTIONAL {?uri crm:P62_depicts ?uriSubject . \
  881. ?uriSubject rdfs:label ?subject; \
  882. crm:P2_has_type 'Identificazione Iconografica' .} \
  883. OPTIONAL {?uri crm:P62_depicts ?uriSubjectPer . \
  884. ?uriSubjectPer foaf:givenName ?personName ; \
  885. foaf:familyName ?personSurname ; \
  886. person:patronymicName ?personPatronymic ; \
  887. rdf:type foaf:person . } \
  888. OPTIONAL {?uri crm:P52_has_current_owner ?uriOwner . \
  889. ?uriOwner rdfs:label ?current_owner } \
  890. OPTIONAL {?uri crm:P56_bears_feature ?uri_inscription . \
  891. ?uri_inscription crm:P128_carries ?uri_objInscr . \
  892. ?uri_objInscr crm:P3_has_note ?iscrizione . } \
  893. }",
  894. queryIconclass : " SELECT DISTINCT ?uri_iconclass ?iconclass \
  895. WHERE { \
  896. VALUES ?uri {<{URI}>} \
  897. ?uri crm:P62_depicts ?uri_iconclass . \
  898. ?uri_iconclass rdfs:label ?iconclass ; \
  899. crm:P2_has_type 'Sigla Iconclass' . \
  900. }",
  901. queryProduction : " SELECT DISTINCT (GROUP_CONCAT(DISTINCT CONCAT(?uriPerson, '; ', ?person, '; ', ?role) ; SEPARATOR = '<br />') AS ?Partecipants) (group_concat(distinct ?time_span ;separator='-') as ?time) (GROUP_CONCAT(DISTINCT CONCAT(?uriTecne, '; ', ?technique) ; SEPARATOR = '<br />') AS ?techniques) \
  902. WHERE { \
  903. VALUES ?uri {<{URI}>} \
  904. ?uri crm:P128_carries ?Information_Object . \
  905. ?Information_Object crm:P108i_was_produced_by ?Production . \
  906. OPTIONAL {?Production crm:P4_has_time-span ?uriTS ; \
  907. crm:P32_used_general_technique ?uriTecne . \
  908. ?uriTS rdfs:label ?time_span . \
  909. ?uriTecne rdfs:label ?technique} \
  910. OPTIONAL {?pc crm:P01_has_domain ?Production ; \
  911. crm:P02_has_range ?uriPerson ; \
  912. crm:P14.1_in_the_role_of ?uriRole . \
  913. ?uriPerson rdfs:label ?person . \
  914. ?uriRole rdfs:label ?role} \
  915. }",
  916. queryPicture : " SELECT DISTINCT ?picture ?provenienza ?license ?note \
  917. WHERE { \
  918. VALUES ?uri {<{URI}>} \
  919. ?uri_tavola crm:P138_represents ?uri ; \
  920. crm:P1_is_identified_by ?tavola_id . \
  921. ?tavola_id rdfs:label ?picture . \
  922. ?uri_tavola crm:P3_has_note ?uri_note . \
  923. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  924. rdfs:label ?note ; \
  925. crm:P1_is_identified_by ?provenienza . \
  926. ?uri_tavola crm:P104_is_subject_to ?uri_licence . \
  927. ?uri_licence crm:P1_is_identified_by ?license \
  928. }",
  929. queryBibliography : " SELECT DISTINCT ?bibliography ?pages ?type (group_concat(distinct ?catalog ;separator=', ') as ?catalog) ?provenienza ?license ?note \
  930. WHERE { \
  931. VALUES ?uri {<{URI}>} \
  932. ?uri crm:P128_carries ?infObj . \
  933. ?document crm:P70_documents ?infObj . \
  934. OPTIONAL {?document crm:P3_has_note ?pages} \
  935. ?edition crm:P46_is_composed_of ?document ; \
  936. rdfs:label ?bibliography ; \
  937. crm:P2_has_type 'Bibliografia' . \
  938. OPTIONAL {?uri_catalog crm:P138_represents ?document ; \
  939. crm:P2_has_type ?type ; \
  940. crm:P1_is_identified_by ?catalog_id . \
  941. ?catalog_id rdfs:label ?catalog . \
  942. ?uri_catalog crm:P3_has_note ?uri_note . \
  943. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  944. rdfs:label ?note ; \
  945. crm:P1_is_identified_by ?provenienza . \
  946. ?uri_catalog crm:P104_is_subject_to ?uri_licence . \
  947. ?uri_licence crm:P1_is_identified_by ?license} \
  948. }",
  949. querySchedeStoriche : " SELECT DISTINCT ?scheda ?type ?provenienza ?license ?note \
  950. WHERE { \
  951. VALUES ?uri {<{URI}>} \
  952. ?uri crm:P128_carries ?InfObj . \
  953. ?uri_scheda crm:P138_represents ?InfObj ; \
  954. crm:P2_has_type ?type ; \
  955. crm:P1_is_identified_by ?scheda_id . \
  956. ?scheda_id rdfs:label ?scheda . \
  957. OPTIONAL {?uri_scheda crm:P3_has_note ?uri_note . \
  958. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  959. rdfs:label ?note ; \
  960. crm:P1_is_identified_by ?provenienza} \
  961. OPTIONAL {?uri_scheda crm:P104_is_subject_to ?uri_licence . \
  962. ?uri_licence crm:P1_is_identified_by ?license} \
  963. }"
  964. },
  965. queryTimeSpace : {
  966. querySpace : " SELECT DISTINCT ?uri_person ?person ?event ?uri_place ?place ?coords ?time_span ?year ?month ?day \
  967. WHERE {?uri_event rdfs:label ?event ; \
  968. crm:P01_has_domain ?pc ; \
  969. crm:P7_took_place_at ?uri_NTplace ; \
  970. crm:P4_has_time-span ?uri_time_span . \
  971. ?pc crm:P02_has_range ?uri_person . \
  972. ?uri_person rdfs:label ?person . \
  973. ?uri_place owl:sameAs ?uri_NTplace . \
  974. ?uri_NTplace crm:P168_place_is_defined_by ?coords ; \
  975. rdfs:label ?place . \
  976. ?uri_time_span rdfs:label ?time_span ; \
  977. time:year ?year . \
  978. OPTIONAL {?uri_time_span time:month ?month} \
  979. OPTIONAL {?uri_time_span time:day ?day} \
  980. } ORDER BY ?year ?month ?day",
  981. queryTime1 : " SELECT DISTINCT ?event ?uri_place ?place ?coords ?time_span ?month ?day \
  982. WHERE {?uri_event rdfs:label ?event ; \
  983. crm:P01_has_domain ?pc ; \
  984. crm:P7_took_place_at ?uri_NTplace ; \
  985. crm:P4_has_time-span ?uri_time_span . \
  986. ?pc crm:P02_has_range ?uri_person . \
  987. ?uri_person rdfs:label ?person . \
  988. ?uri_place owl:sameAs ?uri_NTplace . \
  989. ?uri_place crm:P168_place_is_defined_by ?coords ; \
  990. rdfs:label ?place . \
  991. ?uri_time_span rdfs:label ?time_span ; \
  992. time:year {YEAR} . \
  993. OPTIONAL {?uri_time_span time:month ?month} \
  994. OPTIONAL {?uri_time_span time:day ?day} \
  995. } ORDER BY ?month ?day",
  996. queryTime2 : " SELECT DISTINCT ?uri_person ?person ?event ?uri_place ?place ?coords ?year ?month ?day \
  997. WHERE {?uri_event rdfs:label ?event ; \
  998. crm:P01_has_domain ?pc ; \
  999. crm:P7_took_place_at ?uri_NTplace ; \
  1000. crm:P4_has_time-span ?uri_time_span . \
  1001. ?pc crm:P02_has_range ?uri_person . \
  1002. ?uri_person rdfs:label ?person . \
  1003. ?uri_place owl:sameAs ?uri_NTplace . \
  1004. ?uri_place crm:P168_place_is_defined_by ?coords ; \
  1005. rdfs:label ?place . \
  1006. ?uri_time_span rdfs:label '{DATE}' . \
  1007. OPTIONAL {?uri_time_span time:year ?year} \
  1008. OPTIONAL {?uri_time_span time:month ?month} \
  1009. OPTIONAL {?uri_time_span time:day ?day} \
  1010. } ORDER BY ?year ?month ?day",
  1011. queryTimeLetters : " SELECT DISTINCT ?uri_subject ?subject ?uri_place ?place ?coords ?time_span ?year ?month ?day \
  1012. WHERE {?uri_subject rdf:type crm:E22_Man-Made_Object ; \
  1013. rdfs:label ?subject ; \
  1014. crm:P25i_moved_by ?event1 . \
  1015. ?send1 rdfs:subClassOf ?event1 ; \
  1016. crm:P4_has_time-span ?uri_time_span . \
  1017. ?uri_time_span rdfs:label ?time_span ; \
  1018. time:year ?year ; \
  1019. time:month ?month ; \
  1020. time:day ?day . \
  1021. ?uri_subject crm:P25i_moved_by ?event2 . \
  1022. ?send2 rdfs:subClassOf ?event2 ; \
  1023. crm:P27_moved_from ?uri_placeNT . \
  1024. ?uri_place ?property ?uri_placeNT ; \
  1025. rdfs:label ?place ; \
  1026. crm:P168_place_is_defined_by ?coords \
  1027. } ORDER BY ?year ?month ?day"
  1028. },
  1029. queryRicercaAvanzata : {
  1030. queryOggetto : "SELECT DISTINCT ?graph AS ?g ?uri ?name ?identifier ?material ?owner ?type ?start_date ?end_date \
  1031. WHERE {GRAPH ?graph {?uri rdf:type crm:E22_Man-Made_Object} \
  1032. ?uri rdfs:label ?name . \
  1033. OPTIONAL {?uri crm:P1_is_identified_by ?uri_identifier . \
  1034. ?uri_identifier rdfs:label ?identifier . } \
  1035. OPTIONAL {?uri crm:P45_consist_of ?uri_material . \
  1036. ?uri_material rdfs:label ?material . } \
  1037. OPTIONAL {?uri crm:P2_has_type ?uri_type . \
  1038. ?uri_type rdfs:label ?type . } \
  1039. OPTIONAL {?uri crm:P52_has_current_owner ?uri_owner . \
  1040. ?uri_owner rdfs:label ?owner . } \
  1041. OPTIONAL {?uri crm:P92i_was_brought_into_existence_by ?creationI . \
  1042. ?creationI crm:P2_has_type 'Inizio'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1043. crm:P4_has_time-span ?uri_time_spanI . \
  1044. ?uri_time_spanI rdfs:label ?start_date . } \
  1045. OPTIONAL {?uri crm:P92i_was_brought_into_existence_by ?creationF . \
  1046. ?creationF crm:P2_has_type 'Fine'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1047. crm:P4_has_time-span ?uri_time_spanF . \
  1048. ?uri_time_spanF rdfs:label ?end_date . } \
  1049. }",
  1050. queryPersona : " SELECT DISTINCT ?graph AS ?g ?uri ?name ?givenName ?familyName ?patronymic ?provenienza ?alias ?otherName ?person_type ?occupation ?qualification ?Death_Date ?Death_Place ?Birth_TS ?Birth_Place \
  1051. WHERE { \
  1052. GRAPH ?graph {?uri rdfs:label ?label} \
  1053. ?uri foaf:name ?name . \
  1054. ?uri foaf:givenName ?givenName . \
  1055. OPTIONAL {?uri foaf:familyName ?familyName} \
  1056. OPTIONAL {?uri foaf:gender ?gender} \
  1057. OPTIONAL {?uri person:patronymicName ?patronymic } \
  1058. OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_provenienza . \
  1059. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  1060. rdfs:label ?provenienza . } \
  1061. OPTIONAL {?uri crm:P2_has_type ?uri_person_type . \
  1062. ?uri_person_type rdfs:label ?person_type } \
  1063. OPTIONAL {?uri schema:hasOccupation ?uriOccupation . \
  1064. ?uriOccupation rdf:type schema:Occupation; \
  1065. rdfs:label ?occupation } \
  1066. OPTIONAL {?uri schema:honorificPrefix ?qualification} \
  1067. OPTIONAL {?uri crm:P100i_died_in ?Death . \
  1068. OPTIONAL {?Death crm:P4_has_time-span ?Death_TS . \
  1069. ?Death_TS rdfs:label ?Death_Date . } \
  1070. OPTIONAL {?Death crm:P7_took_place_at ?Place_D . \
  1071. ?Place_D rdfs:label ?Death_Place } \
  1072. } \
  1073. OPTIONAL {?uri crm:P98i_was_born ?Birth . \
  1074. OPTIONAL {?Birth crm:P4_has_time-span ?Birth_TS . \
  1075. ?Birth_TS rdfs:label ?Birth_Date . } \
  1076. OPTIONAL {?Birth crm:P7_took_place_at ?Place_B . \
  1077. ?Place_B rdfs:label ?Birth_Place } \
  1078. } \
  1079. OPTIONAL {?uri schema:alternateName ?alias . } \
  1080. OPTIONAL {?uri owl:sameAs ?variant . \
  1081. ?variant foaf:name ?otherName . } \
  1082. } ",
  1083. queryOpera : " SELECT DISTINCT ?graph AS ?g ?uri ?name ?identifier ?material ?owner ?technique ?name_artist (group_concat(distinct ?subject ;separator=', ') as ?keywords) ?start_date ?end_date \
  1084. WHERE {GRAPH ?graph {?uri rdf:type crm:E22_Man-Made_Object} \
  1085. ?uri rdfs:label ?name ; \
  1086. crm:P2_has_type 'Opera d\'Arte' . \
  1087. OPTIONAL {?uri crm:P1_is_identified_by ?uri_identifier . \
  1088. ?uri_identifier rdfs:label ?identifier . } \
  1089. OPTIONAL {?uri crm:P45_consists_of ?uri_material . \
  1090. ?uri_material rdfs:label ?material . } \
  1091. OPTIONAL {?uri crm:P52_has_current_owner ?uri_owner . \
  1092. ?uri_owner rdfs:label ?owner . } \
  1093. ?production crm:P108_has_produced ?uri . \
  1094. OPTIONAL {?production crm:P32_used_general_technique ?uri_teche . \
  1095. ?uri_teche rdfs:label ?technique . } \
  1096. OPTIONAL {?pc crm:P01_has_domain ?production ; \
  1097. crm:P02_has_range ?uri_person . \
  1098. ?uri_person rdfs:label ?name_artist .} \
  1099. OPTIONAL {?uri crm:P62_depicts ?uri_subject . \
  1100. ?uri_subject rdfs:label ?subject . } \
  1101. OPTIONAL {?productionI crm:P108_has_produced ?uri ; \
  1102. crm:P2_has_type 'Inizio'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1103. crm:P4_has_time-span ?uri_time_spanI . \
  1104. ?uri_time_spanI rdfs:label ?start_date . } \
  1105. OPTIONAL {?productionF crm:P108_has_produced ?uri ; \
  1106. crm:P2_has_type 'Fine'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1107. crm:P4_has_time-span ?uri_time_spanF . \
  1108. ?uri_time_spanF rdfs:label ?end_date . } \
  1109. }",
  1110. queryLettere : " SELECT DISTINCT * \
  1111. WHERE { GRAPH ?graph {?uri rdf:type crm:E73_Information_Object} \
  1112. ?uri crm:P2_has_type ?uri_type . \
  1113. ?uri_type rdfs:label 'lettera' . \
  1114. ?uri crm:P72_has_language ?uri_language . \
  1115. ?uri_language rdfs:label ?language ; \
  1116. crm:P3_has_note ?uri_area . \
  1117. ?uri_area rdfs:label ?linguistic_area . \
  1118. ?uri_documentation crm:P70_documents ?uri ; \
  1119. crm:P1_is_identified_by ?uri_editionL . \
  1120. ?uri_editionL rdfs:label ?long_edition ; \
  1121. crm:P139_has_alternative_form ?uri_editionS . \
  1122. ?uri_editionS rdfs:label ?short_edition . \
  1123. ?uri_doc crm:P128_carries ?uri . \
  1124. GRAPH <http://147.213.76.182:8890/aspo/datini> {?uri_doc crm:P25i_moved_by ?event} \
  1125. ?send rdfs:subClassOf ?event ; \
  1126. rdf:type crm:EL2_Send_Letter . \
  1127. OPTIONAL {?send crm:P4_has_time-span ?uri_time_spanS. \
  1128. ?uri_time_spanS rdfs:label ?start_date . } \
  1129. OPTIONAL {?send crm:P27_moved_from ?uri_placeS . \
  1130. ?uri_placeS rdfs:label ?start_place } \
  1131. OPTIONAL {?send crm:P01_has_domain ?pcS . \
  1132. ?pcS crm:P02_has_range ?uri_sender . \
  1133. ?uri_sender rdfs:label ?mittente .} \
  1134. ?receive rdfs:subClassOf ?event ; \
  1135. rdf:type crm:EL3_Receive_Letter . \
  1136. OPTIONAL {?receive crm:P4_has_time-span ?uri_time_spanE . \
  1137. ?uri_time_spanE rdfs:label ?end_date . } \
  1138. OPTIONAL {?received crm:P26_moved_to ?uri_placeE . \
  1139. ?uri_placeE rdfs:label ?end_place } \
  1140. OPTIONAL {?receive crm:P01_has_domain ?pcR . \
  1141. ?pcR crm:P02_has_range ?uri_receiver . \
  1142. ?uri_receiver rdfs:label ?destinatario .} \
  1143. ?uri crm:P67_refers_to ?uri_lemma . \
  1144. ?uri_lemma rdfs:label ?lemma . \
  1145. }"
  1146. },
  1147. queryCustom : {
  1148. queryTipo : " SELECT DISTINCT ?subject ?uri_contrassegno ?label \
  1149. WHERE { \
  1150. ?subject crm:P138_represents ?uri_contrassegno ; \
  1151. crm:P104_is_subject_to ?right . \
  1152. ?uri_contrassegno rdfs:label ?label ; \
  1153. crm:P2_has_type '{TYPE}' . \
  1154. }",
  1155. queryOccupazione : "SELECT DISTINCT ?subject ?name ?id ?givenName ?familyName ?patronymic ?provenienza SAMPLE(?occupation) AS ?occupation \
  1156. WHERE {GRAPH ?g {?subject rdf:type crm:E21_Person} \
  1157. ?subject foaf:name ?name . \
  1158. OPTIONAL {?subject crm:P1_is_identified_by ?id . \
  1159. ?id rdfs:label ?identifier } \
  1160. OPTIONAL {?subject foaf:givenName ?givenName} \
  1161. OPTIONAL {?subject foaf:familyName ?familyName} \
  1162. OPTIONAL {?subject person:patronymicName ?patronymic } \
  1163. OPTIONAL {?subject crm:P74_has_current_or_former_residence ?uri_provenienza . \
  1164. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  1165. rdfs:label ?provenienza . } \
  1166. ?subject schema:hasOccupation ?uri_occupation . \
  1167. ?uri_occupation rdfs:label ?occupation . \
  1168. ?occupation bif:contains '\"{WORD}\"' \
  1169. }",
  1170. queryOpereGrafo : "SELECT DISTINCT ?subject ?label \
  1171. WHERE {GRAPH <{GRAPH}> {?subject rdf:type crm:E22_Man-Made_Object } \
  1172. ?subject rdfs:label ?label} "
  1173. }
  1174. };