@@ -10,8 +10,6 @@ import Checkbox from '@mui/material/Checkbox';
1010import configManager from '../../../configManager/configManager' ;
1111import IconProvider from '../../../IconProvider/IconProvider' ;
1212
13- //import { QueryEngine } from "@comunica/query-sparql";
14- //const myEngine = new QueryEngine();
1513
1614export default function CustomEditor ( props ) {
1715
@@ -79,9 +77,6 @@ WHERE {
7977 if ( props . newQuery ) {
8078 navigate ( { search : searchParams . toString ( ) } ) ;
8179
82- // TODO: NEED A CHECK HERE TO SEE IF WE MAY SUBMIT (correct query)
83- // const data = await executeSPARQLQuery(jsonData.query, jsonData.source, setShowError);
84-
8580 configManager . addNewQueryGroup ( 'cstm' , 'Custom queries' , 'EditNoteIcon' ) ;
8681 addQuery ( jsonData ) ;
8782 }
@@ -148,16 +143,10 @@ WHERE {
148143 parsedObject . askQuery = JSON . parse ( dataWithStrings . askQuery ) ;
149144 }
150145 if ( ensureBoolean ( dataWithStrings . templatedQueryCheck ) ) {
151- //parsedObject.variables = JSON.parse(dataWithStrings.variables);
152146
153- // hier de logica voor .variables en .querystring voor latere updates
154- // form name variables gaan hernoemen naar templateOptions
155-
156147 const options = JSON . parse ( dataWithStrings . templateOptions ) ;
157148
158149 if ( options . variables ) {
159- console . log ( 'het werkt' )
160- console . log ( options )
161150 parsedObject . variables = options . variables ;
162151 }
163152
@@ -454,26 +443,6 @@ WHERE {
454443 )
455444}
456445
457- // Temporary bindingstream this is if you want a check on the simple queries before submitting
458- /*
459- async function executeSPARQLQuery(query, dataSource, setShowError) {
460- const resultingObjects = [];
461- try {
462- const bindingsStream = await myEngine.queryBindings(query, {
463- sources: dataSource.split(';').map(source => source.trim())
464- });
465-
466- bindingsStream.on('data', (binding) => {
467- resultingObjects.push(JSON.parse(binding.toString()));
468- });
469- } catch (error) {
470- setShowError(true);
471- throw new Error(`Error executing SPARQL query: ${error.message}`);
472- }
473- return resultingObjects;
474- };
475-
476- */
477446
478447
479448
0 commit comments