diff --git a/corese-server/src/main/java/fr/inria/corese/server/webservice/SPARQLRestAPI.java b/corese-server/src/main/java/fr/inria/corese/server/webservice/SPARQLRestAPI.java index 5f7c9d90e..ea7ba9c4d 100644 --- a/corese-server/src/main/java/fr/inria/corese/server/webservice/SPARQLRestAPI.java +++ b/corese-server/src/main/java/fr/inria/corese/server/webservice/SPARQLRestAPI.java @@ -55,6 +55,7 @@ public class SPARQLRestAPI implements ResultFormatDef, URLParam { static final String SPARQL_RESULTS_JSON = ResultFormat.SPARQL_RESULTS_JSON; static final String SPARQL_RESULTS_CSV = ResultFormat.SPARQL_RESULTS_CSV; static final String SPARQL_RESULTS_TSV = ResultFormat.SPARQL_RESULTS_TSV; + static final String SPARQL_RESULTS_MD = ResultFormat.SPARQL_RESULTS_MD; static final String SPARQL_QUERY = ResultFormat.SPARQL_QUERY; static final String XML = ResultFormat.XML; @@ -525,6 +526,23 @@ public Response getTriplesTSVForGet(@jakarta.ws.rs.core.Context HttpServletReque return myGetResult(request, name, oper, uri, param, mode, query, access, defaut, named, TSV_FORMAT); } + @GET + @Produces(SPARQL_RESULTS_MD) + public Response getTriplesMDForGet(@jakarta.ws.rs.core.Context HttpServletRequest request, + @PathParam("name") String name, + @PathParam("oper") String oper, + @QueryParam("query") String query, + @QueryParam("access") String access, + @QueryParam("default-graph-uri") List defaut, + @QueryParam("named-graph-uri") List named, + @QueryParam("param") List param, + @QueryParam("mode") List mode, + @QueryParam("uri") List uri) { + + logger.info("getTriplesMDForGet"); + return myGetResult(request, name, oper, uri, param, mode, query, access, defaut, named, MARKDOWN_FORMAT); + } + // ---------------------------------------------------- // SPARQL QUERY - DESCRIBE and CONSTRUCT with HTTP GET // ----------------------------------------------------