Alessia il y a 2 ans
Parent
commit
a3dc715e9b
1 fichiers modifiés avec 459 ajouts et 470 suppressions
  1. 459 470
      js/query/managerQuery.js

+ 459 - 470
js/query/managerQuery.js

@@ -212,504 +212,493 @@ var queryManager = {
     },
 
     querySchedaPersona : {
-        queryNetwork : " SELECT COUNT(?event1) AS ?count1 COUNT(?event2) AS ?count2 COUNT(?event3) AS ?count3 ?uri2 SAMPLE(?label2) AS ?text \
-        WHERE { \
-        {?event1 rdf:type crm:EL1_Exchange_Letters . \
-        ?event_to rdfs:subClassOf ?event1; \
-            rdf:type crm:EL2_Send_Letter ; \
-        crm:P01_has_domain ?pc_to . \
-        ?pc_to crm:P02_has_range ?uri . \
-        ?uri rdfs:label ?label . \
-        ?event_from rdfs:subClassOf ?event1; \
-            rdf:type crm:EL3_Receive_Letter; \
-            crm:P01_has_domain ?pc_from . \
-        ?pc_from crm:P02_has_range ?uri2 . \
-        ?uri2 rdfs:label ?label2 . \
-        FILTER (?uri = <{URI}>) \
-        } UNION { \
-        ?event2 rdf:type crm:EL1_Exchange_Letters . \
-        ?event_to rdfs:subClassOf ?event2; \
-            rdf:type crm:EL3_Receive_Letter ; \
-            crm:P01_has_domain ?pc_from . \
-        ?pc_from crm:P02_has_range ?uri . \
-        ?uri rdfs:label ?label . \
-        ?event_from rdfs:subClassOf ?event2; \
-            rdf:type crm:EL2_Send_Letter; \
+            queryNetwork : " SELECT COUNT(?event1) AS ?count1 COUNT(?event2) AS ?count2 COUNT(?event3) AS ?count3 ?uri2 SAMPLE(?label2) AS ?text \
+            WHERE { \
+            {?event1 rdf:type crm:EL1_Exchange_Letters . \
+            ?event_to rdfs:subClassOf ?event1; \
+                rdf:type crm:EL2_Send_Letter ; \
             crm:P01_has_domain ?pc_to . \
-        ?pc_to crm:P02_has_range ?uri2 . \
-        ?uri2 rdfs:label ?label2 . \
-        FILTER (?uri = <{URI}>) \
-        } UNION { \
-        ?pc crm:P02_has_range <{URI}> . \
-        ?event3 crm:P01_has_domain ?pc . \
-        ?event3 crm:P01_has_domain ?pc1 . \
-        ?pc1 crm:P02_has_range ?uri2 . \
-        ?uri2 rdfs:label ?label2 . \
-        FILTER (?pc != ?pc1) \
-        } \
-        }",
+            ?pc_to crm:P02_has_range ?uri . \
+            ?uri rdfs:label ?label . \
+            ?event_from rdfs:subClassOf ?event1; \
+                rdf:type crm:EL3_Receive_Letter; \
+                crm:P01_has_domain ?pc_from . \
+            ?pc_from crm:P02_has_range ?uri2 . \
+            ?uri2 rdfs:label ?label2 . \
+            FILTER (?uri = <{URI}>) \
+            } UNION { \
+            ?event2 rdf:type crm:EL1_Exchange_Letters . \
+            ?event_to rdfs:subClassOf ?event2; \
+                rdf:type crm:EL3_Receive_Letter ; \
+                crm:P01_has_domain ?pc_from . \
+            ?pc_from crm:P02_has_range ?uri . \
+            ?uri rdfs:label ?label . \
+            ?event_from rdfs:subClassOf ?event2; \
+                rdf:type crm:EL2_Send_Letter; \
+                crm:P01_has_domain ?pc_to . \
+            ?pc_to crm:P02_has_range ?uri2 . \
+            ?uri2 rdfs:label ?label2 . \
+            FILTER (?uri = <{URI}>) \
+            } UNION { \
+            ?pc crm:P02_has_range <{URI}> . \
+            ?event3 crm:P01_has_domain ?pc . \
+            ?event3 crm:P01_has_domain ?pc1 . \
+            ?pc1 crm:P02_has_range ?uri2 . \
+            ?uri2 rdfs:label ?label2 . \
+            FILTER (?pc != ?pc1) \
+            } \
+            }",
 
-        queryNetwork2 : " SELECT DISTINCT ?uri_person ?name \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?pc crm:P02_has_range ?uri . \
-        ?event crm:P01_has_domain ?pc . \
-        ?event crm:P01_has_domain ?pc1 . \
-        ?pc1 crm:P02_has_range ?uri_person . \
-        ?uri_person rdfs:label ?name . \
-        FILTER (?pc != ?pc1) \
-        }",
+            queryNetwork2 : " SELECT DISTINCT ?uri_person ?name \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?pc crm:P02_has_range ?uri . \
+            ?event crm:P01_has_domain ?pc . \
+            ?event crm:P01_has_domain ?pc1 . \
+            ?pc1 crm:P02_has_range ?uri_person . \
+            ?uri_person rdfs:label ?name . \
+            FILTER (?pc != ?pc1) \
+            }",
 
