modifica query
This commit is contained in:
parent
e1de64fee1
commit
2cabc54522
|
@ -76,17 +76,13 @@
|
|||
id="queryText" aria-describedby="sizing-addon2">
|
||||
|
||||
</div>
|
||||
<div> </</div>
|
||||
<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 class="sidebar-module">
|
||||
|
||||
|
||||
<!-- <h4>Canti</h4>
|
||||
<ol class="list-unstyled" id="listacanti">
|
||||
|
||||
</ol> -->
|
||||
</div>
|
||||
<!-- <div class="sidebar-module"> </div> -->
|
||||
</div><!-- /.blog-sidebar -->
|
||||
|
|
|
@ -115,9 +115,17 @@ $(document).ready(function() {
|
|||
executeQuerySearch(myquery)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
//Reset
|
||||
|
||||
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||
|
||||
cleanSearchResult()
|
||||
esprlogica=[]
|
||||
$('#queryText').val("")
|
||||
|
||||
});
|
||||
|
||||
//Utility functions
|
||||
|
|
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)
|
||||
?textform ?pos
|
||||
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;
|
||||
olires:hasNumber ?NumVerso;
|
||||
olires:hasStructuralComponent ?fa.
|
||||
|
@ -121,11 +126,9 @@ var qVersiCantica=`
|
|||
?form ontolex:writtenRep ?textform.
|
||||
# ?reg olires:fragmentRegionFrom ?from;
|
||||
# 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") .
|
||||
|
||||
}`
|
||||
|
||||
|
||||
|
@ -556,7 +559,8 @@ function buildClause(clause, parsedquery, whereind) {
|
|||
}
|
||||
if (clause['typeGramm0'] != null && clause['typeGramm0'] != "all")
|
||||
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 {
|
||||
parsedquery.where.at(-1).patterns.push(JSON.parse(unionop)['bgp']);
|
||||
parsedquery.where.at(-1).patterns.at(-1).triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
||||
|
|
Loading…
Reference in New Issue