private Result execute ( ResultType cmdType ) throws SparqlException { String mimeType = contentType ; // Validate the user-supplied MIME type. if ( mimeType != null && ! ResultFactory . supports ( mimeType , cmdType ) ) { logger . warn ( "Requested MIME content type '{}' does not support expected response type: {}" , mimeType , cmdType ) ; mimeType = null ; } // Get the default MIME type to request if ( mimeType == null ) { mimeType = ResultFactory . getDefaultMediaType ( cmdType ) ; } if ( logger . isDebugEnabled ( ) ) { logRequest ( cmdType , mimeType ) ; } try { HttpResponse response = SparqlCall . executeRequest ( this , mimeType ) ; return ResultFactory . getResult ( this , response , cmdType ) ; } catch ( Throwable t ) { release ( ) ; throw SparqlException . convert ( "Error creating SPARQL result from server response" , t ) ; } }
Executes the request and parses the response .