managerQuery.js 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  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://dev.restore.ovi.cnr.it: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. ?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://dev.restore.ovi.cnr.it: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:P1_is_identified_by ?uri_id . \
  550. ?uri_id rdfs:label ?image . \
  551. } ",
  552. queryOccupazione : " SELECT DISTINCT ?occupation ?worklocation \
  553. WHERE { \
  554. VALUES ?uri {<{URI}>} \
  555. ?uri rdf:type crm:E21_Person ; \
  556. schema:hasOccupation ?uri_occupation ; \
  557. schema:workLocation ?uri_worklocation . \
  558. ?uri_occupation rdfs:label ?occupation ; \
  559. schema:occupationLocation ?uri_worklocation . \
  560. ?uri_worklocation rdfs:label ?worklocation . \
  561. }"
  562. },
  563. querySchedaOggetto : {
  564. 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 \
  565. WHERE { \
  566. VALUES ?uri {<{URI}>} \
  567. GRAPH ?g { ?uri rdfs:label ?label } \
  568. ?uri rdf:type crm:E22_Man-Made_Object . \
  569. OPTIONAL {?uri crm:P1_is_identified_by ?uri_id . \
  570. ?uri_id rdfs:label ?id ; \
  571. crm:P2_has_type 'Segnatura' .} \
  572. OPTIONAL { ?uri crm:P43_has_dimension ?uri_consistency . \
  573. ?uri_consistency crm:P2_has_type 'Consistenza carte' ; \
  574. rdfs:label ?consistency } \
  575. OPTIONAL { ?uri crm:P43_has_dimension ?uri_dimension . \
  576. ?uri_dimension crm:P2_has_type 'Dimensioni' ; \
  577. rdfs:label ?dimension } \
  578. OPTIONAL { ?uri crm:P139_has_alternative_form ?uri_registro . \
  579. ?uri_registro rdfs:label ?sigla_registro; \
  580. crm:P2_has_type 'Sigla registro' . } \
  581. OPTIONAL { ?uri crm:P45_consist_of ?uri_material . \
  582. ?uri_material rdfs:label ?material } \
  583. OPTIONAL { ?uri crm:P52_has_current_owner ?uri_owner . \
  584. ?uri_owner rdfs:label ?owner . } \
  585. OPTIONAL { ?uri crm:P54_has_current_permanent_location ?location } \
  586. OPTIONAL { ?uri crm:P3_has_note ?uri_note . \
  587. ?uri_note rdfs:label ?note } \
  588. OPTIONAL { ?uri crm:P92i_was_brought_into_existence_by ?creation . \
  589. ?creation crm:P4_has_time-span ?uri_time_span . \
  590. ?uri_time_span rdfs:label ?time_span . } \
  591. OPTIONAL {?uri_document crm:P46_is_composed_of ?uri ; \
  592. rdfs:label ?document .} \
  593. } ",
  594. queryContent : " SELECT DISTINCT ?g AS ?graph ?uri ?titolo ?tipo (group_concat(distinct ?ref ; separator='<br />') as ?ref) \
  595. WHERE { \
  596. VALUES ?object {<{URI}>} \
  597. ?object crm:P128_carries ?uri . \
  598. ?uri rdf:type crm:E73_Information_Object . \
  599. GRAPH ?g { ?uri rdfs:label ?label } \
  600. OPTIONAL {?uri crm:P1_is_identified_by ?uri_titolo . \
  601. ?uri_titolo rdfs:label ?titolo ; \
  602. rdf:type crm:E35_Title . } \
  603. OPTIONAL { ?uri crm:P2_has_type ?uri_tipo . \
  604. ?uri_tipo rdfs:label ?tipo . } \
  605. OPTIONAL { ?uri crm:P67_refers_to ?uri_ref . \
  606. ?uri_ref rdfs:label ?ref . } \
  607. FILTER NOT EXISTS {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> { ?uri rdfs:label ?label }}. \
  608. }",
  609. queryOviLetter : " SELECT DISTINCT ?otherId ?InfObj \
  610. WHERE { \
  611. VALUES ?uri {<{URI}>} \
  612. ?uri crm:P1_is_identified_by ?uri_id . \
  613. ?uri_id crm:P2_has_type 'Segnatura' ; \
  614. crm:P139_has_alternative_form ?other_id . \
  615. ?other_id crm:P2_has_type ?uri_type ; \
  616. rdfs:label ?otherId . \
  617. ?uri_type rdfs:label 'Segnatura OVI' . \
  618. OPTIONAL { ?uri crm:P128_carries ?InfObj . \
  619. GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?InfObj rdf:type crm:E73_Information_Object } } \
  620. } ",
  621. queryPersone : " SELECT DISTINCT ?uri_person ?name (group_concat(distinct ?p_type ; separator=', ') as ?types) (group_concat(distinct ?person_note ; separator=', ') as ?types2) ?note \
  622. WHERE { \
  623. VALUES ?uri {<{URI}>} \
  624. { \
  625. ?document crm:P141_assigned ?uri ; \
  626. crm:P67_refers_to ?uri_person . \
  627. ?uri_person foaf:name ?name ; \
  628. crm:P2_has_type ?person_type . \
  629. ?person_type rdfs:label ?p_type . \
  630. } UNION { \
  631. ?uri crm:P92i_was_brought_into_existence_by ?creation . \
  632. ?creation crm:P67_refers_to ?uri_person . \
  633. ?uri_person foaf:name ?name ; \
  634. crm:P67.1_type ?person_type . \
  635. OPTIONAL {?uri_person crm:P3_has_note ?note } \
  636. ?person_type rdfs:label ?p_type . \
  637. } UNION { \
  638. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  639. {?uri_paper crm:P128_carries ?uri_doc } \
  640. UNION \
  641. {?uri crm:P128_carries ?uri_doc } \
  642. ?uri_doc crm:P70_documents ?event ; \
  643. rdfs:label ?document . \
  644. ?uri_obj crm:P128_carries ?uri_doc . \
  645. ?uri_doc rdfs:label ?object . \
  646. ?event crm:P01_has_domain ?domain . \
  647. ?domain crm:P02_has_range ?uri_person ; \
  648. crm:P14.1_in_the_role_of ?uri_role . \
  649. ?uri_role rdfs:label ?p_type . \
  650. ?uri_person rdfs:label ?name . \
  651. OPTIONAL {?uri_person crm:P3_has_note ?uri_person_note . \
  652. ?uri_person_note rdfs:label ?person_note; \
  653. crm:P2_has_type 'Nota collegamento con gettatello' . } \
  654. } \
  655. }",
  656. queryAssocDocs : " SELECT DISTINCT ?card ?doc_type ?name_card \
  657. WHERE { \
  658. VALUES ?uri {<{URI}>} \
  659. ?uri crm:P46_is_composed_of ?card . \
  660. ?card rdfs:label ?name_card . \
  661. OPTIONAL {?card crm:P2_has_type ?doc_type } \
  662. OPTIONAL {?document crm:P141_assigned ?card ; \
  663. crm:P67_refers_to ?uri_person . \
  664. ?uri_person foaf:name ?name ; \
  665. crm:P2_has_type ?person_type . \
  666. ?person_type rdfs:label ?type . \
  667. } \
  668. }",
  669. queryContrassegni : " SELECT DISTINCT ?g ?uri ?contrassegno ?image ?uri_person ?gettatello\
  670. WHERE {VALUES ?uri {<{URI}>} \
  671. GRAPH ?g {?uri ?p ?o} \
  672. ?uri crm:P138_represents ?uri_contrassegno ; \
  673. crm:P1_is_identified_by ?uri_id . \
  674. ?uri_id rdfs:label ?image . \
  675. ?uri_contrassegno rdfs:label ?contrassegno . \
  676. ?uri_documentation crm:P140_assigned_attribute_to ?uri_contrassegno ; \
  677. crm:P141_assigned ?uri_person . \
  678. ?uri_person rdfs:label ?gettatello . \
  679. }",
  680. queryEventiGettatelli : " SELECT DISTINCT ?uri_obj ?object ?name_event ?event_type ?uri_person ?label ?role ?time_span ?uri_place ?place \
  681. WHERE {VALUES ?uri {<{URI}>} \
  682. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  683. {?uri_paper crm:P128_carries ?uri_doc } \
  684. UNION \
  685. {?uri crm:P128_carries ?uri_doc } \
  686. ?uri_doc crm:P70_documents ?event ; \
  687. rdfs:label ?document . \
  688. ?uri_obj crm:P128_carries ?uri_doc . \
  689. ?uri_doc rdfs:label ?object . \
  690. ?event rdfs:label ?name_event . \
  691. ?event crm:P2_has_type ?uri_event_type . \
  692. ?uri_event_type rdfs:label ?event_type . \
  693. ?event crm:P01_has_domain ?domain . \
  694. ?domain crm:P02_has_range ?uri_person ; \
  695. crm:P14.1_in_the_role_of ?uri_role . \
  696. ?uri_role rdfs:label ?role . \
  697. ?uri_person rdfs:label ?label . \
  698. OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
  699. ?uri_time_span rdfs:label ?time_span . } \
  700. OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
  701. ?uri_place owl:sameAs ?uri_location ; \
  702. crm:P168_place_is_defined_by ?coords; \
  703. rdfs:label ?place . } \
  704. }",
  705. queryLuoghiGT : " SELECT DISTINCT ?uri_place ?place \
  706. WHERE {VALUES ?uri {<{URI}>} \
  707. OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
  708. {?uri_paper crm:P128_carries ?uri_doc } \
  709. UNION \
  710. {?uri crm:P128_carries ?uri_doc } \
  711. ?uri_doc crm:P70_documents ?event . \
  712. ?event crm:P7_took_place_at ?uri_place . \
  713. ?uri_place crm:P168_place_is_defined_by ?coords; \
  714. rdfs:label ?place . \
  715. }",
  716. queryTree : " SELECT DISTINCT ?uri ?label ?uri_document ?document \
  717. WHERE {VALUES ?uri {<{URI}>} \
  718. ?uri rdfs:label ?label ; \
  719. crm:P46_is_composed_of ?uri_document . \
  720. ?uri_document rdfs:label ?document \
  721. }"
  722. },
  723. querySchedaLuogo : {
  724. query : " SELECT DISTINCT ?graph ?uri ?name_place ?coordinates {\
  725. GRAPH ?graph { VALUES ?uri { <{URI}> } \
  726. ?uri crm:P168_place_is_defined_by ?coordinates;\
  727. rdfs:label ?name_place .\
  728. }\
  729. }",
  730. queryRiferimenti : " SELECT DISTINCT ?references {\
  731. <{URI}> owl:sameAs ?references\
  732. }",
  733. queryToponimi : " SELECT DISTINCT ?toponimi {\
  734. <{URI}> crm:P1_is_identified_by ?uri_toponym .\
  735. ?uri_toponym rdfs:label ?toponimi\
  736. }",
  737. queryRicezione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
  738. WHERE { \
  739. <{URI}> owl:sameAs ?place . \
  740. ?event_to crm:P26_moved_to ?place ; \
  741. rdf:type crm:EL3_Receive_Letter ; \
  742. rdfs:subClassOf ?event . \
  743. ?document_uri crm:P25i_moved_by ?event ; \
  744. rdfs:label ?document_name . \
  745. ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  746. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  747. rdfs:label ?segnatura . \
  748. OPTIONAL {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
  749. ?InfObj rdf:type crm:E73_Information_Object} }. \
  750. OPTIONAL {?event_to crm:P4_has_time-span ?uri_ts . \
  751. ?uri_ts rdfs:label ?time_span . } \
  752. } ",
  753. queryInvio : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
  754. WHERE { \
  755. <{URI}> owl:sameAs ?place . \
  756. ?event_to crm:P27_moved_from ?place ; \
  757. rdf:type crm:EL2_Send_Letter ; \
  758. rdfs:subClassOf ?event . \
  759. ?document_uri crm:P25i_moved_by ?event ; \
  760. rdfs:label ?document_name . \
  761. ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  762. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  763. rdfs:label ?segnatura . \
  764. OPTIONAL {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
  765. ?InfObj rdf:type crm:E73_Information_Object} }. \
  766. OPTIONAL {?event_to crm:P4_has_time-span ?uri_ts . \
  767. ?uri_ts rdfs:label ?time_span . } \
  768. }",
  769. queryCitazione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name SAMPLE(?time_span) AS ?time_span ?InfObj \
  770. WHERE { \
  771. VALUES ?uri {<{URI}>} \
  772. {?uri crm:P1_is_identified_by ?toponym . \
  773. ?InfObj crm:P67_refers_to ?toponym . \
  774. ?document_uri crm:P128_carries ?InfObj ; \
  775. rdfs:label ?document_name . \
  776. OPTIONAL {?document_uri crm:P1_is_identified_by ?uriSegnatura . \
  777. ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
  778. rdfs:label ?segnatura . } \
  779. OPTIONAL {?document_uri crm:P25i_moved_by ?event . \
  780. ?event_send rdfs:subClassOf ?event ; \
  781. rdf:type crm:EL2_Send_Letter ; \
  782. crm:P4_has_time-span ?uri_ts . \
  783. ?uri_ts rdfs:label ?time_span . } \
  784. } UNION { \
  785. ?event_gt crm:P7_took_place_at ?uri . \
  786. ?document_inf crm:P70_documents ?event_gt . \
  787. ?document_uri crm:P128_carries ?document_inf ; \
  788. crm:P1_is_identified_by ?uriSegnatura ; \
  789. rdfs:label ?document_name . \
  790. ?uriSegnatura rdfs:label ?segnatura . \
  791. } \
  792. } ",
  793. queryPersone : " SELECT DISTINCT ?role ?range SAMPLE(?name) AS ?label COUNT(?range) AS ?count \
  794. WHERE{ \
  795. VALUES ?uri {<{URI}>} \
  796. {?place owl:sameAs ?uri . \
  797. ?event_to crm:P26_moved_to ?place ; \
  798. rdf:type crm:EL3_Receive_Letter ; \
  799. crm:P01_has_domain ?domain . \
  800. ?domain crm:P02_has_range ?range ; \
  801. crm:P14.1_in_the_role_of ?uri_role . \
  802. ?uri_role rdfs:label ?role . \
  803. ?range rdfs:label ?lb ; \
  804. foaf:name ?name . \
  805. } UNION { \
  806. ?place owl:sameAs ?uri . \
  807. ?event_to crm:P27_moved_from ?place ; \
  808. rdf:type crm:EL2_Send_Letter ; \
  809. crm:P01_has_domain ?domain . \
  810. ?domain crm:P02_has_range ?range ; \
  811. crm:P14.1_in_the_role_of ?uri_role . \
  812. ?uri_role rdfs:label ?role . \
  813. ?range rdfs:label ?lb ; \
  814. foaf:name ?name . \
  815. } UNION { \
  816. ?event_gt crm:P7_took_place_at ?uri ; \
  817. crm:P01_has_domain ?domain . \
  818. ?domain crm:P02_has_range ?range ; \
  819. crm:P14.1_in_the_role_of ?uri_role . \
  820. ?uri_role rdfs:label ?role . \
  821. ?range rdfs:label ?name . \
  822. } \
  823. } GROUP BY ?role ?range \
  824. ORDER BY ?label",
  825. queryCount : " SELECT ?place ?label COUNT(?label) AS ?Count \
  826. WHERE{ \
  827. ?place_to owl:sameAs <{URI}> . \
  828. ?event_to crm:P26_moved_to ?place_to ; \
  829. rdf:type crm:EL3_Receive_Letter ; \
  830. rdfs:subClassOf ?event . \
  831. ?event_from rdfs:subClassOf ?event ; \
  832. rdf:type crm:EL2_Send_Letter ; \
  833. crm:P27_moved_from ?place . \
  834. ?place rdfs:label ?label \
  835. } \
  836. ORDER BY DESC (?Count)",
  837. queryCount2 : " SELECT ?place ?label COUNT(?label) AS ?Count \
  838. WHERE{ \
  839. ?place_from owl:sameAs <{URI}> . \
  840. ?event_from crm:P27_moved_from ?place_from ; \
  841. rdf:type crm:EL2_Send_Letter ; \
  842. rdfs:subClassOf ?event . \
  843. ?event_to rdfs:subClassOf ?event ; \
  844. rdf:type crm:EL2_Send_Letter ; \
  845. crm:P27_moved_from ?place . \
  846. ?place rdfs:label ?label . \
  847. } \
  848. ORDER BY DESC (?Count) "
  849. },
  850. querySchedaOpera : {
  851. 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 \
  852. WHERE { \
  853. VALUES ?uri {<{URI}>} \
  854. GRAPH ?graph {?uri rdfs:label ?label} \
  855. OPTIONAL {?uri crm:P3_has_note ?note } \
  856. ?uri crm:P128_carries ?Inf_Obj . \
  857. OPTIONAL {?Inf_Obj crm:P1_is_identified_by ?uriTitle . \
  858. ?uriTitle rdf:type crm:E35_Title; \
  859. rdfs:label ?title } \
  860. OPTIONAL {?Inf_Obj crm:P2_has_type ?uriType . \
  861. ?uriType rdfs:label ?type } \
  862. OPTIONAL {?uri crm:P43_has_dimension ?uriDimension . \
  863. ?uriDimension crm:P90_has_value ?value; \
  864. crm:P91_has_unit ?uri_unit . \
  865. ?uri_unit rdfs:label ?unit } \
  866. OPTIONAL {?uri crm:P1_is_identified_by ?uriIdentifier . \
  867. ?uriIdentifier rdfs:label ?identifier } \
  868. OPTIONAL {?uri crm:P45_consists_of ?uriMaterial . \
  869. ?uriMaterial rdfs:label ?material } \
  870. OPTIONAL {?uri crm:P44_has_condition ?uriCondition . \
  871. ?uriCondition crm:P2_has_type ?condition} \
  872. OPTIONAL {?uri crm:P54_has_current_permanent_location ?current_location } \
  873. OPTIONAL {?uri crm:P62_depicts ?uriSubject . \
  874. ?uriSubject rdfs:label ?subject; \
  875. crm:P2_has_type 'Identificazione Iconografica' .} \
  876. OPTIONAL {?uri crm:P62_depicts ?uriSubjectPer . \
  877. ?uriSubjectPer foaf:givenName ?personName ; \
  878. foaf:familyName ?personSurname ; \
  879. person:patronymicName ?personPatronymic ; \
  880. rdf:type foaf:person . } \
  881. OPTIONAL {?uri crm:P52_has_current_owner ?uriOwner . \
  882. ?uriOwner rdfs:label ?current_owner } \
  883. OPTIONAL {?uri crm:P56_bears_feature ?uri_inscription . \
  884. ?uri_inscription crm:P128_carries ?uri_objInscr . \
  885. ?uri_objInscr crm:P3_has_note ?iscrizione . } \
  886. }",
  887. queryIconclass : " SELECT DISTINCT ?uri_iconclass ?iconclass \
  888. WHERE { \
  889. VALUES ?uri {<{URI}>} \
  890. ?uri crm:P62_depicts ?uri_iconclass . \
  891. ?uri_iconclass rdfs:label ?iconclass ; \
  892. crm:P2_has_type 'Sigla Iconclass' . \
  893. }",
  894. 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) \
  895. WHERE { \
  896. VALUES ?uri {<{URI}>} \
  897. ?uri crm:P128_carries ?Information_Object . \
  898. ?Information_Object crm:P108i_was_produced_by ?Production . \
  899. OPTIONAL {?Production crm:P4_has_time-span ?uriTS ; \
  900. crm:P32_used_general_technique ?uriTecne . \
  901. ?uriTS rdfs:label ?time_span . \
  902. ?uriTecne rdfs:label ?technique} \
  903. OPTIONAL {?pc crm:P01_has_domain ?Production ; \
  904. crm:P02_has_range ?uriPerson ; \
  905. crm:P14.1_in_the_role_of ?uriRole . \
  906. ?uriPerson rdfs:label ?person . \
  907. ?uriRole rdfs:label ?role} \
  908. }",
  909. queryPicture : " SELECT DISTINCT ?picture ?provenienza ?license \
  910. WHERE { \
  911. VALUES ?uri {<{URI}>} \
  912. ?uri_tavola crm:P138_represents ?uri ; \
  913. crm:P1_is_identified_by ?tavola_id . \
  914. ?tavola_id rdfs:label ?picture . \
  915. ?uri_tavola crm:P3_has_note ?uri_note . \
  916. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  917. crm:P1_is_identified_by ?provenienza . \
  918. ?uri_tavola crm:P104_is_subject_to ?uri_licence . \
  919. ?uri_licence crm:P1_is_identified_by ?license \
  920. }",
  921. queryBibliography : " SELECT DISTINCT ?bibliography ?pages ?type (group_concat(distinct ?catalog ;separator=', ') as ?catalog) ?provenienza ?license \
  922. WHERE { \
  923. VALUES ?uri {<{URI}>} \
  924. ?uri crm:P128_carries ?infObj . \
  925. ?document crm:P70_documents ?infObj . \
  926. OPTIONAL {?document crm:P3_has_note ?pages} \
  927. ?edition crm:P46_is_composed_of ?document ; \
  928. rdfs:label ?bibliography ; \
  929. crm:P2_has_type 'Bibliografia' . \
  930. OPTIONAL {?uri_catalog crm:P138_represents ?document ; \
  931. crm:P2_has_type ?type ; \
  932. crm:P1_is_identified_by ?catalog_id . \
  933. ?catalog_id rdfs:label ?catalog . \
  934. ?uri_catalog crm:P3_has_note ?uri_note . \
  935. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  936. crm:P1_is_identified_by ?provenienza . \
  937. ?uri_catalog crm:P104_is_subject_to ?uri_licence . \
  938. ?uri_licence crm:P1_is_identified_by ?license} \
  939. }",
  940. querySchedeStoriche : " SELECT DISTINCT ?scheda ?type ?provenienza ?license \
  941. WHERE { \
  942. VALUES ?uri {<{URI}>} \
  943. ?uri crm:P128_carries ?InfObj . \
  944. ?uri_scheda crm:P138_represents ?InfObj ; \
  945. crm:P2_has_type ?type ; \
  946. crm:P1_is_identified_by ?scheda_id . \
  947. ?scheda_id rdfs:label ?scheda . \
  948. OPTIONAL {?uri_scheda crm:P3_has_note ?uri_note . \
  949. ?uri_note crm:P2_has_type 'Provenienza immagine' ; \
  950. crm:P1_is_identified_by ?provenienza} \
  951. OPTIONAL {?uri_scheda crm:P104_is_subject_to ?uri_licence . \
  952. ?uri_licence crm:P1_is_identified_by ?license} \
  953. }"
  954. },
  955. queryTimeSpace : {
  956. querySpace : " SELECT DISTINCT ?uri_person ?person ?event ?uri_place ?place ?coords ?time_span ?year ?month ?day \
  957. WHERE {?uri_event rdfs:label ?event ; \
  958. crm:P01_has_domain ?pc ; \
  959. crm:P7_took_place_at ?uri_NTplace ; \
  960. crm:P4_has_time-span ?uri_time_span . \
  961. ?pc crm:P02_has_range ?uri_person . \
  962. ?uri_person rdfs:label ?person . \
  963. ?uri_place owl:sameAs ?uri_NTplace . \
  964. ?uri_place crm:P168_place_is_defined_by ?coords ; \
  965. rdfs:label ?place . \
  966. ?uri_time_span rdfs:label ?time_span ; \
  967. time:year ?year . \
  968. OPTIONAL {?uri_time_span time:month ?month} \
  969. OPTIONAL {?uri_time_span time:day ?day} \
  970. } ORDER BY ?year ?month ?day",
  971. queryTime1 : " SELECT DISTINCT ?event ?uri_place ?place ?coords ?time_span ?month ?day \
  972. WHERE {?uri_event rdfs:label ?event ; \
  973. crm:P01_has_domain ?pc ; \
  974. crm:P7_took_place_at ?uri_NTplace ; \
  975. crm:P4_has_time-span ?uri_time_span . \
  976. ?pc crm:P02_has_range ?uri_person . \
  977. ?uri_person rdfs:label ?person . \
  978. ?uri_place owl:sameAs ?uri_NTplace . \
  979. ?uri_place crm:P168_place_is_defined_by ?coords ; \
  980. rdfs:label ?place . \
  981. ?uri_time_span rdfs:label ?time_span ; \
  982. time:year {YEAR} . \
  983. OPTIONAL {?uri_time_span time:month ?month} \
  984. OPTIONAL {?uri_time_span time:day ?day} \
  985. } ORDER BY ?month ?day",
  986. queryTime2 : " SELECT DISTINCT ?uri_person ?person ?event ?uri_place ?place ?coords ?year ?month ?day \
  987. WHERE {?uri_event rdfs:label ?event ; \
  988. crm:P01_has_domain ?pc ; \
  989. crm:P7_took_place_at ?uri_NTplace ; \
  990. crm:P4_has_time-span ?uri_time_span . \
  991. ?pc crm:P02_has_range ?uri_person . \
  992. ?uri_person rdfs:label ?person . \
  993. ?uri_place owl:sameAs ?uri_NTplace . \
  994. ?uri_place crm:P168_place_is_defined_by ?coords ; \
  995. rdfs:label ?place . \
  996. ?uri_time_span rdfs:label '{DATE}' . \
  997. OPTIONAL {?uri_time_span time:year ?year} \
  998. OPTIONAL {?uri_time_span time:month ?month} \
  999. OPTIONAL {?uri_time_span time:day ?day} \
  1000. } ORDER BY ?year ?month ?day",
  1001. queryTimeLetters : " SELECT DISTINCT ?uri_subject ?subject ?uri_place ?place ?coords ?time_span ?year ?month ?day \
  1002. WHERE {?uri_subject rdf:type crm:E22_Man-Made_Object ; \
  1003. rdfs:label ?subject ; \
  1004. crm:P25i_moved_by ?event1 . \
  1005. ?send1 rdfs:subClassOf ?event1 ; \
  1006. crm:P4_has_time-span ?uri_time_span . \
  1007. ?uri_time_span rdfs:label ?time_span ; \
  1008. time:year ?year ; \
  1009. time:month ?month ; \
  1010. time:day ?day . \
  1011. ?uri_subject crm:P25i_moved_by ?event2 . \
  1012. ?send2 rdfs:subClassOf ?event2 ; \
  1013. crm:P27_moved_from ?uri_placeNT . \
  1014. ?uri_place ?property ?uri_placeNT ; \
  1015. rdfs:label ?place ; \
  1016. crm:P168_place_is_defined_by ?coords \
  1017. } ORDER BY ?year ?month ?day"
  1018. },
  1019. queryRicercaAvanzata : {
  1020. queryOggetto : "SELECT DISTINCT ?graph AS ?g ?uri ?name ?identifier ?material ?owner ?type ?start_date ?end_date \
  1021. WHERE {GRAPH ?graph {?uri rdf:type crm:E22_Man-Made_Object} \
  1022. ?uri rdfs:label ?name . \
  1023. OPTIONAL {?uri crm:P1_is_identified_by ?uri_identifier . \
  1024. ?uri_identifier rdfs:label ?identifier . } \
  1025. OPTIONAL {?uri crm:P45_consist_of ?uri_material . \
  1026. ?uri_material rdfs:label ?material . } \
  1027. OPTIONAL {?uri crm:P2_has_type ?uri_type . \
  1028. ?uri_type rdfs:label ?type . } \
  1029. OPTIONAL {?uri crm:P52_has_current_owner ?uri_owner . \
  1030. ?uri_owner rdfs:label ?owner . } \
  1031. OPTIONAL {?uri crm:P92i_was_brought_into_existence_by ?creationI . \
  1032. ?creationI crm:P2_has_type 'Inizio'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1033. crm:P4_has_time-span ?uri_time_spanI . \
  1034. ?uri_time_spanI rdfs:label ?start_date . } \
  1035. OPTIONAL {?uri crm:P92i_was_brought_into_existence_by ?creationF . \
  1036. ?creationF crm:P2_has_type 'Fine'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1037. crm:P4_has_time-span ?uri_time_spanF . \
  1038. ?uri_time_spanF rdfs:label ?end_date . } \
  1039. }",
  1040. 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 \
  1041. WHERE { \
  1042. GRAPH ?graph {?uri rdfs:label ?label} \
  1043. ?uri foaf:name ?name . \
  1044. ?uri foaf:givenName ?givenName . \
  1045. OPTIONAL {?uri foaf:familyName ?familyName} \
  1046. OPTIONAL {?uri foaf:gender ?gender} \
  1047. OPTIONAL {?uri person:patronymicName ?patronymic } \
  1048. OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_provenienza . \
  1049. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  1050. rdfs:label ?provenienza . } \
  1051. OPTIONAL {?uri crm:P2_has_type ?uri_person_type . \
  1052. ?uri_person_type rdfs:label ?person_type } \
  1053. OPTIONAL {?uri schema:hasOccupation ?uriOccupation . \
  1054. ?uriOccupation rdf:type schema:Occupation; \
  1055. rdfs:label ?occupation } \
  1056. OPTIONAL {?uri schema:honorificPrefix ?qualification} \
  1057. OPTIONAL {?uri crm:P100i_died_in ?Death . \
  1058. OPTIONAL {?Death crm:P4_has_time-span ?Death_TS . \
  1059. ?Death_TS rdfs:label ?Death_Date . } \
  1060. OPTIONAL {?Death crm:P7_took_place_at ?Place_D . \
  1061. ?Place_D rdfs:label ?Death_Place } \
  1062. } \
  1063. OPTIONAL {?uri crm:P98i_was_born ?Birth . \
  1064. OPTIONAL {?Birth crm:P4_has_time-span ?Birth_TS . \
  1065. ?Birth_TS rdfs:label ?Birth_Date . } \
  1066. OPTIONAL {?Birth crm:P7_took_place_at ?Place_B . \
  1067. ?Place_B rdfs:label ?Birth_Place } \
  1068. } \
  1069. OPTIONAL {?uri schema:alternateName ?alias . } \
  1070. OPTIONAL {?uri owl:sameAs ?variant . \
  1071. ?variant foaf:name ?otherName . } \
  1072. } ",
  1073. 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 \
  1074. WHERE {GRAPH ?graph {?uri rdf:type crm:E22_Man-Made_Object} \
  1075. ?uri rdfs:label ?name ; \
  1076. crm:P2_has_type 'Opera d\'Arte' . \
  1077. OPTIONAL {?uri crm:P1_is_identified_by ?uri_identifier . \
  1078. ?uri_identifier rdfs:label ?identifier . } \
  1079. OPTIONAL {?uri crm:P45_consists_of ?uri_material . \
  1080. ?uri_material rdfs:label ?material . } \
  1081. OPTIONAL {?uri crm:P52_has_current_owner ?uri_owner . \
  1082. ?uri_owner rdfs:label ?owner . } \
  1083. ?production crm:P108_has_produced ?uri . \
  1084. OPTIONAL {?production crm:P32_used_general_technique ?uri_teche . \
  1085. ?uri_teche rdfs:label ?technique . } \
  1086. OPTIONAL {?pc crm:P01_has_domain ?production ; \
  1087. crm:P02_has_range ?uri_person . \
  1088. ?uri_person rdfs:label ?name_artist .} \
  1089. OPTIONAL {?uri crm:P62_depicts ?uri_subject . \
  1090. ?uri_subject rdfs:label ?subject . } \
  1091. OPTIONAL {?productionI crm:P108_has_produced ?uri ; \
  1092. crm:P2_has_type 'Inizio'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1093. crm:P4_has_time-span ?uri_time_spanI . \
  1094. ?uri_time_spanI rdfs:label ?start_date . } \
  1095. OPTIONAL {?productionF crm:P108_has_produced ?uri ; \
  1096. crm:P2_has_type 'Fine'^^<http://www.w3.org/2001/XMLSchema#string> ; \
  1097. crm:P4_has_time-span ?uri_time_spanF . \
  1098. ?uri_time_spanF rdfs:label ?end_date . } \
  1099. }",
  1100. queryLettere : " SELECT DISTINCT * \
  1101. WHERE { GRAPH ?graph {?uri rdf:type crm:E73_Information_Object} \
  1102. ?uri crm:P2_has_type ?uri_type . \
  1103. ?uri_type rdfs:label 'lettera' . \
  1104. ?uri crm:P72_has_language ?uri_language . \
  1105. ?uri_language rdfs:label ?language ; \
  1106. crm:P3_has_note ?uri_area . \
  1107. ?uri_area rdfs:label ?linguistic_area . \
  1108. ?uri_documentation crm:P70_documents ?uri ; \
  1109. crm:P1_is_identified_by ?uri_editionL . \
  1110. ?uri_editionL rdfs:label ?long_edition ; \
  1111. crm:P139_has_alternative_form ?uri_editionS . \
  1112. ?uri_editionS rdfs:label ?short_edition . \
  1113. ?uri_doc crm:P128_carries ?uri . \
  1114. GRAPH <http://dev.restore.ovi.cnr.it:8890/aspo/datini> {?uri_doc crm:P25i_moved_by ?event} \
  1115. ?send rdfs:subClassOf ?event ; \
  1116. rdf:type crm:EL2_Send_Letter . \
  1117. OPTIONAL {?send crm:P4_has_time-span ?uri_time_spanS. \
  1118. ?uri_time_spanS rdfs:label ?start_date . } \
  1119. OPTIONAL {?send crm:P27_moved_from ?uri_placeS . \
  1120. ?uri_placeS rdfs:label ?start_place } \
  1121. OPTIONAL {?send crm:P01_has_domain ?pcS . \
  1122. ?pcS crm:P02_has_range ?uri_sender . \
  1123. ?uri_sender rdfs:label ?mittente .} \
  1124. ?receive rdfs:subClassOf ?event ; \
  1125. rdf:type crm:EL3_Receive_Letter . \
  1126. OPTIONAL {?receive crm:P4_has_time-span ?uri_time_spanE . \
  1127. ?uri_time_spanE rdfs:label ?end_date . } \
  1128. OPTIONAL {?received crm:P26_moved_to ?uri_placeE . \
  1129. ?uri_placeE rdfs:label ?end_place } \
  1130. OPTIONAL {?receive crm:P01_has_domain ?pcR . \
  1131. ?pcR crm:P02_has_range ?uri_receiver . \
  1132. ?uri_receiver rdfs:label ?destinatario .} \
  1133. ?uri crm:P67_refers_to ?uri_lemma . \
  1134. ?uri_lemma rdfs:label ?lemma . \
  1135. }"
  1136. },
  1137. queryCustom : {
  1138. queryTipo : " SELECT DISTINCT ?subject ?uri_contrassegno ?label \
  1139. WHERE { \
  1140. ?subject crm:P138_represents ?uri_contrassegno . \
  1141. ?uri_contrassegno rdfs:label ?label ; \
  1142. crm:P2_has_type '{TYPE}' . \
  1143. }",
  1144. queryOccupazione : "SELECT DISTINCT ?subject ?name ?id ?givenName ?familyName ?patronymic ?provenienza SAMPLE(?occupation) AS ?occupation \
  1145. WHERE {GRAPH ?g {?subject rdf:type crm:E21_Person} \
  1146. ?subject foaf:name ?name . \
  1147. OPTIONAL {?subject crm:P1_is_identified_by ?id . \
  1148. ?id rdfs:label ?identifier } \
  1149. OPTIONAL {?subject foaf:givenName ?givenName} \
  1150. OPTIONAL {?subject foaf:familyName ?familyName} \
  1151. OPTIONAL {?subject person:patronymicName ?patronymic } \
  1152. OPTIONAL {?subject crm:P74_has_current_or_former_residence ?uri_provenienza . \
  1153. ?uri_provenienza crm:P2_has_type 'Provenienza'; \
  1154. rdfs:label ?provenienza . } \
  1155. ?subject schema:hasOccupation ?uri_occupation . \
  1156. ?uri_occupation rdfs:label ?occupation . \
  1157. ?occupation bif:contains '\"{WORD}\"' \
  1158. }",
  1159. queryOpereGrafo : "SELECT DISTINCT ?subject ?label \
  1160. WHERE {GRAPH <{GRAPH}> {?subject rdf:type crm:E22_Man-Made_Object } \
  1161. ?subject rdfs:label ?label} "
  1162. }
  1163. };