modifica query
This commit is contained in:
parent
ccae0d8728
commit
d72b1381cf
|
@ -39,8 +39,8 @@ $(document).ready(function() {
|
||||||
var listaClausoleRisultatoContesti = []
|
var listaClausoleRisultatoContesti = []
|
||||||
|
|
||||||
var listaRisultatiCommenti = []
|
var listaRisultatiCommenti = []
|
||||||
graphTextReset= function(){manageResults()}
|
graphTextReset = function() { manageResults() }
|
||||||
|
|
||||||
const sparqlGenerator = sparqljs.Generator;
|
const sparqlGenerator = sparqljs.Generator;
|
||||||
const myEngine = new Comunica.QueryEngine();
|
const myEngine = new Comunica.QueryEngine();
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
var t2 = performance.now()
|
var t2 = performance.now()
|
||||||
|
|
||||||
//console.log('res in context ' + (t1 - t0))
|
//console.log('res in context ' + (t1 - t0))
|
||||||
//console.log('list creation ' + (t2 - t1))
|
//console.log('list creation ' + (t2 - t1))
|
||||||
//evidenzio resultati
|
//evidenzio resultati
|
||||||
|
@ -507,18 +507,18 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$(idris).addClass("font-weight-bold mark ")
|
$(idris).addClass("font-weight-bold mark ")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(listarisultati.length==0){
|
if (listarisultati.length == 0) {
|
||||||
for (var ric of resincontext){
|
for (var ric of resincontext) {
|
||||||
if (Array.isArray(ric)){
|
if (Array.isArray(ric)) {
|
||||||
for (var ricel of ric){
|
for (var ricel of ric) {
|
||||||
var telric=ricel.split('-')[0]+' '+ricel.split('-')[1]+' '+ricel.split('-')[2]+' '+ricel.split('-')[3]
|
var telric = ricel.split('-')[0] + ' ' + ricel.split('-')[1] + ' ' + ricel.split('-')[2] + ' ' + ricel.split('-')[3]
|
||||||
clausesinrs.push(telric)
|
clausesinrs.push(telric)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var t3 = performance.now()
|
var t3 = performance.now()
|
||||||
//console.log('mar res ' + (t2 - t3))
|
//console.log('mar res ' + (t2 - t3))
|
||||||
//evidenzio i periodi se unità di ricerca è impostato come periodo
|
//evidenzio i periodi se unità di ricerca è impostato come periodo
|
||||||
|
@ -632,7 +632,7 @@ $(document).ready(function() {
|
||||||
//Reset
|
//Reset
|
||||||
|
|
||||||
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
jQuery(document).delegate('#cleanresult', 'click', function(e) {
|
||||||
|
|
||||||
cleanSearchResult()
|
cleanSearchResult()
|
||||||
//esprlogica = []
|
//esprlogica = []
|
||||||
$('#queryText').val("")
|
$('#queryText').val("")
|
||||||
|
@ -668,7 +668,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,40 +741,44 @@ $(document).ready(function() {
|
||||||
if (!isPeriodoInCanto(idperiodo, cantoDisplayed) && !(cantoDisplayed.includes('#vistaFrasi')))
|
if (!isPeriodoInCanto(idperiodo, cantoDisplayed) && !(cantoDisplayed.includes('#vistaFrasi')))
|
||||||
return
|
return
|
||||||
|
|
||||||
/*$(cantoDisplayed).find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
|
||||||
var tpstp = $(this).attr('class').split(" ")[1]
|
if (fromn == null || ton == null) {
|
||||||
$(this).css('color', colorssp(mapsynttypestopalette[tpstp]));
|
$(cantoDisplayed).find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
||||||
|
var tpstp = $(this).attr('class').split(" ")[1]
|
||||||
|
$(this).css('color', colorssp(mapsynttypestopalette[tpstp]));
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minim.contents().find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
minim.contents().find(' .' + idperiodo + '.' + funzionefrase).each(function() {
|
||||||
var mtpstp = $(this).attr('class').split(" ")[1]
|
var mtpstp = $(this).attr('class').split(" ")[1]
|
||||||
$(this).css('color', colorssp(mapsynttypestopalette[mtpstp]));
|
$(this).css('color', colorssp(mapsynttypestopalette[mtpstp]));
|
||||||
})*/
|
})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(cantoDisplayed).find(' .' + idperiodo).each(function() {
|
||||||
|
var vid = parseInt($(this).attr('id').replace('e', ''))
|
||||||
|
if (vid >= parseInt(fromn)
|
||||||
|
&& vid <= parseInt(ton)) {
|
||||||
|
var pstp = $(this).attr('class').split(" ")[1]
|
||||||
|
|
||||||
$(cantoDisplayed).find(' .' + idperiodo).each(function() {
|
if (pstp.trim() == funzionefrase)
|
||||||
var vid = parseInt($(this).attr('id').replace('e', ''))
|
$(this).css('color', colorssp(mapsynttypestopalette[pstp]));
|
||||||
if (vid >= parseInt(fromn)
|
}
|
||||||
&& vid <= parseInt(ton)) {
|
|
||||||
var pstp = $(this).attr('class').split(" ")[1]
|
|
||||||
|
|
||||||
if (pstp.trim() == funzionefrase)
|
})
|
||||||
$(this).css('color', colorssp(mapsynttypestopalette[pstp]));
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
minim.contents().find(' .' + idperiodo).each(function() {
|
||||||
|
var vid = parseInt($(this).attr('id').replace('e', ''))
|
||||||
|
if (vid >= parseInt(fromn)
|
||||||
|
&& vid <= parseInt(ton)) {
|
||||||
|
var mpstp = $(this).attr('class').split(" ")[1]
|
||||||
|
if (mpstp.trim() == funzionefrase)
|
||||||
|
$(this).css('color', colorssp(mapsynttypestopalette[mpstp]));
|
||||||
|
}
|
||||||
|
|
||||||
minim.contents().find(' .' + idperiodo).each(function() {
|
})
|
||||||
var vid = parseInt($(this).attr('id').replace('e', ''))
|
}
|
||||||
if (vid >= parseInt(fromn)
|
|
||||||
&& vid <= parseInt(ton)) {
|
|
||||||
var mpstp = $(this).attr('class').split(" ")[1]
|
|
||||||
if (mpstp.trim() == funzionefrase)
|
|
||||||
$(this).css('color', colorssp(mapsynttypestopalette[mpstp]));
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1017,7 +1021,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
allGrouplKeys.sort().some(function(k) {
|
allGrouplKeys.sort().some(function(k) {
|
||||||
if (k == id || k.startsWith(id + '-')) { //~k.indexOf(id + '-')) {
|
if (k == id || k.startsWith(id + '-')) { //~k.indexOf(id + '-')) {
|
||||||
|
|
||||||
//console.log(commentsSQL[k].length)
|
//console.log(commentsSQL[k].length)
|
||||||
//gruppoVersi = k.split("_").slice(-1)[0]
|
//gruppoVersi = k.split("_").slice(-1)[0]
|
||||||
gruppoVersi = k
|
gruppoVersi = k
|
||||||
|
@ -1064,8 +1068,8 @@ $(document).ready(function() {
|
||||||
|
|
||||||
return noteGroupCard;
|
return noteGroupCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
var toTitleCase = str => str.replace(/(^\w|\s\w)(\S*)/g, (_,m1,m2) => m1.toUpperCase()+m2.toLowerCase())
|
var toTitleCase = str => str.replace(/(^\w|\s\w)(\S*)/g, (_, m1, m2) => m1.toUpperCase() + m2.toLowerCase())
|
||||||
|
|
||||||
function createNoteEntry(comments, id, pos) {
|
function createNoteEntry(comments, id, pos) {
|
||||||
const tmplistaidcomm = getListaIdCommenti()
|
const tmplistaidcomm = getListaIdCommenti()
|
||||||
|
@ -1087,7 +1091,7 @@ $(document).ready(function() {
|
||||||
if (comments.TestoFonteCitazione != null && comments.TestoFonteCitazione != "nan" && comments.TestoFonteCitazione.trim() != "") {
|
if (comments.TestoFonteCitazione != null && comments.TestoFonteCitazione != "nan" && comments.TestoFonteCitazione.trim() != "") {
|
||||||
createModule(collapseCardBody, "Testo della fonte: ", removeHtmlTags(comments.TestoFonteCitazione), "1", id, pos)
|
createModule(collapseCardBody, "Testo della fonte: ", removeHtmlTags(comments.TestoFonteCitazione), "1", id, pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (comments.NaturaRiferimento != null) {
|
if (comments.NaturaRiferimento != null) {
|
||||||
createDivSingola(divCampiSingoli, "Tipo di riferimento: ", toTitleCase(comments.NaturaRiferimento), false)
|
createDivSingola(divCampiSingoli, "Tipo di riferimento: ", toTitleCase(comments.NaturaRiferimento), false)
|
||||||
divCampiSingoli.appendTo(collapseCardBody);
|
divCampiSingoli.appendTo(collapseCardBody);
|
||||||
|
@ -1775,7 +1779,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function manageResults() {
|
function manageResults() {
|
||||||
if (listaPeriodiRisultato.length) {
|
if (listaPeriodiRisultato.length) {
|
||||||
for (var msid of listaPeriodiRisultato) {
|
for (var msid of listaPeriodiRisultato) {
|
||||||
loadPeriodo(msid)
|
loadPeriodo(msid)
|
||||||
|
|
|
@ -486,7 +486,7 @@ const sentencetarget_morphgroup = `{"type": "group",
|
||||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
||||||
"object": {"termType": "Variable","value": "clg"}},
|
"object": {"termType": "Variable","value": "clg"}},
|
||||||
{"subject": {"termType": "Variable","value": "cloccte"},
|
{"subject": {"termType": "Variable","value": "cloccte"},
|
||||||
"predicate": {"termType": "NamedNode","value": "http://erlangen-crm.org/current/P148_has_component"},
|
"predicate": {"termType": "NamedNode","value": "https://erlangen-crm.org/current/P148_has_component"},
|
||||||
"object": {"termType": "Variable","value": "fa"}}
|
"object": {"termType": "Variable","value": "fa"}}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ const sentencetarget_morphgroup_short = `{"type": "group",
|
||||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/OccursInRegion"},
|
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/OccursInRegion"},
|
||||||
"object": {"termType": "Variable", "value": "reg"}},
|
"object": {"termType": "Variable", "value": "reg"}},
|
||||||
{"subject": {"termType": "Variable","value": "cloccte"},
|
{"subject": {"termType": "Variable","value": "cloccte"},
|
||||||
"predicate": {"termType": "NamedNode","value": "http://erlangen-crm.org/current/P148_has_component"},
|
"predicate": {"termType": "NamedNode","value": "https://erlangen-crm.org/current/P148_has_component"},
|
||||||
"object": {"termType": "Variable","value": "fa"}},
|
"object": {"termType": "Variable","value": "fa"}},
|
||||||
{"subject": {"termType": "Variable","value": "cloccte"},
|
{"subject": {"termType": "Variable","value": "cloccte"},
|
||||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
||||||
|
@ -541,7 +541,7 @@ const occurrenceof_form = `{"subject": {"termType": "Variable","value": "fa"},
|
||||||
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
"predicate": {"termType": "NamedNode","value": "https://dantenetwork.it/ontology/olires/current/occurrenceOf"},
|
||||||
"object": {"termType": "Variable","value": "form"}}`
|
"object": {"termType": "Variable","value": "form"}}`
|
||||||
const clauseocc_hascomponent_formocc = `{"subject": {"termType": "Variable","value": "cloccu"},
|
const clauseocc_hascomponent_formocc = `{"subject": {"termType": "Variable","value": "cloccu"},
|
||||||
"predicate": {"termType": "NamedNode","value": "http://erlangen-crm.org/current/P148_has_component"},
|
"predicate": {"termType": "NamedNode","value": "https://erlangen-crm.org/current/P148_has_component"},
|
||||||
"object": {"termType": "Variable","value": "fa"}}`
|
"object": {"termType": "Variable","value": "fa"}}`
|
||||||
|
|
||||||
const occurrenceof_clause = `{"subject": {"termType": "Variable","value": "cloccu"},
|
const occurrenceof_clause = `{"subject": {"termType": "Variable","value": "cloccu"},
|
||||||
|
|
|
@ -139,6 +139,7 @@ export function resetGraphStr(){
|
||||||
sentence[i].classList.remove('font-italic');
|
sentence[i].classList.remove('font-italic');
|
||||||
/*if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
/*if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
||||||
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)*/
|
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)*/
|
||||||
|
if (!vistaPeriodi)
|
||||||
sentence[i].style.removeProperty('color');
|
sentence[i].style.removeProperty('color');
|
||||||
|
|
||||||
sentence[i].classList.remove('font-weight-normal');
|
sentence[i].classList.remove('font-weight-normal');
|
||||||
|
|
Loading…
Reference in New Issue