initial query processing
This commit is contained in:
parent
17e08d2fbf
commit
8bc3e1600b
|
@ -13,6 +13,8 @@
|
||||||
<script
|
<script
|
||||||
src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="js/guimanagerNik.js"></script>
|
<script type="text/javascript" src="js/guimanagerNik.js"></script>
|
||||||
|
<script src="https://rdf.js.org/comunica-browser/versions/latest/engines/query-sparql/comunica-browser.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* function mostra() {
|
/* function mostra() {
|
||||||
var x = document.getElementById("divContentId");
|
var x = document.getElementById("divContentId");
|
||||||
|
|
|
@ -9,7 +9,10 @@ $(document).ready(function() {
|
||||||
filterconditions = 0
|
filterconditions = 0
|
||||||
|
|
||||||
let filterToEdit = "";
|
let filterToEdit = "";
|
||||||
|
|
||||||
|
const myEngine = new Comunica.QueryEngine();
|
||||||
|
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||||
|
|
||||||
var aggettivoJson = {
|
var aggettivoJson = {
|
||||||
"filtriaggettivo": {
|
"filtriaggettivo": {
|
||||||
"Classe": ["1ª", "2ª"],
|
"Classe": ["1ª", "2ª"],
|
||||||
|
@ -534,8 +537,6 @@ $(document).ready(function() {
|
||||||
|
|
||||||
jQuery(document).delegate('#grammarbutton', 'click', function(e) {
|
jQuery(document).delegate('#grammarbutton', 'click', function(e) {
|
||||||
|
|
||||||
alert('Update not yet implemented, in progress...')
|
|
||||||
const sparqlGenerator = sparqljs.Generator;
|
|
||||||
var size = Object.keys(condizioniFiltro).length;
|
var size = Object.keys(condizioniFiltro).length;
|
||||||
if (size == 0){
|
if (size == 0){
|
||||||
var clausola = $("#searchValue").val()
|
var clausola = $("#searchValue").val()
|
||||||
|
@ -548,13 +549,21 @@ $(document).ready(function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
spquery=buildSQ(condizioniFiltro)
|
spquery=buildSQ(condizioniFiltro)
|
||||||
alert (new sparqlGenerator().stringify(spquery));
|
execMySparqlQuery (spquery);
|
||||||
// condizioniFiltro contiene le condizioni nella forma "clausola=valore"
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
async function execMySparqlQuery (spQuery){
|
||||||
|
const sparqlGenerator = sparqljs.Generator;
|
||||||
|
|
||||||
|
alert (new sparqlGenerator().stringify(spQuery));
|
||||||
|
bindingsStream = await myEngine.queryBindings(spQuery, { sources: [ { type: 'sparql', value: sparqlEndpoint }, ], });
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
function AggiornaFiltro(filtroId) {
|
function AggiornaFiltro(filtroId) {
|
||||||
|
|
||||||
var content = jQuery('#filtro'),
|
var content = jQuery('#filtro'),
|
||||||
|
|
Loading…
Reference in New Issue