query OR con condizioni miste
This commit is contained in:
parent
4c750da11b
commit
a615669d6d
|
@ -1831,10 +1831,22 @@ function emphResults(){
|
|||
|
||||
//execute query
|
||||
async function executeQuerySearch(query) {
|
||||
seachbBindingsStream = await myEngine.queryBindings(query, { sources: [{ type: 'sparql', value: sparqlEndpoint },], });
|
||||
//console.log(query)
|
||||
|
||||
|
||||
alert(query)
|
||||
//$("#loader").fadeIn(300);
|
||||
$("#loader").fadeIn(300);
|
||||
//$("#searchcomm2").prop("disabled", true);
|
||||
//$("#searchcomm2").html('<span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span> Searching...');
|
||||
try {
|
||||
seachbBindingsStream = await myEngine.queryBindings(query, { sources: [{ type: 'sparql', value: sparqlEndpoint },], });
|
||||
}
|
||||
catch (err) {
|
||||
$("#loader").fadeOut(300);
|
||||
//$("#searchcomm2").prop("disabled", false);
|
||||
//$("#searchcomm2").html('<span class="" role="status" aria-hidden="true"></span> Search');
|
||||
console.log(err.message);
|
||||
};
|
||||
|
||||
try {
|
||||
var result = new Set()
|
||||
var resultClauses = new Set()
|
||||
|
@ -1884,6 +1896,9 @@ function emphResults(){
|
|||
resultsInCantica.push(cantica);
|
||||
resultsInCanto.push(cantica + canto)
|
||||
}
|
||||
if(unitaRicerca!='frase' && pos==-1){
|
||||
unitaRicerca='frase'
|
||||
}
|
||||
resultClauses.add(sentenceid + "-" +clfrom+'-'+clto+"-"+clfunction.trim().replace('ordinateClause','').replace('MainClause', 'Ma')+'-'+cantica+'-'+canto+'-'+clocc)
|
||||
resultSentences.add(sentenceid)
|
||||
|
||||
|
@ -1991,7 +2006,9 @@ function emphResults(){
|
|||
console.log('badge end...')
|
||||
//calcolo numero dei contesti
|
||||
countResultContexts()
|
||||
//$("#loader").fadeOut(300);
|
||||
$("#loader").fadeOut(300);
|
||||
//$("#searchcomm2").prop("disabled", false);
|
||||
//$("#searchcomm2").html('<span class="" role="status" aria-hidden="true"></span> Search');
|
||||
|
||||
});
|
||||
queryExecuted = true;
|
||||
|
@ -2001,6 +2018,8 @@ function emphResults(){
|
|||
}
|
||||
catch (err) {
|
||||
//$("#loader").fadeOut(300);
|
||||
$("#searchcomm2").prop("disabled", false);
|
||||
$("#searchcomm2").html('<span class="" role="status" aria-hidden="true"></span> Search');
|
||||
console.log(err.message);
|
||||
|
||||
};
|
||||
|
|
|
@ -127,9 +127,10 @@ WHERE {
|
|||
|
||||
?frag olires:fragmentRegionFrom ?clfr ;
|
||||
olires:fragmentRegionTo ?clto .
|
||||
?frag olires:fragmentRegionFrom ?pos.
|
||||
#?frag olires:fragmentRegionFrom ?pos.
|
||||
}
|
||||
###condizioni sintattiche end
|
||||
BIND(COALESCE(?pos1,-1) AS ?pos)
|
||||
}`
|
||||
|
||||
|
||||
|
@ -1660,7 +1661,7 @@ var morphgroup = `{"type": "group",
|
|||
"object": {"termType": "Variable", "value": "reg"}},
|
||||
{"subject": {"termType": "Variable","value": "reg"},
|
||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/fragmentRegionFrom"},
|
||||
"object": {"termType": "Variable","value": "pos"}}
|
||||
"object": {"termType": "Variable","value": "pos1"}}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue