123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- 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) \
- }"
- }
- };
|