-        query : " SELECT DISTINCT ?place ?label ?tipo ?coordinates COUNT(?pc) AS ?count \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        {?pc crm:P02_has_range ?uri . \
-        ?event_from crm:P01_has_domain ?pc ; \
-        rdf:type crm:EL3_Receive_Letter; \
-        rdfs:label ?tipo ; \
-        crm:P26_moved_to ?place_from . \
-        ?place_from rdf:type crm:E53_Place ; \
-        owl:sameAs ?place . \
-        ?place rdfs:label ?label ; \
-        crm:P168_place_is_defined_by ?coordinates . \
-        } UNION { \
-        ?pc crm:P02_has_range ?uri . \
-        ?event_from crm:P01_has_domain ?pc ; \
-        rdf:type crm:EL2_Send_Letter; \
-        rdfs:label ?tipo ; \
-        crm:P27_moved_from ?place_from . \
-        ?place_from rdf:type crm:E53_Place ; \
-        owl:sameAs ?place . \
-        ?place rdfs:label ?label ; \
-        crm:P168_place_is_defined_by ?coordinates . \
-        } UNION { \
-        ?uri crm:P100i_died_in ?uri_death . \
-        ?uri_death crm:P7_took_place_at ?uri_place . \
-        ?uri_place rdf:type crm:E53_Place ; \
-        owl:sameAs ?place .  \
-        ?place rdfs:label ?label ;  \
-        crm:P168_place_is_defined_by ?coordinates . \
-        } UNION { \
-            ?uri crm:P98i_was_born ?uri_birth . \
-        ?uri_birth crm:P7_took_place_at ?uri_place . \
-        ?uri_place rdf:type crm:E53_Place ; \
-        owl:sameAs ?place . \
-        ?place rdfs:label ?label ;  \
-        crm:P168_place_is_defined_by ?coordinates . \
-        } \
-        UNION { \
+            query : " SELECT DISTINCT ?place ?label ?tipo ?coordinates COUNT(?pc) AS ?count \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            {?place rdfs:label ?label ; \
+            crm:P168_place_is_defined_by ?coordinates . \
+            ?place_from rdf:type crm:E53_Place ; \
+            owl:sameAs ?place . \
+            ?event_from crm:P01_has_domain ?pc ; \
+            rdfs:label ?tipo ; \
+            ?property ?place_from . \
             ?pc crm:P02_has_range ?uri . \
-            ?uri_event crm:P01_has_domain ?pc; \
-            crm:P7_took_place_at ?uri_place ; \
-            crm:P2_has_type ?uri_type . \
-            ?uri_type rdfs:label ?tipo . \
+            } UNION { \
+            ?uri crm:P100i_died_in ?uri_death . \
+            ?uri_death crm:P7_took_place_at ?uri_place . \
             ?uri_place rdf:type crm:E53_Place ; \
-            rdfs:label ?label . \
-            ?place owl:sameAs ?uri_place ; \
+            owl:sameAs ?place .  \
+            ?place rdfs:label ?label ;  \
+            crm:P168_place_is_defined_by ?coordinates . \
+            } UNION { \
+                ?uri crm:P98i_was_born ?uri_birth . \
+            ?uri_birth crm:P7_took_place_at ?uri_place . \
+            ?uri_place rdf:type crm:E53_Place ; \
+            owl:sameAs ?place . \
+            ?place rdfs:label ?label ;  \
             crm:P168_place_is_defined_by ?coordinates . \
             } \
-        }",
+            UNION { \
+                ?pc crm:P02_has_range ?uri . \
+                ?uri_event crm:P01_has_domain ?pc; \
+                crm:P7_took_place_at ?uri_place ; \
+                crm:P2_has_type ?uri_type . \
+                ?uri_type rdfs:label ?tipo . \
+                ?uri_place rdf:type crm:E53_Place ; \
+                rdfs:label ?label . \
+                ?place owl:sameAs ?uri_place ; \
+                crm:P168_place_is_defined_by ?coordinates . \
+                } \
+            }",
 
-        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 \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        GRAPH ?graph {?uri rdfs:label ?label} \
-        ?uri foaf:name ?name . \
-        OPTIONAL {?uri crm:P1_is_identified_by ?id . \
-        ?id rdfs:label ?identifier ; \
-        crm:P2_has_type ?id_type .} \
-        OPTIONAL {?uri foaf:givenName ?givenName} \
-        OPTIONAL {?uri foaf:familyName ?familyName} \
-        OPTIONAL {?uri foaf:gender ?gender} \
-        OPTIONAL {?uri person:patronymicName ?patronymic } \
-        OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_provenienza . \
-        ?uri_provenienza crm:P2_has_type 'Provenienza'; \
-        rdfs:label ?provenienza . } \
-        OPTIONAL {?uri crm:P2_has_type ?uri_person_type . \
-        ?uri_person_type rdfs:label ?person_type } \
-        OPTIONAL {?uri schema:hasOccupation ?uriOccupation . \
-        ?uriOccupation rdf:type schema:Occupation; \
-        rdfs:label ?occupation } \
-        OPTIONAL {?uri schema:honorificPrefix ?qualification} \
-        OPTIONAL {?uri crm:P100i_died_in ?Death . \
-        OPTIONAL {?Death crm:P4_has_time-span ?Death_TS . \
-        ?Death_TS rdfs:label ?Death_Date . } \
-        OPTIONAL {?Death crm:P7_took_place_at ?Place_D .  \
-        ?Place_D rdfs:label ?Death_Place } \
-        } \
-        OPTIONAL {?uri crm:P98i_was_born ?Birth . \
-        OPTIONAL {?Birth crm:P4_has_time-span ?Birth_TS . \
-        ?Birth_TS rdfs:label ?Birth_Date . } \
-        OPTIONAL {?Birth crm:P7_took_place_at ?Place_B . \
-        ?Place_B rdfs:label ?Birth_Place } \
-        } \
-        OPTIONAL {?uri crm:P107i_is_current_or_former_member_of ?uriGroup . \
-        ?uriGroup rdfs:label ?group } \
-        OPTIONAL {?uri schema:alternateName ?alias . } \
-        OPTIONAL {?uri owl:sameAs ?variant . \
-        ?variant foaf:name ?otherName . } \
-        OPTIONAL {?relation2 crm:P141_assigned ?uri ; \
-        crm:P42_assigned ?uri_rel_type2 . \
-        ?uri_rel_type2 rdfs:label 'Avo di secondo grado' . \
-        ?uri_relative2 crm:P141_assigned ?relation2; \
-        rdfs:label ?relative2 .} \
-        OPTIONAL {?relation3 crm:P141_assigned ?uri ; \
-        crm:P42_assigned ?uri_rel_type3 . \
-        ?uri_rel_type3 rdfs:label 'Avo di terzo grado' . \
-        ?uri_relative3 crm:P141_assigned ?relation3; \
-        rdfs:label ?relative3 .} \
-        } \
-        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 \
-        LIMIT 1  ",
+            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 \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            GRAPH ?graph {?uri rdfs:label ?label} \
+            ?uri foaf:name ?name . \
+            OPTIONAL {?uri crm:P1_is_identified_by ?id . \
+            ?id rdfs:label ?identifier ; \
+            crm:P2_has_type ?id_type .} \
+            OPTIONAL {?uri foaf:givenName ?givenName} \
+            OPTIONAL {?uri foaf:familyName ?familyName} \
+            OPTIONAL {?uri foaf:gender ?gender} \
+            OPTIONAL {?uri person:patronymicName ?patronymic } \
+            OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_provenienza . \
+            ?uri_provenienza crm:P2_has_type 'Provenienza'; \
+            rdfs:label ?provenienza . } \
+            OPTIONAL {?uri crm:P2_has_type ?uri_person_type . \
+            ?uri_person_type rdfs:label ?person_type } \
+            OPTIONAL {?uri schema:hasOccupation ?uriOccupation . \
+            ?uriOccupation rdf:type schema:Occupation; \
+            rdfs:label ?occupation } \
+            OPTIONAL {?uri schema:honorificPrefix ?qualification} \
+            OPTIONAL {?uri crm:P100i_died_in ?Death . \
+            OPTIONAL {?Death crm:P4_has_time-span ?Death_TS . \
+            ?Death_TS rdfs:label ?Death_Date . } \
+            OPTIONAL {?Death crm:P7_took_place_at ?Place_D .  \
+            ?Place_D rdfs:label ?Death_Place } \
+            } \
+            OPTIONAL {?uri crm:P98i_was_born ?Birth . \
+            OPTIONAL {?Birth crm:P4_has_time-span ?Birth_TS . \
+            ?Birth_TS rdfs:label ?Birth_Date . } \
+            OPTIONAL {?Birth crm:P7_took_place_at ?Place_B . \
+            ?Place_B rdfs:label ?Birth_Place } \
+            } \
+            OPTIONAL {?uri crm:P107i_is_current_or_former_member_of ?uriGroup . \
+            ?uriGroup rdfs:label ?group } \
+            OPTIONAL {?uri schema:alternateName ?alias . } \
+            OPTIONAL {?uri owl:sameAs ?variant . \
+            ?variant foaf:name ?otherName . } \
+            OPTIONAL {?relation2 crm:P141_assigned ?uri ; \
+            crm:P42_assigned ?uri_rel_type2 . \
+            ?uri_rel_type2 rdfs:label 'Avo di secondo grado' . \
+            ?uri_relative2 crm:P141_assigned ?relation2; \
+            rdfs:label ?relative2 .} \
+            OPTIONAL {?relation3 crm:P141_assigned ?uri ; \
+            crm:P42_assigned ?uri_rel_type3 . \
+            ?uri_rel_type3 rdfs:label 'Avo di terzo grado' . \
+            ?uri_relative3 crm:P141_assigned ?relation3; \
+            rdfs:label ?relative3 .} \
+            } \
+            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 \
+            LIMIT 1  ",
 
