bug fixed
This commit is contained in:
parent
bd10a56719
commit
2d9e9a9e3d
17
js/utils.js
17
js/utils.js
|
@ -118,6 +118,7 @@ WHERE {
|
|||
//Togliere LIMIT in prod
|
||||
|
||||
orlprefix = 'http://dantenetwork.it/ontology/ORL/'
|
||||
var stringInSparql= false;
|
||||
|
||||
function writesparqlquery(query) {
|
||||
return (query);
|
||||
|
@ -233,10 +234,12 @@ function buildSPQuery(guiquery) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function buildSQ(stquery) {
|
||||
|
||||
|
||||
|
||||
stringInSparql= false;
|
||||
var SparqlParser = sparqljs.Parser;
|
||||
var parser = new SparqlParser();
|
||||
|
||||
|
@ -274,6 +277,7 @@ function buildSQ(stquery) {
|
|||
strval = clause['query'].trim().slice(0, -1)
|
||||
|
||||
multipleCondSpQuery.where[1].expression.args[1].value = strval;
|
||||
|
||||
if (clause['lemma_forma'] != null && clause['lemma_forma'] == 'lemma')
|
||||
multipleCondSpQuery.where[1].expression.args[0].value = "lm";
|
||||
}
|
||||
|
@ -294,7 +298,6 @@ function buildSQ(stquery) {
|
|||
clause = stquery['EsprLogica']
|
||||
|
||||
myquery = buildClause(stquery[clause], parsedquery, 0)
|
||||
|
||||
return (myquery)
|
||||
}
|
||||
|
||||
|
@ -363,6 +366,11 @@ function buildClauseNick(clause, parsedquery) {
|
|||
}
|
||||
|
||||
function buildJsonClause(clause, parsedquery, whereind, theplace) {
|
||||
//Nick
|
||||
if (clause['categoria'] != null){
|
||||
clause['typeGramm0']=clause['categoria'];
|
||||
clause['queryText']=clause['query']
|
||||
}
|
||||
|
||||
if (clause['queryText']!=null && clause['queryText'].trim() != "") {
|
||||
if (clause['queryText'].trim().slice(-1) !== '*')
|
||||
|
@ -378,10 +386,7 @@ function buildJsonClause(clause, parsedquery, whereind, theplace) {
|
|||
if (parsedquery.where[1].type == 'filter' && parsedquery.where[1].expression.args[0].value == 'Rappresentazione')
|
||||
parsedquery.where.splice(1, 1)
|
||||
}
|
||||
//Nick
|
||||
if (clause['categoria'] != null){
|
||||
clause['typeGramm0']=clause['categoria'];
|
||||
}
|
||||
|
||||
if (clause['typeGramm0'] != null && clause['typeGramm0'] != "all")
|
||||
if (whereind > -1)
|
||||
parsedquery.where[whereind].triples.push(JSON.parse(data21)[clause['typeGramm0']]);
|
||||
|
|
Loading…
Reference in New Issue