123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888 |
- var queryManager = {
- prefixes : {
- all : "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \
- PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \
- PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> \
- PREFIX owl: <http://www.w3.org/2002/07/owl#> \
- PREFIX schema: <http://schema.org/> \
- PREFIX foaf: <http://xmlns.com/foaf/0.1/> \
- PREFIX person: <http://www.w3.org/ns/person#> \
- PREFIX time: <https://www.w3.org/TR/owl-time#> "
- },
- queryMMO: {
- queryLabel : " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier \
- WHERE {<{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
- ?subject rdfs:label ?label . \
- ?subject crm:P1_is_identified_by ?uri_identifier . \
- ?uri_identifier rdfs:label ?identifier ; \
- crm:P2_has_type 'Segnatura' . \
- <{WORD}> \
- }",
- queryArte : " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier ?type \
- WHERE { <{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
- ?subject rdfs:label ?label ; \
- crm:P2_has_type ?type ; \
- crm:P1_is_identified_by ?uri_identifier . \
- ?uri_identifier rdfs:label ?identifier . \
- <{WORD}> \
- FILTER (?type = \"Opera d'Arte\") \
- }",
- queryIdentificatore: " SELECT DISTINCT ?g AS ?graph ?subject ?label ?identifier \
- WHERE {<{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E22_Man-Made_Object } \
- ?subject rdfs:label ?label . \
- ?subject crm:P1_is_identified_by ?uri_identifier . \
- ?uri_identifier rdfs:label ?identifier ; \
- crm:P2_has_type 'Segnatura' . \
- FILTER (CONTAINS(?identifier, '<{WORD}>')) \
- }"
- },
- queryINF: {
- queryContenuti1: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
- WHERE { <{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
- rdfs:label ?label .} \
- OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
- OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
- ?id_subject rdfs:label ?id ; \
- rdf:type crm:E42_Identifier . } \
- OPTIONAL {?subject crm:P2_has_type ?type . } \
- ?subject ?property ?object_Label . \
- <{WORD}> \
- }",
- queryContenuti2: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
- WHERE { <{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
- rdfs:label ?label .} \
- OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
- OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
- ?id_subject rdfs:label ?id ; \
- rdf:type crm:E42_Identifier . } \
- OPTIONAL {?subject crm:P2_has_type ?type . } \
- VALUES ?object_type {crm:E1_Entity crm:E1_CRM_Entity crm:E41_Appellation crm:E62_String} \
- ?subject ?property ?object . \
- ?object rdfs:label ?object_Label . \
- ?object rdf:type ?object_type . \
- <{WORD}> \
- FILTER NOT EXISTS { ?property rdfs:label 'label' } \
- }",
- queryContenuti3: " SELECT DISTINCT ?g AS ?graph ?Physical_Object ?subject ?label ?id (group_concat(distinct ?type ;separator=', ') as ?types) (SAMPLE(?object_Label) AS ?text) \
- WHERE {<{GRAPH}> \
- GRAPH ?g {?subject rdf:type crm:E73_Information_Object ; \
- rdfs:label ?label .} \
- OPTIONAL {?Physical_Object crm:P128_carries ?subject .} \
- OPTIONAL {?subject crm:P1_is_identified_by ?id_subject . \
- ?id_subject rdfs:label ?id ; \
- rdf:type crm:E42_Identifier . } \
- OPTIONAL {?subject crm:P2_has_type ?uri_type . \
- ?uri_type rdfs:label ?type . } \
- ?subject crm:P67_refers_to ?object_uri . \
- ?object_uri rdfs:label ?object_Label . \
- <{WORD}> \
- }"
- },
- queryPER: {
- queryNome: " SELECT DISTINCT ?g AS ?graph ?subject ?name \
- WHERE { <{GRAPH}> \
- GRAPH ?g { ?subject ?property ?object . } \
- ?subject rdf:type crm:E21_Person ; \
- foaf:name ?name . \
- ?name bif:contains <{WORD}> . \
- } ",
- queryNote: " SELECT DISTINCT ?g AS ?graph ?subject ?name ?note \
- WHERE {<{GRAPH}> \
- GRAPH ?g { ?subject ?property ?object . } \
- ?subject rdf:type crm:E21_Person ; \
- foaf:name ?name . \
- ?subject crm:P3_has_note ?note . \
- ?note bif:contains <{WORD}> . \
- }",
- queryOccupazione: " SELECT DISTINCT ?g AS ?graph ?subject ?name ?occupation \
- WHERE {<{GRAPH}> \
- GRAPH ?g { ?subject ?property ?object . } \
- ?subject rdf:type crm:E21_Person ; \
- foaf:name ?name . \
- ?subject schema:hasOccupation ?uri_occupation . \
- ?uri_occupation rdfs:label ?occupation . \
- ?occupation bif:contains <{WORD}> . \
- }"
- },
- queryLG: {
- queryLuoghi : " SELECT DISTINCT ?g AS ?graph ?subject ?label \
- WHERE {<{GRAPH}> \
- GRAPH ?g { ?subject ?property ?object } \
- ?subject rdfs:label ?label ; \
- rdf:type crm:E53_Place ; \
- crm:P168_place_is_defined_by ?coords . \
- ?label bif:contains <{WORD}> . \
- }"
- },
- queryRES: {
- queryExchange : " SELECT DISTINCT ?uri_document ?document ?time_span_from ?time_span_to ?uri_place_from ?place_from ?uri_place_to ?place_to \
- { \
- ?event_from rdfs:subClassOf ?event ; \
- rdf:type crm:EL2_Send_Letter . \
- ?event_to rdfs:subClassOf ?event ; \
- rdf:type crm:EL3_Receive_Letter . \
- \
- ?event_from crm:P01_has_domain ?pc_from . \
- ?pc_from crm:P02_has_range <{MITTENTE}> . \
- OPTIONAL {?event_from crm:P4_has_time-span ?uri_time_span_from . \
- ?uri_time_span_from rdfs:label ?time_span_from} \
- OPTIONAL {?event_from crm:P27_moved_from ?aspo_place_from . \
- ?aspo_place_from owl:sameAs ?uri_place_from . \
- ?uri_place_from rdfs:label ?place_from ; \
- crm:P168_place_is_defined_by ?coords_from} \
- \
- ?event_to crm:P01_has_domain ?pc_to . \
- ?pc_to crm:P02_has_range <{DESTINATARIO}> . \
- OPTIONAL {?event_to crm:P4_has_time-span ?uri_time_span_to . \
- ?uri_time_span_to rdfs:label ?time_span_to} \
- OPTIONAL {?event_to crm:P26_moved_to ?aspo_place_to . \
- ?aspo_place_to owl:sameAs ?uri_place_to . \
- ?uri_place_to rdfs:label ?place_to ; \
- crm:P168_place_is_defined_by ?coords_to} \
- \
- ?uri_document crm:P25i_moved_by ?event ; \
- rdfs:label ?document . \
- }",
- queryEsploraDocumenti : " SELECT DISTINCT ?document ?uri_document ?sigla ?time_span ?year ?month ?day ?text ?uri_infObj (group_concat(distinct ?type ;separator=', ') as ?types) \
- WHERE { \
- { ?uri_thing crm:P128_carries <{URI}> . \
- ?uri_infObj crm:P67_refers_to ?uri_thing . \
- } UNION { \
- ?uri_infObj crm:P67_refers_to <{URI}> . } \
- ?uri_document crm:P128_carries ?uri_infObj ; \
- rdfs:label ?document . \
- OPTIONAL {?uri_infObj crm:P2_has_type ?uri_type . \
- ?uri_type rdfs:label ?type . } \
- OPTIONAL {?uri_infObj crm:P190_has_symbolic_content ?text .} \
- GRAPH <http://dev.restore.ovi.cnr.it:8890/aspo/datini> {?uri_document crm:P25i_moved_by ?mov_ev .} \
- ?send rdfs:subClassOf ?mov_ev ; \
- rdf:type crm:EL2_Send_Letter . \
- OPTIONAL {?uri_infObj crm:P1_is_identified_by ?uri_sigla . \
- ?uri_sigla crm:P2_has_type ?sigla_type ; \
- rdfs:label ?sigla . \
- ?sigla_type rdfs:label 'Sigla OVI' .} \
- OPTIONAL {?send 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 } \
- } \
- } \
- ORDER BY ?year ?month ?day",
- queryTrovaSigla : " SELECT DISTINCT ?id \
- WHERE {?subject rdf:type crm:E73_Information_Object; \
- rdfs:label '<{SIGLA}>' . \
- ?uri_lemma crm:P67_refers_to ?subject; \
- rdfs:label '<{LEMMA}>' ; \
- crm:P1_is_identified_by ?uri_id . \
- ?uri_id rdfs:label ?id} \
- LIMIT 1",
- queryEsploraMappa : " SELECT DISTINCT ?place ?label ?coordinates \
- WHERE { \
- VALUES ?uri {<{LEMMA}>} \
- ?uri_thing crm:P128_carries ?uri . \
- ?uri_infObj crm:P67_refers_to ?uri_thing . \
- ?uri_document crm:P128_carries ?uri_infObj ; \
- rdfs:label ?document ; \
- crm:P25i_moved_by ?mov_ev . \
- ?ev_send rdfs:subClassOf ?mov_ev ; \
- rdf:type crm:EL2_Send_Letter ; \
- 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 . \
- }"
- },
- 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; \
- 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) \
- }",
- 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 . \
- } 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 { \
- ?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 ",
- 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 . } \
- } ",
- 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 . } \
- }",
- 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} \
- } ",
- 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 ",
- 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 . \
- } "
- },
- 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 .} \
- } ",
- 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 } } \
- } ",
- 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 . \
- } \
- }",
- 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 . } \
- }",
- 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 : {
- query : " SELECT DISTINCT ?graph ?uri ?name_place ?coordinates {\
- GRAPH ?graph { VALUES ?uri { <{URI}> } \
- ?uri crm:P168_place_is_defined_by ?coordinates;\
- rdfs:label ?name_place .\
- }\
- }",
- queryRiferimenti : " SELECT DISTINCT ?references {\
- <{URI}> owl:sameAs ?references\
- }",
- queryToponimi : " SELECT DISTINCT ?toponimi {\
- <{URI}> crm:P1_is_identified_by ?uri_toponym .\
- ?uri_toponym rdfs:label ?toponimi\
- }",
- queryRicezione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
- WHERE { \
- <{URI}> owl:sameAs ?place . \
- ?event_to crm:P26_moved_to ?place ; \
- rdf:type crm:EL3_Receive_Letter ; \
- 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 {?event_to crm:P4_has_time-span ?uri_ts . \
- ?uri_ts rdfs:label ?time_span . } \
- } ",
- queryInvio : " SELECT DISTINCT ?segnatura ?document_uri ?document_name ?time_span ?InfObj \
- WHERE { \
- <{URI}> owl:sameAs ?place . \
- ?event_to crm:P27_moved_from ?place ; \
- rdf:type crm:EL2_Send_Letter ; \
- 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 {?event_to crm:P4_has_time-span ?uri_ts . \
- ?uri_ts rdfs:label ?time_span . } \
- }",
- queryCitazione : " SELECT DISTINCT ?segnatura ?document_uri ?document_name SAMPLE(?time_span) AS ?time_span ?InfObj \
- WHERE { \
- VALUES ?uri {<{URI}>} \
- {?uri crm:P1_is_identified_by ?toponym . \
- ?InfObj crm:P67_refers_to ?toponym . \
- ?document_uri crm:P128_carries ?InfObj ; \
- rdfs:label ?document_name . \
- OPTIONAL {?document_uri crm:P1_is_identified_by ?uriSegnatura . \
- ?uriSegnatura crm:P2_has_type 'Segnatura' ; \
- rdfs:label ?segnatura . } \
- OPTIONAL {?document_uri crm:P25i_moved_by ?event . \
- ?event_send rdfs:subClassOf ?event ; \
- rdf:type crm:EL2_Send_Letter ; \
- crm:P4_has_time-span ?uri_ts . \
- ?uri_ts rdfs:label ?time_span . } \
- } UNION { \
- ?uri owl:sameAs ?place . \
- ?event_gt crm:P7_took_place_at ?place . \
- ?document_inf crm:P70_documents ?event_gt . \
- ?document_uri crm:P128_carries ?document_inf ; \
- crm:P1_is_identified_by ?uriSegnatura ; \
- rdfs:label ?document_name . \
- ?uriSegnatura rdfs:label ?segnatura . \
- } \
- } ",
- queryPersone : " SELECT DISTINCT ?role ?range SAMPLE(?name) AS ?label COUNT(?range) AS ?count \
- WHERE{ \
- {?place owl:sameAs <{URI}> . \
- ?event_to crm:P26_moved_to ?place ; \
- rdf:type crm:EL3_Receive_Letter ; \
- crm:P01_has_domain ?domain . \
- ?domain crm:P02_has_range ?range ; \
- crm:P14.1_in_the_role_of ?uri_role . \
- ?uri_role rdfs:label ?role . \
- ?range rdfs:label ?lb ; \
- foaf:name ?name . \
- } UNION { \
- ?place owl:sameAs <{URI}> . \
- ?event_to crm:P27_moved_from ?place ; \
- rdf:type crm:EL2_Send_Letter ; \
- crm:P01_has_domain ?domain . \
- ?domain crm:P02_has_range ?range ; \
- crm:P14.1_in_the_role_of ?uri_role . \
- ?uri_role rdfs:label ?role . \
- ?range rdfs:label ?lb ; \
- foaf:name ?name . \
- } UNION { \
- <{URI}> owl:sameAs ?place . \
- ?event_gt crm:P7_took_place_at ?place ; \
- crm:P01_has_domain ?domain . \
- ?domain crm:P02_has_range ?range ; \
- crm:P14.1_in_the_role_of ?uri_role . \
- ?uri_role rdfs:label ?role . \
- ?range rdfs:label ?name . \
- } \
- } GROUP BY ?role ?range \
- ORDER BY ?label",
- queryCount : " SELECT ?place ?label COUNT(?label) AS ?Count \
- WHERE{ \
- ?place_to owl:sameAs <{URI}> . \
- ?event_to crm:P26_moved_to ?place_to ; \
- rdf:type crm:EL3_Receive_Letter ; \
- rdfs:subClassOf ?event . \
- ?event_from rdfs:subClassOf ?event ; \
- rdf:type crm:EL2_Send_Letter ; \
- crm:P27_moved_from ?place . \
- ?place rdfs:label ?label \
- } \
- ORDER BY DESC (?Count)",
- queryCount2 : " SELECT ?place ?label COUNT(?label) AS ?Count \
- WHERE{ \
- ?place_from owl:sameAs <{URI}> . \
- ?event_from crm:P27_moved_from ?place_from ; \
- rdf:type crm:EL2_Send_Letter ; \
- rdfs:subClassOf ?event . \
- ?event_to rdfs:subClassOf ?event ; \
- rdf:type crm:EL2_Send_Letter ; \
- crm:P27_moved_from ?place . \
- ?place rdfs:label ?label . \
- } \
- ORDER BY DESC (?Count) "
- },
- querySchedaOpera : {
- queryInfo : " SELECT DISTINCT ?graph ?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) ?condition ?note \
- WHERE { \
- VALUES ?uri {<{URI}>} \
- GRAPH ?graph {?uri rdfs:label ?label} \
- OPTIONAL {?uri crm:P3_has_note ?note } \
- ?uri crm:P128_carries ?Inf_Obj . \
- OPTIONAL {?Inf_Obj crm:P1_is_identified_by ?uriTitle . \
- ?uriTitle rdf:type crm:E35_Title; \
- rdfs:label ?title } \
- OPTIONAL {?Inf_Obj crm:P2_has_type ?uriType . \
- ?uriType rdfs:label ?type } \
- OPTIONAL {?uri crm:P43_has_dimension ?uriDimension . \
- ?uriDimension crm:P90_has_value ?value; \
- crm:P91_has_unit ?uri_unit . \
- ?uri_unit rdfs:label ?unit } \
- OPTIONAL {?uri crm:P1_is_identified_by ?uriIdentifier . \
- ?uriIdentifier rdfs:label ?identifier } \
- OPTIONAL {?uri crm:P45_consists_of ?uriMaterial . \
- ?uriMaterial rdfs:label ?material } \
- OPTIONAL {?uri crm:P44_has_condition ?uriCondition . \
- ?uriCondition crm:P2_has_type ?condition} \
- OPTIONAL {?uri crm:P54_has_current_permanent_location ?current_location } \
- OPTIONAL {?uri crm:P62_depicts ?uriSubject . \
- ?uriSubject rdfs:label ?subject; \
- crm:P2_has_type 'Identificazione Iconografica' .} \
- OPTIONAL {?uri crm:P52_has_current_owner ?uriOwner . \
- ?uriOwner rdfs:label ?current_owner } \
- }",
- 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) \
- WHERE { \
- VALUES ?uri {<{URI}>} \
- ?uri crm:P128_carries ?Information_Object . \
- ?Information_Object crm:P108i_was_produced_by ?Production . \
- OPTIONAL {?Production crm:P4_has_time-span ?uriTS ; \
- crm:P32_used_general_technique ?uriTecne . \
- ?uriTS rdfs:label ?time_span . \
- ?uriTecne rdfs:label ?technique} \
- OPTIONAL {?pc crm:P01_has_domain ?Production ; \
- crm:P02_has_range ?uriPerson ; \
- crm:P14.1_in_the_role_of ?uriRole . \
- ?uriPerson rdfs:label ?person . \
- ?uriRole rdfs:label ?role} \
- }"
- }
- };
|