From 29e9c509de5f58fd48b2cfdef864f53b5b5f7c96 Mon Sep 17 00:00:00 2001 From: cesare Date: Tue, 2 Jan 2024 11:58:51 +0100 Subject: [PATCH] implementazione query sintattiche --- js/utils.js | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/js/utils.js b/js/utils.js index f711c72..69300ff 100644 --- a/js/utils.js +++ b/js/utils.js @@ -567,8 +567,9 @@ function buildStatementClause(clause, parsedquery, whereind, theplace) { var functS = clause['functionSyntax']; var typeS = clause['typeSyntax0'] console.log(functS + ' ' + typeS) + var myf ='' if (functS != null && functS != ".+") { - var myf = buildsyntClause(funzione_clausola[functS]) + myf = buildsyntClause(funzione_clausola[functS]) if (myf != '') tmpgroup.patterns.at(-1).triples.push(myf) } @@ -582,9 +583,13 @@ function buildStatementClause(clause, parsedquery, whereind, theplace) { } } else{ - myf = buildsyntClause(macrotipi_sint[typeS]) - if (myf != '') - tmpgroup.patterns.at(-1).triples.push(myf) + var tmptr=macrotipi_sint[typeS].split(';') + for (indttr in tmptr){ + myf = buildsyntClause(tmptr[indttr]) + if (myf != '') + tmpgroup.patterns.at(-1).triples.push(myf) + } + } } @@ -640,9 +645,15 @@ function buildSintacticClause(clause, parsedquery, whereind) { } } else{ - myf = buildsyntClause(alltipi[typeS]) - if (myf != '') - parsedquery.where.at(-1).triples.push(myf) + //myf = buildsyntClause(alltipi[typeS]) + //if (myf != '') + // parsedquery.where.at(-1).triples.push(myf) + var tmptr=macrotipi_sint[typeS].split(';') + for (indttr in tmptr){ + myf = buildsyntClause(tmptr[indttr]) + if (myf != '') + parsedquery.where.at(-1).triples.push(myf) + } } //myf = buildsyntClause(alltipi[typeS]) @@ -1685,11 +1696,13 @@ var macrotipi_sint = "macro obliqua": "hasClauseType:Obliqua", "macro oggettiva": "hasClauseType:Oggettiva", "macro otta": "hasClauseType:Ottativa", - "macro pare mod": "hasClauseType:ParenteticaModalizzante", + //"macro pare mod": "hasClauseType:ParenteticaModalizzante", //"macro pare sub": "hasClauseType:ParenteticaConValoreDiSubordinata", - "macro pare sub": "hasClauseType:Parentetica", + "macro pare mod": "hasClauseType:Modalizzante;hasClauseFunction:ParentethicalClause", + "macro pare sub": "hasClauseType:Subordinata;hasClauseFunction:ParentethicalClause", "macro pred": "hasClauseType:Predicativa", - "macro pseudo": "hasClauseType:Pseudocoordinata", + //"macro pseudo": "hasClauseType:Pseudocoordinata", + "macro pseudo": "hasClauseFunction:ParentheticalCoordinateClause", "macro rel": "hasClauseType:Relativa", "macro sog": "hasClauseType:Soggettiva", "macro strum": "hasClauseType:Strumentale",