-        queryInfoGettatelli : " SELECT DISTINCT ?card ?uri_card \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?documentation crm:P67_refers_to ?uri ; \
-        crm:P141_assigned ?uri_card . \
-        ?uri_card rdfs:label ?card . \
-        } ",
+            queryInfoGettatelli : " SELECT DISTINCT ?card ?uri_card \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?documentation crm:P67_refers_to ?uri ; \
+            crm:P141_assigned ?uri_card . \
+            ?uri_card rdfs:label ?card . \
+            } ",
 
-        queryRelazioni : " SELECT DISTINCT ?relation_type ?note ?uri_person ?name ?givenName ?familyName ?patronymic ?provenienza \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?uri crm:P141_assigned ?relation . \
-        ?relation crm:P42_assigned ?uri_type ; \
-        crm:P141_assigned ?uri_person . \
-        ?uri_type rdfs:label ?relation_type . \
-        OPTIONAL {?uri_type crm:P3_has_note ?note } \
-        ?uri_person foaf:name ?name . \
-        OPTIONAL {?uri_person foaf:givenName ?givenName} \
-        OPTIONAL {?uri_person foaf:familyName ?familyName} \
-        OPTIONAL {?uri_person person:patronymicName ?patronymic } \
-        OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
-        ?uri_provenienza crm:P2_has_type 'Provenienza'; \
-        rdfs:label ?provenienza . } \
-        } ",
+            queryRelazioni : " SELECT DISTINCT ?relation_type ?note ?uri_person ?name ?givenName ?familyName ?patronymic ?provenienza \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?uri crm:P141_assigned ?relation . \
+            ?relation crm:P42_assigned ?uri_type ; \
+            crm:P141_assigned ?uri_person . \
+            ?uri_type rdfs:label ?relation_type . \
+            OPTIONAL {?uri_type crm:P3_has_note ?note } \
+            ?uri_person foaf:name ?name . \
+            OPTIONAL {?uri_person foaf:givenName ?givenName} \
+            OPTIONAL {?uri_person foaf:familyName ?familyName} \
+            OPTIONAL {?uri_person person:patronymicName ?patronymic } \
+            OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
+            ?uri_provenienza crm:P2_has_type 'Provenienza'; \
+            rdfs:label ?provenienza . } \
+            } ",
 
