modifica query
This commit is contained in:
parent
e1de64fee1
commit
2cabc54522
|
@ -76,17 +76,13 @@
|
||||||
id="queryText" aria-describedby="sizing-addon2">
|
id="queryText" aria-describedby="sizing-addon2">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div> </</div>
|
||||||
<button type="submit" class="btn btn-default f6" id='searchcomm'>Search</button>
|
<button type="submit" class="btn btn-default f6" id='searchcomm'>Search</button>
|
||||||
|
<button type="submit" class="btn btn-default f6" id='cleanresult'>Reset</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sidebar-module">
|
<div class="sidebar-module">
|
||||||
|
|
||||||
|
|
||||||
<!-- <h4>Canti</h4>
|
|
||||||
<ol class="list-unstyled" id="listacanti">
|
|
||||||
|
|
||||||
</ol> -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="sidebar-module"> </div> -->
|
<!-- <div class="sidebar-module"> </div> -->
|
||||||
</div><!-- /.blog-sidebar -->
|
</div><!-- /.blog-sidebar -->
|
||||||
|
|
|
@ -116,7 +116,15 @@ $(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Reset
|
||||||
|
|
||||||
|
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
|
||||||
|
cleanSearchResult()
|
||||||
|
esprlogica=[]
|
||||||
|
$('#queryText').val("")
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
14
js/utils.js
14
js/utils.js
|
@ -111,6 +111,11 @@ var qVersiCantica=`
|
||||||
SELECT (?textver AS ?Verso) (?NumVerso AS ?NumeroVerso) (?t_canto AS ?Canto) (?t_cantica AS ?Cantica)
|
SELECT (?textver AS ?Verso) (?NumVerso AS ?NumeroVerso) (?t_canto AS ?Canto) (?t_cantica AS ?Cantica)
|
||||||
?textform ?pos
|
?textform ?pos
|
||||||
WHERE {
|
WHERE {
|
||||||
|
|
||||||
|
?cantica ecrm:P102_has_title ?t_cantica ;
|
||||||
|
olires:hasStructuralComponent ?canto.
|
||||||
|
?canto ecrm:P102_has_title ?t_canto;
|
||||||
|
olires:hasStructuralComponent ?ver.
|
||||||
?ver ecrm:P190_Has_Symbolic_Content ?textver;
|
?ver ecrm:P190_Has_Symbolic_Content ?textver;
|
||||||
olires:hasNumber ?NumVerso;
|
olires:hasNumber ?NumVerso;
|
||||||
olires:hasStructuralComponent ?fa.
|
olires:hasStructuralComponent ?fa.
|
||||||
|
@ -121,11 +126,9 @@ var qVersiCantica=`
|
||||||
?form ontolex:writtenRep ?textform.
|
?form ontolex:writtenRep ?textform.
|
||||||
# ?reg olires:fragmentRegionFrom ?from;
|
# ?reg olires:fragmentRegionFrom ?from;
|
||||||
# olires:fragmentRegionTo ?to .
|
# olires:fragmentRegionTo ?to .
|
||||||
?canto ecrm:P102_has_title ?t_canto;
|
|
||||||
olires:hasStructuralComponent ?ver.
|
|
||||||
?cantica ecrm:P102_has_title ?t_cantica ;
|
|
||||||
olires:hasStructuralComponent ?canto.
|
|
||||||
FILTER regex(?t_cantica,"Inferno","i") .
|
FILTER regex(?t_cantica,"Inferno","i") .
|
||||||
|
|
||||||
}`
|
}`
|
||||||
|
|
||||||
|
|
||||||
|
@ -556,7 +559,8 @@ function buildClause(clause, parsedquery, whereind) {
|
||||||
}
|
}
|
||||||
if (clause['typeGramm0'] != null && clause['typeGramm0'] != "all")
|
if (clause['typeGramm0'] != null && clause['typeGramm0'] != "all")
|
||||||
if (whereind > -1)
|
if (whereind > -1)
|
||||||
parsedquery.where[whereind].triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
//parsedquery.where[whereind].triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
||||||
|
parsedquery.where[whereind].triples.splice(0, 0, JSON.parse(data21)[clause['typeGramm0']]);
|
||||||
else {
|
else {
|
||||||
parsedquery.where.at(-1).patterns.push(JSON.parse(unionop)['bgp']);
|
parsedquery.where.at(-1).patterns.push(JSON.parse(unionop)['bgp']);
|
||||||
parsedquery.where.at(-1).patterns.at(-1).triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
parsedquery.where.at(-1).patterns.at(-1).triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
||||||
|
|
Loading…
Reference in New Issue