package fr.insee.rmes.api;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.commons.lang3.StringUtils;

@Path("/healthcheck")
public class HealthcheckApi extends AbstractMetadataApi {
    

private final static String ASK_QUERY = "ASK { ?a a ?b .}";

    @GET
    @Produces({
        MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML
    })
    public Response getHealthcheck() {
        if (StringUtils.isEmpty(sparqlUtils.executeSparqlQuery("SELECT * { ?s a ?t } LIMIT 1"))) {
            return Response.serverError().build();
        }
        return Response.ok().build();
    }
}

//https://qfrmessnczlht01.ad.insee.intra/sparql?query=ASK+{+?a+a+?b+.}

@@ -317,73 +317,8 @@
   %0D%0A
-%0D%0Aprivate final static String ASK_QUERY = %22ASK %7B ?a a ?b .%7D%22;%0D%0A%0D%0A
     
@@ -665,80 +665,4 @@
 %7D%0D%0A%7D
-%0D%0A%0D%0A//https://qfrmessnczlht01.ad.insee.intra/sparql?query=ASK+%7B+?a+a+?b+.%7D%0D%0A

Remove unused