-        queryRelazioniInverse : " SELECT DISTINCT ?relation_type ?note ?uri_person SAMPLE(?name) AS ?name ?givenName ?familyName ?patronymic ?provenienza \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?relation crm:P141_assigned ?uri; \
-        crm:P42_assigned ?uri_type . \
-        ?uri_person crm:P141_assigned ?relation . \
-        ?uri_type rdfs:label ?relation_type . \
-        OPTIONAL {?uri_type crm:P3_has_note ?note } \
-        OPTIONAL {?uri_person foaf:name ?name } \
-        OPTIONAL {?uri_person foaf:givenName ?givenName} \
-        OPTIONAL {?uri_person foaf:familyName ?familyName}  \
-        OPTIONAL {?uri_person person:patronymicName ?patronymic } \
-        OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
-        ?uri_provenienza crm:P2_has_type 'Provenienza'; \
-        rdfs:label ?provenienza . } \
-        } ",
+            queryRelazioniInverse : " SELECT DISTINCT ?relation_type ?note ?uri_person SAMPLE(?name) AS ?name ?givenName ?familyName ?patronymic ?provenienza \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?relation crm:P141_assigned ?uri; \
+            crm:P42_assigned ?uri_type . \
+            ?uri_person crm:P141_assigned ?relation . \
+            ?uri_type rdfs:label ?relation_type . \
+            OPTIONAL {?uri_type crm:P3_has_note ?note } \
+            OPTIONAL {?uri_person foaf:name ?name } \
+            OPTIONAL {?uri_person foaf:givenName ?givenName} \
+            OPTIONAL {?uri_person foaf:familyName ?familyName}  \
+            OPTIONAL {?uri_person person:patronymicName ?patronymic } \
+            OPTIONAL {?uri_person crm:P74_has_current_or_former_residence ?uri_provenienza . \
+            ?uri_provenienza crm:P2_has_type 'Provenienza'; \
+            rdfs:label ?provenienza . } \
+            } ",
 
-        queryLetters : " SELECT DISTINCT ?type ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        {?pc crm:P02_has_range ?uri . \
-        } UNION { \
-        ?group crm:P107_has_current_or_former_member ?uri; \
-            crm:P2_has_type 'Gruppo scrittura lettera' . \
-        ?pc crm:P02_has_range ?group . \
-        } \
-        ?ev_move crm:P01_has_domain ?pc ; \
-            rdfs:label ?type ; \
-            rdfs:subClassOf ?event . \
-        ?document_uri crm:P25i_moved_by ?event ; \
-            rdfs:label ?document_name . \
-        ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
-        ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
-            rdfs:label ?segnatura . \
-        OPTIONAL {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
-        ?InfObj rdf:type crm:E73_Information_Object} }. \
-        OPTIONAL {?ev_move crm:P4_has_time-span ?uri_ts . \
-        ?uri_ts rdfs:label ?time_span . } \
-        }",
+            queryLetters : " SELECT DISTINCT ?type ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            {?pc crm:P02_has_range ?uri . \
+            } UNION { \
+            ?group crm:P107_has_current_or_former_member ?uri; \
+                crm:P2_has_type 'Gruppo scrittura lettera' . \
+            ?pc crm:P02_has_range ?group . \
+            } \
+            ?ev_move crm:P01_has_domain ?pc ; \
+                rdfs:label ?type ; \
+                rdfs:subClassOf ?event . \
+            ?document_uri crm:P25i_moved_by ?event ; \
+                rdfs:label ?document_name . \
+            ?document_uri crm:P1_is_identified_by ?uriSegnatura . \
+            ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
+                rdfs:label ?segnatura . \
+            OPTIONAL {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?document_uri crm:P128_carries ?InfObj . \
+            ?InfObj rdf:type crm:E73_Information_Object} }. \
+            OPTIONAL {?ev_move crm:P4_has_time-span ?uri_ts . \
+            ?uri_ts rdfs:label ?time_span . } \
+            }",
 
-        queryDocuments : " SELECT DISTINCT ?role ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
-        WHERE { \
-        ?document ?property ?event ; \
-        crm:P1_is_identified_by ?uri_id ; \
-        rdfs:label ?label . \
-        ?uri_id rdfs:label ?id ; \
-        crm:P2_has_type 'Segnatura' . \
-        OPTIONAL { \
-        {?event crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . \
-        } UNION { \
-        ?sub_event rdfs:subClassOf ?event ; \
-        crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . } \
-        } \
-        ?event crm:P01_has_domain ?domain . \
-        ?domain crm:P02_has_range <{URI}> ; \
-        crm:P14.1_in_the_role_of ?uri_role . \
-        ?uri_role rdfs:label ?role . \
-        } \
-        GROUP BY ?document ?label ?id ?role ",
+            queryDocuments : " SELECT DISTINCT ?role ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
+            WHERE { \
+            ?document ?property ?event ; \
+            crm:P1_is_identified_by ?uri_id ; \
+            rdfs:label ?label . \
+            ?uri_id rdfs:label ?id ; \
+            crm:P2_has_type 'Segnatura' . \
+            OPTIONAL { \
+            {?event crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . \
+            } UNION { \
+            ?sub_event rdfs:subClassOf ?event ; \
+            crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . } \
+            } \
+            ?event crm:P01_has_domain ?domain . \
+            ?domain crm:P02_has_range <{URI}> ; \
+            crm:P14.1_in_the_role_of ?uri_role . \
+            ?uri_role rdfs:label ?role . \
+            } \
+            GROUP BY ?document ?label ?id ?role ",
 
-        queryOtherDoc : " SELECT DISTINCT ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
-        WHERE { \
-        VALUES ?uri {<{URI}> } \
-        {?domain crm:P02_has_range ?uri . \
-        ?event crm:P01_has_domain ?domain . \
-        ?document crm:P92i_was_brought_into_existence_by ?event ; \
-        crm:P1_is_identified_by ?uri_id ; \
-        rdfs:label ?label . \
-        ?uri_id crm:P2_has_type 'Segnatura'; \
-        rdfs:label ?id . \
-        } UNION { \
-        ?event crm:P67_refers_to ?uri . \
-        ?document crm:P92i_was_brought_into_existence_by ?event ; \
-        rdfs:label ?label ; \
-        crm:P1_is_identified_by ?uri_id . \
-        ?uri_id rdfs:label ?id ; \
-        crm:P2_has_type 'Segnatura' . \
-        } UNION { \
-        ?event crm:P67_refers_to ?uri . \
-        ?documentation crm:P67_refers_to ?uri ; \
-        crm:P141_assigned ?card . \
-        ?document crm:P46_is_composed_of ?card ; \
-        rdfs:label ?label ; \
-        crm:P1_is_identified_by ?uri_id . \
-        ?uri_id rdfs:label ?id ; \
-        crm:P2_has_type 'Segnatura' . \
-        } \
-        OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span} \
-        } ",
+            queryOtherDoc : " SELECT DISTINCT ?document ?label ?id (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
+            WHERE { \
+            VALUES ?uri {<{URI}> } \
+            {?domain crm:P02_has_range ?uri . \
+            ?event crm:P01_has_domain ?domain . \
+            ?document crm:P92i_was_brought_into_existence_by ?event ; \
+            crm:P1_is_identified_by ?uri_id ; \
+            rdfs:label ?label . \
+            ?uri_id crm:P2_has_type 'Segnatura'; \
+            rdfs:label ?id . \
+            } UNION { \
+            ?event crm:P67_refers_to ?uri . \
+            ?document crm:P92i_was_brought_into_existence_by ?event ; \
+            rdfs:label ?label ; \
+            crm:P1_is_identified_by ?uri_id . \
+            ?uri_id rdfs:label ?id ; \
+            crm:P2_has_type 'Segnatura' . \
+            } UNION { \
+            ?event crm:P67_refers_to ?uri . \
+            ?documentation crm:P67_refers_to ?uri ; \
+            crm:P141_assigned ?card . \
+            ?document crm:P46_is_composed_of ?card ; \
+            rdfs:label ?label ; \
+            crm:P1_is_identified_by ?uri_id . \
+            ?uri_id rdfs:label ?id ; \
+            crm:P2_has_type 'Segnatura' . \
+            } \
+            OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span} \
+            } ",
 
