query sul nuovo grafo
This commit is contained in:
parent
fff18f5d33
commit
75b2e67f05
|
@ -8,6 +8,7 @@
|
|||
body {
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
color: #555;
|
||||
overscroll-behavior: none;
|
||||
}
|
||||
|
||||
h1, .h1,
|
||||
|
|
40
js/utils.js
40
js/utils.js
|
@ -6,14 +6,14 @@ PREFIX ontolex: <http://www.w3.org/ns/lemon/ontolex#>
|
|||
PREFIX olires: <https://dantenetwork.it/ontology/OLIRes/>
|
||||
PREFIX comm: <http://dantenetwork.it/data/commedia/>
|
||||
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: <https://dantenetwork.it/data/commedia/>
|
|||
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") .
|
||||
}`
|
||||
|
||||
|
|
Loading…
Reference in New Issue