From d86504d4f620033bf462af6230cc03560c01d118 Mon Sep 17 00:00:00 2001 From: Pierre Maillot Date: Wed, 10 Apr 2024 16:58:39 +0200 Subject: [PATCH] removing the automatic insertion of service clause --- indegx/src/RuleApplication.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/indegx/src/RuleApplication.ts b/indegx/src/RuleApplication.ts index 3565072b..f3cb2b48 100644 --- a/indegx/src/RuleApplication.ts +++ b/indegx/src/RuleApplication.ts @@ -210,25 +210,6 @@ function applyTest(endpointObject: EndpointObject, testObject: RuleTree.Test, en let testsPool = []; testQueries.forEach(testQuery => { testQuery = replacePlaceholders(testQuery, { endpointUrlString: endpointObject.endpoint }) - if (!postMode) { - // We check if there is a service clause in the query - if (!SPARQLUtils.queryContainsService(testQuery)) { - let endpointUrl = endpointObject.endpoint; - - // ASK queries are given a CORESE SPARQL service extension parameter for a limit of 1, other wise Corese will send a SELECT LIMIT 1000 or something too high - if(SPARQLUtils.isSparqlAsk(testQuery)) { - let endpointUrlObject = new URL(endpointUrl); - let params = new URLSearchParams(endpointUrlObject.search); - - //Add a limit of 1 to the ASK query - params.append("limit", "1"); - endpointUrl = endpointUrlObject.toString() + "?" + params.toString(); - } - - // If not, we add the service clause - testQuery = SPARQLUtils.addServiceClause(testQuery, endpointUrl) - } - } if (endpointObject.graphs !== undefined) { const parsedQuery = parser.parse(testQuery); parsedQuery.where = addGraphToInnerQueries(endpointObject, parsedQuery.where);