-        queryOpere : " SELECT DISTINCT ?subject ?label ?nct (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
-        WHERE {?subject rdf:type crm:E22_Man-Made_Object ; \
-        rdfs:label ?label ; \
-        crm:P1_is_identified_by ?uri_nct . \
-        ?uri_nct rdfs:label ?nct . \
-        ?production crm:P108_has_produced ?subject . \
-        OPTIONAL {?production crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span } \
-        ?pc crm:P01_has_domain ?production ; \
-        crm:P02_has_range <{URI}> } \
-        GROUP BY ?subject ?label ?nct ",
-
-        queryGettatelliEv : " SELECT DISTINCT ?event_type ?time_span \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?uri crm:P12i_was_present_at ?event . \
-        ?event crm:P2_has_type ?uri_event_type ; \
-        crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . \
-        ?uri_event_type rdfs:label ?event_type . \
-        } ",
+            queryOpere : " SELECT DISTINCT ?subject ?label ?nct (group_concat(distinct ?time_span ;separator='-') as ?time_span) \
+            WHERE {?subject rdf:type crm:E22_Man-Made_Object ; \
+            rdfs:label ?label ; \
+            crm:P1_is_identified_by ?uri_nct . \
+            ?uri_nct rdfs:label ?nct . \
+            ?production crm:P108_has_produced ?subject . \
+            OPTIONAL {?production crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span } \
+            ?pc crm:P01_has_domain ?production ; \
+            crm:P02_has_range <{URI}> } \
+            GROUP BY ?subject ?label ?nct ",
+
+            queryGettatelliEv : " SELECT DISTINCT ?event_type ?time_span \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?uri crm:P12i_was_present_at ?event . \
+            ?event crm:P2_has_type ?uri_event_type ; \
+            crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . \
+            ?uri_event_type rdfs:label ?event_type . \
+            } ",
 
-        queryEventi : " SELECT DISTINCT ?event_type ?role ?uri_time_span ?year ?month ?day ?time_span ?place ?uri_place ?document ?uri_document \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?domain crm:P02_has_range ?uri ; \
-        crm:P14.1_in_the_role_of ?uri_role . \
-        ?uri_role rdfs:label ?role . \
-        ?event crm:P01_has_domain ?domain ; \
-        crm:P2_has_type ?uri_event_type . \
-        ?uri_event_type rdfs:label ?event_type . \
-        OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . \
-        OPTIONAL {?uri_time_span time:year ?year .} \
-        OPTIONAL {?uri_time_span time:month ?month .} \
-        OPTIONAL {?uri_time_span time:day ?day .} \
-        } \
-        OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
-        ?uri_location rdfs:label ?place . \
-        OPTIONAL {?uri_place owl:sameAs ?uri_location . \
-        ?uri_place crm:P168_place_is_defined_by ?coords }} \
-        ?document_info crm:P70_documents ?event . \
-        ?uri_document crm:P128_carries ?document_info ; \
-        rdfs:label ?document . \
-        } \
-        ORDER BY ?year ?month ?day ",
+            queryEventi : " SELECT DISTINCT ?event_type ?role ?uri_time_span ?year ?month ?day ?time_span ?place ?uri_place ?document ?uri_document \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?domain crm:P02_has_range ?uri ; \
+            crm:P14.1_in_the_role_of ?uri_role . \
+            ?uri_role rdfs:label ?role . \
+            ?event crm:P01_has_domain ?domain ; \
+            crm:P2_has_type ?uri_event_type . \
+            ?uri_event_type rdfs:label ?event_type . \
+            OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . \
+            OPTIONAL {?uri_time_span time:year ?year .} \
+            OPTIONAL {?uri_time_span time:month ?month .} \
+            OPTIONAL {?uri_time_span time:day ?day .} \
+            } \
+            OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
+            ?uri_location rdfs:label ?place . \
+            OPTIONAL {?uri_place owl:sameAs ?uri_location . \
+            ?uri_place crm:P168_place_is_defined_by ?coords }} \
+            ?document_info crm:P70_documents ?event . \
+            ?uri_document crm:P128_carries ?document_info ; \
+            rdfs:label ?document . \
+            } \
+            ORDER BY ?year ?month ?day ",
 
-        queryCompagnia : " SELECT DISTINCT ?denomination ?occupation ?uri_sede ?uri_place ?sede \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?uri rdf:type crm:E74_Group . \
-        ?uri crm:P2_has_type ?denomination . \
-        OPTIONAL {?uri schema:hasOccupation ?uri_Occupation . \
-        ?uri_Occupation rdfs:label ?occupation .} \
-        OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_sede . \
-        ?uri_sede rdfs:label ?sede . \
-        OPTIONAL {?uri_sede owl:sameAs ?uri_place . \
-        ?uri_place crm:P168_place_is_defined_by ?coords .} \
-        } \
-        }",
+            queryCompagnia : " SELECT DISTINCT ?denomination ?occupation ?uri_sede ?uri_place ?sede \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?uri rdf:type crm:E74_Group . \
+            ?uri crm:P2_has_type ?denomination . \
+            OPTIONAL {?uri schema:hasOccupation ?uri_Occupation . \
+            ?uri_Occupation rdfs:label ?occupation .} \
+            OPTIONAL {?uri crm:P74_has_current_or_former_residence ?uri_sede . \
+            ?uri_sede rdfs:label ?sede . \
+            OPTIONAL {?uri_sede owl:sameAs ?uri_place . \
+            ?uri_place crm:P168_place_is_defined_by ?coords .} \
+            } \
+            }",
 
