From 75b2e67f055fb40aaa6ec664d4bee215c73b32c2 Mon Sep 17 00:00:00 2001 From: cesare Date: Mon, 7 Nov 2022 15:10:43 +0100 Subject: [PATCH] query sul nuovo grafo --- css/browsingldc.css | 1 + js/utils.js | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/css/browsingldc.css b/css/browsingldc.css index 1b6b56e..02c9b84 100644 --- a/css/browsingldc.css +++ b/css/browsingldc.css @@ -8,6 +8,7 @@ body { font-family: Georgia, "Times New Roman", Times, serif; color: #555; + overscroll-behavior: none; } h1, .h1, diff --git a/js/utils.js b/js/utils.js index bf5237e..2277b38 100644 --- a/js/utils.js +++ b/js/utils.js @@ -6,14 +6,14 @@ PREFIX ontolex: PREFIX olires: PREFIX comm: SELECT (?form AS ?IRIForma) (?Rappresentazione AS ?Forma) (?lm AS ?Lemma) (?textver AS ?Verso) (?NumVerso AS ?NumeroVerso) (?t_canto AS ?Canto) (?t_cantica AS ?Cantica) WHERE { - ?fa orl:occurrenceOf ?form; - ecrm:P148i_is_component_of ?ver. + ?fa orl:occurrenceOf ?form . + ?ver olires:hasStructuralComponent ?fa . ?ver ecrm:P190_Has_Symbolic_Content ?textver; - olires:hasNumber ?NumVerso; - ecrm:P148i_is_component_of ?canto. + olires:hasNumber ?NumVerso. ?canto ecrm:P102_has_title ?t_canto; - ecrm:P148i_is_component_of ?cantica. - ?cantica ecrm:P102_has_title ?t_cantica. + hasStructuralComponent ?ver. + ?cantica ecrm:P102_has_title ?t_cantica ; + hasStructuralComponent ?canto . ?form ontolex:writtenRep ?Rappresentazione. ?lent ontolex:lexicalForm ?form; ontolex:canonicalForm ?cf. @@ -44,14 +44,14 @@ PREFIx comm: SELECT (?form AS ?IRIForma) (?Rappresentazione AS ?Forma) (?lm AS ?Lemma) (?textver AS ?Verso) (?NumVerso AS ?NumeroVerso) (?t_canto AS ?Canto) (?t_cantica AS ?Cantica) (?textver1 AS ?VersoPrec) (?textver2 AS ?VersoSucc) WHERE { - ?fa orl:occurrenceOf ?form; - ecrm:P148i_is_component_of ?ver. + ?fa orl:occurrenceOf ?form. ?ver ecrm:P190_Has_Symbolic_Content ?textver; olires:hasNumber ?NumVerso; - ecrm:P148i_is_component_of ?canto. + olires:hasStructuralComponent ?fa. ?canto ecrm:P102_has_title ?t_canto; - ecrm:P148i_is_component_of ?cantica. - ?cantica ecrm:P102_has_title ?t_cantica. + olires:hasStructuralComponent ?ver. + ?cantica ecrm:P102_has_title ?t_cantica; + olires:hasStructuralComponent ?canto. ?form ontolex:writtenRep ?Rappresentazione. ?lent ontolex:lexicalForm ?form; ontolex:canonicalForm ?cf. @@ -63,16 +63,16 @@ WHERE { BIND(xsd:short(?NumVerso+1) as ?NumVerso2) Optional{ ?ver1 ecrm:P190_Has_Symbolic_Content ?textver1; - olires:hasNumber ?NumVerso1; - ecrm:P148i_is_component_of ?canto. + olires:hasNumber ?NumVerso1. + ?canto olires:hasStructuralComponent ?ver1 . } OPTIONAL { ?ver2 ecrm:P190_Has_Symbolic_Content ?textver2; - olires:hasNumber ?NumVerso2; - ecrm:P148i_is_component_of ?canto. + olires:hasNumber ?NumVerso2. + ?canto olires:hasStructuralComponent ?ver2 . } } ORDER BY (?canto) (?cantica) -LIMIT 10 +LIMIT 20 ` // Per restituire i versi di una cantica @@ -89,13 +89,13 @@ var qVersiCantica=` WHERE { ?ver ecrm:P190_Has_Symbolic_Content ?textver; olires:hasNumber ?NumVerso; - olires:OccursInRegion ?reg; - ecrm:P148i_is_component_of ?canto. + olires:OccursInRegion ?reg . ?reg olires:fragmentRegionFrom ?from; olires:fragmentRegionTo ?to . ?canto ecrm:P102_has_title ?t_canto; - ecrm:P148i_is_component_of ?cantica. - ?cantica ecrm:P102_has_title ?t_cantica. + olires:hasStructuralComponent ?ver. + ?cantica ecrm:P102_has_title ?t_cantica ; + olires:hasStructuralComponent ?canto. FILTER regex(?t_cantica,"Inferno","i") . }`