refactoring

This commit is contained in:
cesare 2024-05-20 12:56:17 +02:00
parent 2a5742d1b3
commit 8a72fa2c01
3 changed files with 2155 additions and 7 deletions

View File

@ -38,9 +38,10 @@
<script type="text/javascript" src="./js/browseMgr.js"></script>
<script type="text/javascript" src="./js/minimap_4.3.js"></script>
<script type="text/javascript" src="./js/partext.js"></script>
<script type="text/javascript" src="./js/utils.js"></script>
<script type="text/javascript" src="./js/utilsMgr.js"></script>
<script type="text/javascript" src="./js/citazionijson.js"></script>
<script type="text/javascript" src="./js/script_4.6.js"></script>
<script type="text/javascript" src="./js/sparqltemplates.js"></script>
</head>

View File

@ -14,7 +14,7 @@ var vistaRiferimenti = true
var listaPeriodiRisultato;
var listaClausoleRisultato;
var numeroContesti;
var hdnNamespace='http://dantenetwork.it/data/commedia/'
const hdnNamespace='http://dantenetwork.it/data/commedia/'
const syntitNamespace='https://dantenetwork.it/ontology/syntit/current/'
$(document).ready(function() {
@ -1901,12 +1901,17 @@ $(document).ready(function() {
//regione della clausola
var clfrom = binding.get('clfr').value;
var clto = binding.get('clto').value;
//var cltype=binding.get('clatype').value.replace(syntitNamespace,'')
var clfunction = binding.get('clafunction').value.replace(syntitNamespace, '')
var clocc = binding.get('clocc').value.replace(hdnNamespace, '')
var clfunction=''
if (binding.has('clafunction'))
clfunction = binding.get('clafunction').value.replaceAll(syntitNamespace, '')
var clocc = ''
if (binding.has('clocc'))
clocc = binding.get('clocc').value.replaceAll(hdnNamespace, '')
//var clfunction=binding.get('clf').value.replace(syntitNamespace,'')
//id del periodo
var sentenceid = binding.get('sentence').value.replace(hdnNamespace, '')
var sentenceid = ''
if (binding.has('sentence'))
sentenceid=binding.get('sentence').value.replace(hdnNamespace, '')
if (pos > 0 && !result.has(pos)) {
@ -1917,7 +1922,15 @@ $(document).ready(function() {
if (unitaRicerca != 'frase' && pos == -1) {
unitaRicerca = 'frase'
}
resultClauses.add(sentenceid + "-" + clfrom + '-' + clto + "-" + clfunction.trim().replace('ordinateClause', '').replace('MainClause', 'Ma') + '-' + cantica + '-' + canto + '-' + clocc)
if(clfunction.includes(';')){
var funcs=clfunction.slice(0,-1).split(';')
var occs=clocc.slice(0,-1).split(';')
for (var mi=0; mi<funcs.length; mi++)
resultClauses.add(sentenceid + "-" + clfrom + '-' + clto + "-" + funcs[mi].trim().replace('ordinateClause', '').replace('MainClause', 'Ma') + '-' + cantica + '-' + canto + '-' + occs[mi])
}
else
resultClauses.add(sentenceid + "-" + clfrom + '-' + clto + "-" + clfunction.trim().replace('ordinateClause', '').replace('MainClause', 'Ma') + '-' + cantica + '-' + canto + '-' + clocc)
//resultSentences.add(sentenceid)//NON USATO????
});

2134
js/utilsMgr.js Normal file

File diff suppressed because it is too large Load Diff