-        queryContrassegni : " SELECT DISTINCT ?contrassegno ?image \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?event crm:P141_assigned ?uri ; \
-        crm:P140_assigned_attribute_to ?uri_contrassegno . \
-        ?uri_contrassegno crm:P2_has_type 'Contrassegno'; \
-        rdfs:label ?contrassegno . \
-        ?uri_image crm:P138_represents ?uri_contrassegno ; \
-        crm:P1_is_identified_by ?uri_id . \
-        ?uri_id rdfs:label ?image . \
-        } "
+            queryContrassegni : " SELECT DISTINCT ?contrassegno ?image \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?event crm:P141_assigned ?uri ; \
+            crm:P140_assigned_attribute_to ?uri_contrassegno . \
+            ?uri_contrassegno crm:P2_has_type 'Contrassegno'; \
+            rdfs:label ?contrassegno . \
+            ?uri_image crm:P138_represents ?uri_contrassegno ; \
+            crm:P1_is_identified_by ?uri_id . \
+            ?uri_id rdfs:label ?image . \
+            } "
     },
 
     querySchedaOggetto : {
-        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 \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        GRAPH ?g { ?uri rdfs:label ?label } \
-        OPTIONAL {?uri crm:P1_is_identified_by ?uri_id . \
-        ?uri_id rdfs:label ?id ; \
-        crm:P2_has_type 'Segnatura' .} \
-        OPTIONAL { ?uri crm:P43_has_dimension ?uri_consistency . \
-        ?uri_consistency crm:P2_has_type 'Consistenza carte' ; \
-        rdfs:label ?consistency } \
-        OPTIONAL { ?uri crm:P43_has_dimension ?uri_dimension . \
-        ?uri_dimension crm:P2_has_type 'Dimensioni' ; \
-        rdfs:label ?dimension } \
-        OPTIONAL { ?uri crm:P139_has_alternative_form ?uri_registro . \
-        ?uri_registro rdfs:label ?sigla_registro; \
-        crm:P2_has_type 'Sigla registro' . } \
-        OPTIONAL { ?uri crm:P45_consist_of ?uri_material . \
-        ?uri_material rdfs:label ?material } \
-        OPTIONAL { ?uri crm:P52_has_current_owner ?uri_owner . \
-        ?uri_owner rdfs:label ?owner . } \
-        OPTIONAL { ?uri crm:P54_has_current_permanent_location ?location } \
-        OPTIONAL { ?uri crm:P3_has_note ?uri_note . \
-        ?uri_note rdfs:label ?note } \
-        OPTIONAL { ?uri crm:P92i_was_brought_into_existence_by ?creation . \
-        ?creation crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . } \
-        OPTIONAL {?uri_document crm:P46_is_composed_of ?uri ; \
-        rdfs:label ?document .} \
-        } ",
+            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 \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            GRAPH ?g { ?uri rdfs:label ?label } \
+            OPTIONAL {?uri crm:P1_is_identified_by ?uri_id . \
+            ?uri_id rdfs:label ?id ; \
+            crm:P2_has_type 'Segnatura' .} \
+            OPTIONAL { ?uri crm:P43_has_dimension ?uri_consistency . \
+            ?uri_consistency crm:P2_has_type 'Consistenza carte' ; \
+            rdfs:label ?consistency } \
+            OPTIONAL { ?uri crm:P43_has_dimension ?uri_dimension . \
+            ?uri_dimension crm:P2_has_type 'Dimensioni' ; \
+            rdfs:label ?dimension } \
+            OPTIONAL { ?uri crm:P139_has_alternative_form ?uri_registro . \
+            ?uri_registro rdfs:label ?sigla_registro; \
+            crm:P2_has_type 'Sigla registro' . } \
+            OPTIONAL { ?uri crm:P45_consist_of ?uri_material . \
+            ?uri_material rdfs:label ?material } \
+            OPTIONAL { ?uri crm:P52_has_current_owner ?uri_owner . \
+            ?uri_owner rdfs:label ?owner . } \
+            OPTIONAL { ?uri crm:P54_has_current_permanent_location ?location } \
+            OPTIONAL { ?uri crm:P3_has_note ?uri_note . \
+            ?uri_note rdfs:label ?note } \
+            OPTIONAL { ?uri crm:P92i_was_brought_into_existence_by ?creation . \
+            ?creation crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . } \
+            OPTIONAL {?uri_document crm:P46_is_composed_of ?uri ; \
+            rdfs:label ?document .} \
+            } ",
 
-        queryContent : " SELECT DISTINCT ?g AS ?graph ?uri ?titolo ?tipo (group_concat(distinct ?ref ; separator='<br />') as ?ref) \
-        WHERE { \
-        VALUES ?object {<{URI}>} \
-        ?object crm:P128_carries ?uri . \
-        ?uri rdf:type crm:E73_Information_Object . \
-        GRAPH ?g { ?uri rdfs:label ?label } \
-        OPTIONAL {?uri crm:P1_is_identified_by ?uri_titolo . \
-        ?uri_titolo rdfs:label ?titolo ; \
-        rdf:type crm:E35_Title . } \
-        OPTIONAL { ?uri crm:P2_has_type ?uri_tipo . \
-        ?uri_tipo rdfs:label ?tipo . } \
-        OPTIONAL { ?uri crm:P67_refers_to ?uri_ref . \
-        ?uri_ref rdfs:label ?ref . } \
-        FILTER NOT EXISTS {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> { ?uri rdfs:label ?label }}. \
-        }",
+            queryContent : " SELECT DISTINCT ?g AS ?graph ?uri ?titolo ?tipo (group_concat(distinct ?ref ; separator='<br />') as ?ref) \
+            WHERE { \
+            VALUES ?object {<{URI}>} \
+            ?object crm:P128_carries ?uri . \
+            ?uri rdf:type crm:E73_Information_Object . \
+            GRAPH ?g { ?uri rdfs:label ?label } \
+            OPTIONAL {?uri crm:P1_is_identified_by ?uri_titolo . \
+            ?uri_titolo rdfs:label ?titolo ; \
+            rdf:type crm:E35_Title . } \
+            OPTIONAL { ?uri crm:P2_has_type ?uri_tipo . \
+            ?uri_tipo rdfs:label ?tipo . } \
+            OPTIONAL { ?uri crm:P67_refers_to ?uri_ref . \
+            ?uri_ref rdfs:label ?ref . } \
+            FILTER NOT EXISTS {GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> { ?uri rdfs:label ?label }}. \
+            }",
 
