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