|
@@ -0,0 +1,266 @@
|
|
|
+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 ?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 ?type .} \
|
|
|
+ UNION { \
|
|
|
+ ?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}> . \
|
|
|
+ }"
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+$.jsonManager
|
|
|
+ {
|
|
|
+ connection : [
|
|
|
+ queries = {
|
|
|
+ prefixes : {
|
|
|
+ pref : "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#> "
|
|
|
+ },
|
|
|
+
|
|
|
+ sparqlMMO : {
|
|
|
+ queryLabel : " SELECT DISTINCT ?g ?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' . \
|
|
|
+ ?label bif:contains <{WORD}> . \
|
|
|
+ }",
|
|
|
+
|
|
|
+ queryIdentificatore: " SELECT DISTINCT ?g ?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}>)) \
|
|
|
+ }"
|
|
|
+ },
|
|
|
+ sparqlINF : {
|
|
|
+ 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 . \
|
|
|
+ ?object_Label bif:contains <{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 . \
|
|
|
+ ?object_Label bif:contains <{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 ?type .} \
|
|
|
+ UNION { \
|
|
|
+ ?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 . \
|
|
|
+ ?object_Label bif:contains <{WORD}> . \
|
|
|
+ }"
|
|
|
+
|
|
|
+ },
|
|
|
+ sparqlPER : {
|
|
|
+ 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}> . \
|
|
|
+ }"
|
|
|
+ },
|
|
|
+ sparqlLG : {
|
|
|
+ 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}> . \
|
|
|
+ }"
|
|
|
+ },
|
|
|
+ endpoint : 'http://dev.restore.ovi.cnr.it:8890/sparql/',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+*/
|
|
|
+
|
|
|
+
|