-        queryOviLetter : " SELECT DISTINCT ?otherId ?InfObj \
-        WHERE {  \
-        VALUES ?uri {<{URI}>}   \
-        ?uri crm:P1_is_identified_by ?uri_id .  \
-        ?uri_id crm:P2_has_type 'Segnatura' ; \
-        crm:P139_has_alternative_form ?other_id . \
-        ?other_id crm:P2_has_type ?uri_type ; \
-        rdfs:label ?otherId . \
-        ?uri_type rdfs:label 'Segnatura OVI' . \
-        OPTIONAL { ?uri crm:P128_carries ?InfObj . \
-        GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?InfObj rdf:type crm:E73_Information_Object } } \
-        } ",
+            queryOviLetter : " SELECT DISTINCT ?otherId ?InfObj \
+            WHERE {  \
+            VALUES ?uri {<{URI}>}   \
+            ?uri crm:P1_is_identified_by ?uri_id .  \
+            ?uri_id crm:P2_has_type 'Segnatura' ; \
+            crm:P139_has_alternative_form ?other_id . \
+            ?other_id crm:P2_has_type ?uri_type ; \
+            rdfs:label ?otherId . \
+            ?uri_type rdfs:label 'Segnatura OVI' . \
+            OPTIONAL { ?uri crm:P128_carries ?InfObj . \
+            GRAPH <http://dev.restore.ovi.cnr.it:8890/ovi/datini> {?InfObj rdf:type crm:E73_Information_Object } } \
+            } ",
 
-        queryPersone : " SELECT DISTINCT ?uri_person ?name (group_concat(distinct ?p_type ; separator=', ') as ?types) ?person_note ?note \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        { \
-        ?document crm:P141_assigned ?uri ; \
-        crm:P67_refers_to ?uri_person . \
-        ?uri_person foaf:name ?name ; \
-        crm:P2_has_type ?person_type . \
-        ?person_type rdfs:label ?p_type . \
-        OPTIONAL {?uri_person crm:P3_has_note ?uri_person_note . \
-        ?uri_person_note rdfs:label ?person_note; \
-        crm:P2_has_type 'Nota collegamento con gettatello' . } \
-        } UNION { \
-        ?uri crm:P92i_was_brought_into_existence_by ?creation . \
-        ?creation crm:P67_refers_to ?uri_person . \
-        ?uri_person foaf:name ?name ; \
-        crm:P67.1_type ?person_type . \
-        OPTIONAL {?uri_person crm:P3_has_note ?note } \
-        ?person_type rdfs:label ?p_type . \
-        } UNION { \
-        OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
-        {?uri_paper crm:P128_carries ?uri_doc } \
-        UNION \
-        {?uri crm:P128_carries ?uri_doc } \
-        ?uri_doc crm:P70_documents ?event ; \
-        rdfs:label ?document . \
-        ?uri_obj crm:P128_carries ?uri_doc . \
-        ?uri_doc rdfs:label ?object . \
-        ?event crm:P01_has_domain ?domain . \
-        ?domain crm:P02_has_range ?uri_person ; \
-        crm:P14.1_in_the_role_of ?uri_role . \
-        ?uri_role rdfs:label ?p_type . \
-        ?uri_person rdfs:label ?name . \
-        } \
-        }",
+            queryPersone : " SELECT DISTINCT ?uri_person ?name (group_concat(distinct ?p_type ; separator=', ') as ?types) ?person_note ?note \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            { \
+            ?document crm:P141_assigned ?uri ; \
+            crm:P67_refers_to ?uri_person . \
+            ?uri_person foaf:name ?name ; \
+            crm:P2_has_type ?person_type . \
+            ?person_type rdfs:label ?p_type . \
+            OPTIONAL {?uri_person crm:P3_has_note ?uri_person_note . \
+            ?uri_person_note rdfs:label ?person_note; \
+            crm:P2_has_type 'Nota collegamento con gettatello' . } \
+            } UNION { \
+            ?uri crm:P92i_was_brought_into_existence_by ?creation . \
+            ?creation crm:P67_refers_to ?uri_person . \
+            ?uri_person foaf:name ?name ; \
+            crm:P67.1_type ?person_type . \
+            OPTIONAL {?uri_person crm:P3_has_note ?note } \
+            ?person_type rdfs:label ?p_type . \
+            } UNION { \
+            OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
+            {?uri_paper crm:P128_carries ?uri_doc } \
+            UNION \
+            {?uri crm:P128_carries ?uri_doc } \
+            ?uri_doc crm:P70_documents ?event ; \
+            rdfs:label ?document . \
+            ?uri_obj crm:P128_carries ?uri_doc . \
+            ?uri_doc rdfs:label ?object . \
+            ?event crm:P01_has_domain ?domain . \
+            ?domain crm:P02_has_range ?uri_person ; \
+            crm:P14.1_in_the_role_of ?uri_role . \
+            ?uri_role rdfs:label ?p_type . \
+            ?uri_person rdfs:label ?name . \
+            } \
+            }",
 
-        queryAssocDocs : " SELECT DISTINCT ?card ?doc_type ?name_card \
-        WHERE { \
-        VALUES ?uri {<{URI}>} \
-        ?uri crm:P46_is_composed_of ?card . \
-        ?card rdfs:label ?name_card . \
-        OPTIONAL {?card crm:P2_has_type ?doc_type } \
-        OPTIONAL {?document crm:P141_assigned ?card ; \
-        crm:P67_refers_to ?uri_person . \
-        ?uri_person foaf:name ?name ; \
-        crm:P2_has_type ?person_type . \
-        ?person_type rdfs:label ?type . \
-        } \
-        }",
+            queryAssocDocs : " SELECT DISTINCT ?card ?doc_type ?name_card \
+            WHERE { \
+            VALUES ?uri {<{URI}>} \
+            ?uri crm:P46_is_composed_of ?card . \
+            ?card rdfs:label ?name_card . \
+            OPTIONAL {?card crm:P2_has_type ?doc_type } \
+            OPTIONAL {?document crm:P141_assigned ?card ; \
+            crm:P67_refers_to ?uri_person . \
+            ?uri_person foaf:name ?name ; \
+            crm:P2_has_type ?person_type . \
+            ?person_type rdfs:label ?type . \
+            } \
+            }",
 
-        queryContrassegni : " SELECT DISTINCT ?uri_contrassegno ?contrassegno \
-        WHERE {VALUES ?uri {<{URI}>} \
-        ?uri crm:P46_is_composed_of ?uri_paper . \
-        ?uri_documentation crm:P141_assigned ?uri_paper ; \
-        crm:P140_assigned_attribute_to ?uri_contrassegno . \
-        ?uri_contrassegno rdfs:label ?contrassegno . \
-        }",
+            queryContrassegni : " SELECT DISTINCT ?uri_contrassegno ?contrassegno \
+            WHERE {VALUES ?uri {<{URI}>} \
+            ?uri crm:P46_is_composed_of ?uri_paper . \
+            ?uri_documentation crm:P141_assigned ?uri_paper ; \
+            crm:P140_assigned_attribute_to ?uri_contrassegno . \
+            ?uri_contrassegno rdfs:label ?contrassegno . \
+            }",
 
-        queryEventiGettatelli : " SELECT DISTINCT ?uri_obj ?object ?name_event ?event_type ?uri_person ?label ?role ?time_span ?uri_place ?place \
-        WHERE {VALUES ?uri {<{URI}>} \
-        OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
-        {?uri_paper crm:P128_carries ?uri_doc } \
-        UNION \
-        {?uri crm:P128_carries ?uri_doc } \
-        ?uri_doc crm:P70_documents ?event ; \
-        rdfs:label ?document . \
-        ?uri_obj crm:P128_carries ?uri_doc . \
-        ?uri_doc rdfs:label ?object . \
-        ?event rdfs:label ?name_event . \
-        ?event crm:P2_has_type ?uri_event_type . \
-        ?uri_event_type rdfs:label ?event_type . \
-        ?event crm:P01_has_domain ?domain . \
-        ?domain crm:P02_has_range ?uri_person ; \
-        crm:P14.1_in_the_role_of ?uri_role . \
-        ?uri_role rdfs:label ?role . \
-        ?uri_person rdfs:label ?label . \
-        OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
-        ?uri_time_span rdfs:label ?time_span . } \
-        OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
-        ?uri_place owl:sameAs ?uri_location ; \
-        crm:P168_place_is_defined_by ?coords; \
-        rdfs:label ?place . } \
-        }",
+            queryEventiGettatelli : " SELECT DISTINCT ?uri_obj ?object ?name_event ?event_type ?uri_person ?label ?role ?time_span ?uri_place ?place \
+            WHERE {VALUES ?uri {<{URI}>} \
+            OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
+            {?uri_paper crm:P128_carries ?uri_doc } \
+            UNION \
+            {?uri crm:P128_carries ?uri_doc } \
+            ?uri_doc crm:P70_documents ?event ; \
+            rdfs:label ?document . \
+            ?uri_obj crm:P128_carries ?uri_doc . \
+            ?uri_doc rdfs:label ?object . \
+            ?event rdfs:label ?name_event . \
+            ?event crm:P2_has_type ?uri_event_type . \
+            ?uri_event_type rdfs:label ?event_type . \
+            ?event crm:P01_has_domain ?domain . \
+            ?domain crm:P02_has_range ?uri_person ; \
+            crm:P14.1_in_the_role_of ?uri_role . \
+            ?uri_role rdfs:label ?role . \
+            ?uri_person rdfs:label ?label . \
+            OPTIONAL {?event crm:P4_has_time-span ?uri_time_span . \
+            ?uri_time_span rdfs:label ?time_span . } \
+            OPTIONAL {?event crm:P7_took_place_at ?uri_location . \
+            ?uri_place owl:sameAs ?uri_location ; \
+            crm:P168_place_is_defined_by ?coords; \
+            rdfs:label ?place . } \
+            }",
 
-        queryLuoghiGT : " SELECT DISTINCT ?uri_place ?place \
-        WHERE {VALUES ?uri {<{URI}>} \
-        OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
-        {?uri_paper crm:P128_carries ?uri_doc } \
-        UNION \
-        {?uri crm:P128_carries ?uri_doc } \
-        ?uri_doc crm:P70_documents ?event . \
-        ?event crm:P7_took_place_at ?uri_location . \
-        ?uri_place owl:sameAs ?uri_location ; \
-        crm:P168_place_is_defined_by ?coords; \
-        rdfs:label ?place .  \
-        }"
+            queryLuoghiGT : " SELECT DISTINCT ?uri_place ?place \
+            WHERE {VALUES ?uri {<{URI}>} \
+            OPTIONAL {?uri crm:P46_is_composed_of ?uri_paper . } \
+            {?uri_paper crm:P128_carries ?uri_doc } \
+            UNION \
+            {?uri crm:P128_carries ?uri_doc } \
+            ?uri_doc crm:P70_documents ?event . \
+            ?event crm:P7_took_place_at ?uri_location . \
+            ?uri_place owl:sameAs ?uri_location ; \
+            crm:P168_place_is_defined_by ?coords; \
+            rdfs:label ?place .  \
+            }"
     },
 
     querySchedaLuogo : {